:root {
  --bg: #07111f;
  --bg-soft: #0d1b2f;
  --panel: rgba(14, 28, 49, 0.75);
  --panel-solid: #0f223a;
  --panel-light: #152b47;
  --stroke: rgba(255,255,255,0.08);
  --text: #edf4ff;
  --muted: #a8bdd8;
  --primary: #6ea8fe;
  --primary-strong: #4e8fff;
  --secondary: #93f3db;
  --accent: #c2a8ff;
  --warning: #ffc977;
  --danger: #ff977d;
  --success: #79e4a8;
  --shadow: 0 24px 60px rgba(0,0,0,0.25);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --container: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background:
    radial-gradient(circle at 10% 10%, rgba(110,168,254,0.12), transparent 25%),
    radial-gradient(circle at 90% 15%, rgba(147,243,219,0.10), transparent 20%),
    radial-gradient(circle at 70% 80%, rgba(194,168,255,0.12), transparent 20%),
    linear-gradient(180deg, #081322 0%, #0a1526 55%, #07111f 100%);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

.site-bg::before,
.site-bg::after {
  content: "";
  position: fixed;
  width: 34rem;
  height: 34rem;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.18;
  z-index: -1;
  animation: floatBlob 14s ease-in-out infinite;
}
.site-bg::before {
  background: #66c7ff;
  top: -10rem;
  left: -8rem;
}
.site-bg::after {
  background: #9b7cff;
  bottom: -10rem;
  right: -8rem;
  animation-delay: -6s;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
p { color: var(--muted); line-height: 1.7; }
h1, h2, h3, h4, h5, h6 { margin: 0 0 12px; line-height: 1.1; }

.container {
  width: min(calc(100% - 32px), var(--container));
  margin: 0 auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 0;
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(20px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}
.brand strong { display: block; font-size: 1rem; }
.brand small { color: var(--muted); display: block; }
.brand-mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  font-weight: 800;
  box-shadow: 0 16px 34px rgba(78,143,255,0.3);
}

.nav {
  display: inline-flex;
  align-items: center;
  gap: 22px;
}
.nav a {
  color: var(--muted);
  font-weight: 500;
  transition: 0.25s ease;
}
.nav a:hover,
.footer-links a:hover {
  color: var(--text);
}

.nav-actions {
  display: inline-flex;
  gap: 12px;
  align-items: center;
}

.btn {
  border: 1px solid transparent;
  padding: 13px 18px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 700;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, border-color 0.25s ease;
  cursor: pointer;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: linear-gradient(135deg, var(--primary-strong), #7ca0ff 70%, #93b4ff);
  color: #fff;
  box-shadow: 0 18px 40px rgba(78,143,255,0.34);
}
.btn-primary:hover {
  box-shadow: 0 24px 45px rgba(78,143,255,0.42);
}
.btn-secondary {
  color: var(--text);
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.08);
  backdrop-filter: blur(12px);
}
.btn-ghost {
  border-color: rgba(255,255,255,0.09);
  color: var(--text);
  background: transparent;
}
.btn-large { padding: 16px 24px; }
.full { width: 100%; }

.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 44px;
  align-items: center;
  padding: 42px 0 60px;
}
.hero h1 {
  font-size: clamp(2.6rem, 5vw, 4.85rem);
  letter-spacing: -0.04em;
  max-width: 13ch;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.07);
  color: var(--secondary);
  margin-bottom: 16px;
  border: 1px solid rgba(255,255,255,0.08);
  font-size: 0.92rem;
  font-weight: 600;
}
.lead {
  font-size: 1.13rem;
  max-width: 60ch;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}
.hero-trust {
  list-style: none;
  padding: 0;
  margin: 28px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.hero-trust li,
.pill,
.status-pill,
.badge-top {
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.05);
  color: var(--text);
  font-size: 0.92rem;
}

.card,
.feature-card,
.price-card,
.course-card,
.faq-item,
.login-panel,
.dashboard-shell,
.sidebar,
.workspace-card,
.table-card,
.metric-card,
.payment-card,
.course-sidebar,
.checkout-card,
.auth-card {
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}
.glass { background: rgba(16, 34, 57, 0.65); }
.glass-card { background: rgba(255,255,255,0.04); }
.muted { color: var(--muted); }
.center { text-align: center; }
.section {
  padding: 44px 0;
}
.section-heading {
  max-width: 850px;
  margin: 0 auto 28px;
}
.section-heading h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.03em;
}

.hero-visual {
  position: relative;
  min-height: 640px;
}
.dashboard-mock {
  position: absolute;
  inset: 90px 20px 30px 40px;
  padding: 24px;
}
.mock-header,
.preview-top,
.chat-top,
.login-top,
.checkout-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.mock-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 24px;
}
.mini-panel,
.preview-column,
.metric-card,
.workspace-card,
.payment-card,
.auth-side {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 22px;
  padding: 18px;
}
.wide { grid-column: span 2; }
.status-pill {
  color: var(--secondary);
}
.progress {
  height: 9px;
  background: rgba(255,255,255,0.08);
  border-radius: 999px;
  overflow: hidden;
  margin: 10px 0;
}
.progress i {
  display: block;
  width: 68%;
  height: 100%;
  background: linear-gradient(90deg, var(--secondary), var(--primary));
  border-radius: inherit;
}
.doc-row,
.stat-row,
.plan-row,
.lesson-row,
.file-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.doc-row:last-child,
.plan-row:last-child,
.lesson-row:last-child,
.file-row:last-child { border-bottom: 0; }
.doc-row b,
.stat-row b,
.status-badge {
  font-size: 0.82rem;
  color: var(--secondary);
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(147,243,219,0.12);
}

.timeline-mini,
.timeline-list {
  display: grid;
  gap: 12px;
}
.timeline-mini div,
.timeline-item {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255,255,255,0.04);
}
.timeline-mini span,
.timeline-date {
  display: inline-block;
  margin-bottom: 6px;
  color: var(--warning);
  font-size: 0.82rem;
}

.floating-card {
  position: absolute;
  padding: 18px;
  width: min(280px, 84%);
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,0.08);
  background: linear-gradient(180deg, rgba(12,26,44,0.92), rgba(18,34,58,0.8));
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}
.stats-card { top: 0; right: 0; }
.ai-card { bottom: 0; left: 0; }
.floating-card strong { font-size: 2rem; display: block; margin-top: 4px; }
.floating-card span { color: var(--secondary); font-weight: 700; }

.problem-grid,
.feature-grid,
.pricing-grid,
.course-grid,
.faq-grid,
.payment-grid,
.dashboard-grid,
.login-grid,
.checkout-grid,
.auth-grid,
.stats-grid {
  display: grid;
  gap: 20px;
}
.problem-grid,
.pricing-grid,
.faq-grid,
.payment-grid,
.auth-grid { grid-template-columns: repeat(3, 1fr); }
.feature-grid.four-up { grid-template-columns: repeat(4, 1fr); }
.course-grid { grid-template-columns: repeat(5, 1fr); }

.feature-card,
.course-card,
.price-card,
.payment-card {
  padding: 24px;
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}
.feature-card:hover,
.course-card:hover,
.price-card:hover,
.payment-card:hover,
.workspace-card:hover,
.metric-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255,255,255,0.16);
}
.icon-wrap {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-weight: 800;
  margin-bottom: 18px;
}
.soft-red .icon-wrap { background: rgba(255,151,125,0.16); color: var(--danger); }
.soft-orange .icon-wrap { background: rgba(255,201,119,0.16); color: var(--warning); }
.soft-blue .icon-wrap { background: rgba(110,168,254,0.16); color: var(--primary); }
.soft-red { background: rgba(255,151,125,0.08); }
.soft-orange { background: rgba(255,201,119,0.08); }
.soft-blue { background: rgba(110,168,254,0.08); }

.split-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: center;
}
.split-layout.reverse { grid-template-columns: 1fr 1fr; }
.bullets,
.flow-list,
.quick-list {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}
.bullets div,
.flow-list div,
.quick-list div {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.05);
}
.bullets span,
.quick-list span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--secondary), var(--primary));
  box-shadow: 0 0 0 6px rgba(147,243,219,0.08);
}
.flow-list b {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--primary));
}
.compact-bullets div { padding: 10px 12px; }

.modern-preview,
.chat-shell,
.signup-preview,
.checkout-card,
.auth-card {
  padding: 24px;
}
.preview-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 18px;
}
.task-chip {
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255,255,255,0.05);
}
.accent-column {
  background: linear-gradient(180deg, rgba(110,168,254,0.12), rgba(194,168,255,0.08));
}

.chat-bubbles {
  display: grid;
  gap: 12px;
  margin: 20px 0;
}
.bubble {
  max-width: 88%;
  padding: 14px 16px;
  border-radius: 18px;
  line-height: 1.6;
}
.bubble-ai {
  background: rgba(110,168,254,0.14);
  border-top-left-radius: 6px;
}
.bubble-user {
  margin-left: auto;
  background: rgba(147,243,219,0.15);
  border-top-right-radius: 6px;
}
.chat-input-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(255,255,255,0.04);
  color: var(--muted);
}
.status-dot {
  position: relative;
  padding-left: 16px;
  color: var(--secondary);
}
.status-dot::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--secondary);
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  box-shadow: 0 0 0 6px rgba(147,243,219,0.09);
}

.course-card span {
  display: inline-flex;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  margin-bottom: 16px;
  background: linear-gradient(135deg, rgba(110,168,254,0.18), rgba(194,168,255,0.2));
}
.cta-inline { margin-top: 20px; }

.price-card {
  position: relative;
}
.price-card h3 {
  font-size: 2.7rem;
  margin: 12px 0;
}
.price-card h3 span {
  font-size: 1rem;
  color: var(--muted);
}
.price-card ul,
.checklist,
.link-list,
.sidebar-nav {
  list-style: none;
  padding: 0;
  margin: 20px 0 24px;
}
.price-card li,
.checklist li,
.link-list li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 12px;
  color: var(--muted);
}
.price-card li::before,
.checklist li::before,
.link-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--secondary), var(--primary));
}
.checklist li.done { color: var(--text); }
.featured {
  background: linear-gradient(180deg, rgba(110,168,254,0.16), rgba(194,168,255,0.12));
  transform: translateY(-8px);
}
.badge-top {
  position: absolute;
  top: -14px;
  right: 22px;
  background: linear-gradient(135deg, var(--secondary), var(--primary));
  color: #06203c;
  border: 0;
  font-weight: 800;
}
.pricing-note {
  text-align: center;
  margin-top: 18px;
}

.signup-preview .input-mock,
.auth-form .field,
.filter-row,
.input-row {
  margin-bottom: 14px;
}
.input-mock,
.field,
.filter-row,
.input-row,
.search-bar {
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.07);
  background: rgba(255,255,255,0.05);
}
.input-mock label,
.field label,
.small-label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.88rem;
  color: var(--muted);
}
.field input,
.field select,
.field textarea,
.search-bar input {
  width: 100%;
  background: transparent;
  border: 0;
  color: var(--text);
  font: inherit;
  outline: none;
}
.field textarea { min-height: 110px; resize: vertical; }

.disclaimer-card,
.cta-panel {
  padding: 32px;
  text-align: center;
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(110,168,254,0.08));
}
.faq-item {
  padding: 20px 22px;
}
.faq-item summary {
  cursor: pointer;
  font-weight: 700;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item p { margin-top: 12px; }
.bottom-cta { padding-bottom: 72px; }

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 28px 0 40px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.footer-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  color: var(--muted);
}

/* Auth pages */
.auth-page,
.dashboard-page {
  min-height: 100vh;
}
.auth-shell {
  min-height: calc(100vh - 92px);
  display: grid;
  place-items: center;
  padding: 24px 0 60px;
}
.auth-grid {
  grid-template-columns: 1.05fr 0.95fr;
  align-items: stretch;
}
.auth-side {
  padding: 34px;
  position: relative;
  overflow: hidden;
  min-height: 680px;
}
.auth-side::after {
  content: "";
  position: absolute;
  inset: auto -90px -120px auto;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(147,243,219,0.20), transparent 70%);
}
.auth-card {
  padding: 34px;
}
.auth-card h1 { font-size: clamp(2rem, 4vw, 3.1rem); }
.auth-form {
  margin-top: 24px;
}
.auth-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.checkbox-row,
.inline-links,
.auth-footer-note,
.social-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 12px 0 20px;
  color: var(--muted);
  font-size: 0.95rem;
}
.checkbox-row input { accent-color: var(--primary); }
.inline-links a,
.auth-footer-note a,
.text-link {
  color: var(--secondary);
}
.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0;
  color: var(--muted);
}
.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255,255,255,0.07);
}
.social-btn {
  flex: 1;
  justify-content: center;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
}
.login-mini-card {
  margin-top: 24px;
  padding: 18px;
  border-radius: 20px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.07);
}
.auth-list { margin-top: 20px; }

/* Checkout */
.checkout-grid {
  grid-template-columns: 1.15fr 0.85fr;
  align-items: start;
}
.plan-selector {
  display: grid;
  gap: 12px;
  margin: 20px 0;
}
.plan-option {
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  cursor: pointer;
}
.plan-option.active {
  border-color: rgba(110,168,254,0.55);
  background: rgba(110,168,254,0.12);
}
.tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.tab {
  padding: 11px 15px;
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  color: var(--muted);
}
.tab.active { color: var(--text); border-color: rgba(255,255,255,0.16); }
.payment-methods {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 18px 0 22px;
}
.method {
  padding: 14px 10px;
  border-radius: 16px;
  text-align: center;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.07);
  font-weight: 700;
}
.order-summary {
  display: grid;
  gap: 14px;
}
.summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
}
.summary-row.total {
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.08);
  color: var(--text);
  font-weight: 700;
}
.safe-note {
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(121,228,168,0.10);
  color: #dff7e8;
  border: 1px solid rgba(121,228,168,0.16);
}

/* Dashboard */
.dashboard-wrap {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 22px;
  padding: 20px 0 42px;
}
.sidebar {
  padding: 22px;
  position: sticky;
  top: 98px;
  height: fit-content;
}
.sidebar-nav li { margin-bottom: 8px; }
.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  color: var(--muted);
  transition: 0.25s ease;
}
.sidebar-nav a.active,
.sidebar-nav a:hover {
  background: rgba(110,168,254,0.13);
  color: var(--text);
}
.side-badge {
  margin-top: 22px;
  padding: 18px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(147,243,219,0.12), rgba(110,168,254,0.12));
}
.mainbar {
  display: grid;
  gap: 20px;
}
.dashboard-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.search-bar {
  min-width: 320px;
}
.stats-grid { grid-template-columns: repeat(4, 1fr); }
.metric-card strong {
  display: block;
  font-size: 2rem;
  margin: 6px 0;
}
.dashboard-grid {
  grid-template-columns: 1.2fr 0.8fr;
  align-items: start;
}
.workspace-card,
.table-card,
.course-sidebar,
.login-panel {
  padding: 22px;
}
.workspace-card.large,
.table-card.large { padding: 24px; }
.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.filter-pills {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.filter-pills span {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
  color: var(--muted);
}
.filter-pills span.active {
  background: rgba(110,168,254,0.12);
  color: var(--text);
}
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.note-box,
.ai-box {
  padding: 16px;
  border-radius: 18px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
}
.ai-box {
  background: linear-gradient(180deg, rgba(110,168,254,0.10), rgba(147,243,219,0.10));
}
.doc-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
}
.doc-table th,
.doc-table td {
  text-align: left;
  padding: 14px 8px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  color: var(--muted);
}
.doc-table th { color: var(--text); font-size: 0.95rem; }
.doc-table td strong { color: var(--text); }
.table-card {
  overflow-x: auto;
}
.course-sidebar .lesson-row span {
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(110,168,254,0.14);
  color: var(--text);
}
.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.quick-actions .btn { padding: 12px 16px; }
.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
}
.avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  background: linear-gradient(135deg, var(--secondary), var(--primary));
  color: #06203c;
}

.course-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 22px;
  padding: 24px 0 50px;
}
.course-sidebar { position: sticky; top: 98px; height: fit-content; }
.course-content { display: grid; gap: 20px; }
.module-card { padding: 26px; }
.module-card h3 { margin-bottom: 10px; }
.module-card ul { margin: 14px 0 0; padding-left: 20px; color: var(--muted); }
.module-card li { margin-bottom: 10px; }

.reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes floatBlob {
  0%, 100% { transform: translate3d(0,0,0) scale(1); }
  50% { transform: translate3d(30px, 20px, 0) scale(1.05); }
}

@media (max-width: 1120px) {
  .hero,
  .split-layout,
  .auth-grid,
  .checkout-grid,
  .dashboard-wrap,
  .course-layout,
  .dashboard-grid,
  .stats-grid {
    grid-template-columns: 1fr;
  }
  .feature-grid.four-up,
  .pricing-grid,
  .problem-grid,
  .faq-grid,
  .payment-grid,
  .course-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .hero-visual { min-height: 540px; }
  .dashboard-mock { inset: 80px 10px 20px 10px; }
  .sidebar,
  .course-sidebar { position: static; }
}

@media (max-width: 760px) {
  .desktop-nav { display: none; }
  .nav-actions { gap: 8px; }
  .btn { padding: 12px 15px; font-size: 0.95rem; }
  .hero { padding-top: 20px; }
  .hero h1 { max-width: 100%; }
  .hero-visual { min-height: 520px; }
  .dashboard-mock { position: relative; inset: auto; margin-top: 110px; }
  .floating-card { width: calc(100% - 24px); }
  .stats-card { top: 0; right: 12px; }
  .ai-card { left: 12px; bottom: 12px; }
  .mock-grid,
  .preview-body,
  .grid-2,
  .auth-row,
  .payment-methods {
    grid-template-columns: 1fr;
  }
  .wide { grid-column: span 1; }
  .feature-grid.four-up,
  .pricing-grid,
  .problem-grid,
  .faq-grid,
  .payment-grid,
  .course-grid {
    grid-template-columns: 1fr;
  }
  .topbar,
  .footer,
  .dashboard-top,
  .chat-input-row,
  .mock-header,
  .preview-top,
  .chat-top,
  .checkout-top {
    flex-direction: column;
    align-items: flex-start;
  }
  .search-bar { min-width: 100%; width: 100%; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 520px) {
  .container { width: min(calc(100% - 20px), var(--container)); }
  .topbar { padding-top: 16px; }
  .brand small { display: none; }
  .stats-grid { grid-template-columns: 1fr; }
  .footer-links { gap: 12px; }
}

/* Light theme override */
:root {
  --bg: #f5f8fb;
  --bg-soft: #eef5f8;
  --panel: rgba(255, 255, 255, 0.9);
  --panel-solid: #ffffff;
  --panel-light: #f2f7fb;
  --stroke: rgba(28, 49, 68, 0.12);
  --text: #132236;
  --muted: #607083;
  --primary: #2f6fed;
  --primary-strong: #1f5edc;
  --secondary: #0f8d7e;
  --accent: #7c58d8;
  --warning: #a76513;
  --danger: #c24a35;
  --success: #16834a;
  --shadow: 0 22px 55px rgba(26, 50, 78, 0.12);
}

body {
  background:
    radial-gradient(circle at 8% 8%, rgba(47, 111, 237, 0.13), transparent 26%),
    radial-gradient(circle at 92% 16%, rgba(15, 141, 126, 0.12), transparent 22%),
    linear-gradient(180deg, #ffffff 0%, #f5f8fb 48%, #edf6f2 100%);
  color: var(--text);
}

.site-bg::before,
.site-bg::after {
  filter: blur(85px);
  opacity: 0.08;
}

.site-bg::before { background: #2f6fed; }
.site-bg::after { background: #0f8d7e; }

.topbar {
  background: rgba(255, 255, 255, 0.82);
  border-bottom: 1px solid rgba(28, 49, 68, 0.08);
}

p,
.muted,
.nav a,
.footer-links,
.checkbox-row,
.inline-links,
.auth-footer-note,
.divider,
.summary-row,
.price-card li,
.checklist li,
.link-list li,
.field label,
.small-label,
.input-mock label {
  color: var(--muted);
}

.nav a:hover,
.footer-links a:hover,
.tab.active,
.filter-pills span.active,
.sidebar-nav a.active,
.sidebar-nav a:hover,
.checklist li.done,
.doc-table th,
.doc-table td strong {
  color: var(--text);
}

.card,
.feature-card,
.price-card,
.course-card,
.faq-item,
.login-panel,
.dashboard-shell,
.sidebar,
.workspace-card,
.table-card,
.metric-card,
.payment-card,
.course-sidebar,
.checkout-card,
.auth-card {
  background: var(--panel);
  border-color: var(--stroke);
  box-shadow: var(--shadow);
}

.glass,
.glass-card,
.mini-panel,
.preview-column,
.auth-side,
.task-chip,
.chat-input-row,
.social-btn,
.login-mini-card,
.plan-option,
.tab,
.method,
.filter-pills span,
.note-box,
.user-chip,
.timeline-mini div,
.timeline-item,
.input-mock,
.field,
.filter-row,
.input-row,
.search-bar,
.hero-trust li,
.pill,
.status-pill,
.badge-top,
.bullets div,
.flow-list div,
.quick-list div {
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(28, 49, 68, 0.1);
}

.eyebrow {
  background: rgba(15, 141, 126, 0.09);
  border-color: rgba(15, 141, 126, 0.16);
  color: var(--secondary);
}

.btn-secondary {
  color: var(--text);
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(28, 49, 68, 0.12);
}

.btn-ghost {
  color: var(--text);
  background: rgba(255, 255, 255, 0.42);
  border-color: rgba(28, 49, 68, 0.14);
}

.hero-trust li,
.pill,
.status-pill {
  color: var(--text);
}

.floating-card {
  background: rgba(255, 255, 255, 0.92);
  border-color: var(--stroke);
}

.featured,
.accent-column,
.ai-box,
.disclaimer-card,
.cta-panel,
.side-badge {
  background: linear-gradient(180deg, rgba(47, 111, 237, 0.09), rgba(15, 141, 126, 0.08));
}

.soft-red { background: rgba(194, 74, 53, 0.08); }
.soft-orange { background: rgba(167, 101, 19, 0.08); }
.soft-blue { background: rgba(47, 111, 237, 0.08); }

.progress,
.doc-row,
.stat-row,
.plan-row,
.lesson-row,
.file-row,
.doc-table th,
.doc-table td,
.footer,
.divider::before,
.divider::after,
.summary-row.total {
  border-color: rgba(28, 49, 68, 0.1);
}

.progress {
  background: rgba(28, 49, 68, 0.09);
}

.field input,
.field select,
.field textarea,
.search-bar input {
  color: var(--text);
}

.safe-note {
  background: rgba(22, 131, 74, 0.1);
  border-color: rgba(22, 131, 74, 0.18);
  color: #166534;
}

/* Friendly experience polish */
:root {
  --container: 1120px;
  --shadow: 0 14px 38px rgba(26, 50, 78, 0.09);
}

body {
  background:
    radial-gradient(circle at 8% 8%, rgba(47, 111, 237, 0.08), transparent 28%),
    radial-gradient(circle at 92% 20%, rgba(15, 141, 126, 0.07), transparent 24%),
    linear-gradient(180deg, #ffffff 0%, #f7fafc 52%, #f3f8f6 100%);
}

.container {
  width: min(calc(100% - 48px), var(--container));
}

.site-bg::before,
.site-bg::after {
  opacity: 0.045;
}

.topbar {
  padding: 18px 22px;
  border-radius: 0 0 22px 22px;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 14px;
}

.nav {
  gap: 18px;
}

.btn {
  border-radius: 18px;
}

.btn-large {
  padding: 15px 22px;
}

.hero {
  grid-template-columns: minmax(0, 0.82fr) minmax(420px, 0.9fr);
  gap: 72px;
  padding: 64px 0 88px;
}

.hero h1 {
  max-width: 10.8ch;
  font-size: clamp(3rem, 4.6vw, 4.65rem);
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.lead {
  max-width: 44ch;
  font-size: 1.06rem;
  line-height: 1.65;
}

.hero-actions {
  margin-top: 24px;
}

.hero-trust {
  margin-top: 22px;
}

.hero-trust li,
.pill,
.status-pill,
.badge-top {
  padding: 9px 13px;
}

.hero-visual {
  min-height: 555px;
}

.dashboard-mock {
  inset: 92px 0 24px 44px;
  padding: 24px;
}

.floating-card {
  padding: 16px 18px;
  border-radius: 20px;
  box-shadow: 0 14px 34px rgba(26, 50, 78, 0.1);
}

.stats-card {
  top: 42px;
  right: 0;
}

.ai-card {
  bottom: 54px;
  left: 0;
}

.section {
  padding: 76px 0;
}

.section-heading {
  max-width: 700px;
  margin-bottom: 34px;
}

.section-heading h2,
.split-layout h2,
.cta-panel h2,
.disclaimer-card h2 {
  font-size: clamp(2rem, 3.2vw, 2.85rem);
}

.feature-card,
.course-card,
.price-card,
.payment-card {
  padding: 24px;
}

.feature-card p,
.course-card p,
.price-card p,
.payment-card p,
.faq-item p {
  margin-bottom: 0;
}

.bullets div,
.flow-list div,
.quick-list div,
.task-chip,
.timeline-mini div,
.timeline-item {
  border-radius: 14px;
}

.chat-bubbles {
  margin: 18px 0;
}

.bubble {
  line-height: 1.5;
}

.bottom-cta {
  padding-bottom: 84px;
}

.dashboard-page .container {
  width: min(calc(100% - 64px), 1240px);
}

.dashboard-wrap {
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 28px;
  padding: 32px 0 80px;
}

.sidebar {
  padding: 20px;
}

.sidebar-nav a {
  padding: 11px 12px;
}

.side-badge {
  padding: 16px;
}

.side-badge p {
  margin: 8px 0 0;
}

.dashboard-top {
  align-items: flex-end;
  margin-bottom: 4px;
}

.dashboard-top h1 {
  font-size: clamp(2.25rem, 3.4vw, 3.35rem);
}

.dashboard-top p {
  margin-bottom: 0;
}

.search-bar {
  min-width: 280px;
  max-width: 330px;
}

.stats-grid {
  gap: 16px;
}

.metric-card {
  min-height: 132px;
  padding: 20px;
}

.metric-card strong {
  font-size: 2.2rem;
}

.metric-card p {
  margin-bottom: 0;
  line-height: 1.45;
}

.dashboard-grid {
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 26px;
}

.workspace-card.large,
.table-card.large {
  padding: 26px;
}

.panel-header {
  align-items: flex-start;
}

.panel-header p {
  margin-bottom: 0;
}

.grid-2 {
  gap: 18px;
}

.note-box,
.ai-box {
  border-radius: 18px;
}

.ai-box p {
  line-height: 1.55;
}

.quick-actions .btn {
  flex: 1;
  min-width: 110px;
  text-align: center;
}

.doc-table th,
.doc-table td {
  padding: 13px 8px;
}

.dashboard-page .chat-bubbles .bubble {
  max-width: 100%;
}

.dashboard-page .course-sidebar .lesson-row {
  align-items: flex-start;
}

.dashboard-wrap,
.dashboard-grid,
.mainbar,
.sidebar,
.workspace-card,
.table-card,
.course-sidebar,
.metric-card,
.auth-card,
.checkout-card {
  min-width: 0;
}

@media (max-width: 1120px) {
  .dashboard-page .container,
  .container {
    width: min(calc(100% - 32px), var(--container));
  }

  .hero {
    gap: 34px;
  }

  .dashboard-grid,
  .dashboard-wrap {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .hero {
    padding: 34px 0 56px;
  }

  .hero h1 {
    font-size: clamp(2.6rem, 12vw, 3.6rem);
  }

  .section {
    padding: 54px 0;
  }

  .dashboard-top {
    align-items: flex-start;
  }
}

/* Responsive refinements */
@media (max-width: 1180px) {
  .desktop-nav {
    display: none;
  }

  .topbar {
    gap: 16px;
  }

  .hero,
  .split-layout,
  .split-layout.reverse,
  .auth-grid,
  .checkout-grid,
  .dashboard-wrap,
  .dashboard-grid,
  .course-layout {
    grid-template-columns: 1fr;
  }

  .hero {
    gap: 42px;
    padding: 52px 0 74px;
  }

  .hero h1 {
    max-width: 12ch;
  }

  .hero-visual {
    width: min(100%, 680px);
    min-height: 520px;
    margin: 0 auto;
  }

  .dashboard-mock {
    inset: 80px 0 22px 28px;
  }

  .stats-card {
    top: 20px;
    right: 8px;
  }

  .ai-card {
    bottom: 24px;
    left: 4px;
  }

  .feature-grid.four-up,
  .pricing-grid,
  .problem-grid,
  .faq-grid,
  .payment-grid,
  .course-grid,
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-page .container,
  .container {
    width: min(calc(100% - 36px), var(--container));
  }

  .sidebar,
  .course-sidebar {
    position: static;
  }

  .sidebar-nav {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 18px;
    width: 100%;
    min-width: 0;
  }

  .sidebar-nav li {
    margin-bottom: 0;
  }

  .side-badge {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
  }
}

@media (max-width: 820px) {
  .container,
  .dashboard-page .container {
    width: min(calc(100% - 28px), var(--container));
  }

  .topbar {
    position: relative;
    flex-wrap: wrap;
    align-items: center;
    padding: 14px;
  }

  .brand {
    min-width: 0;
  }

  .brand strong {
    font-size: 0.95rem;
  }

  .brand small {
    font-size: 0.82rem;
  }

  .nav-actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .nav-actions .btn,
  .user-chip {
    min-height: 44px;
  }

  .hero {
    padding: 34px 0 58px;
  }

  .hero h1 {
    max-width: 11ch;
    font-size: clamp(2.65rem, 11vw, 4rem);
  }

  .lead {
    font-size: 1rem;
  }

  .hero-actions,
  .preview-top,
  .mock-header,
  .chat-top,
  .checkout-top,
  .dashboard-top,
  .panel-header,
  .footer {
    align-items: flex-start;
  }

  .hero-actions,
  .chat-input-row,
  .panel-header,
  .dashboard-top,
  .footer {
    flex-direction: column;
  }

  .hero-actions .btn,
  .bottom-cta .btn,
  .cta-panel .btn {
    width: 100%;
  }

  .hero-trust {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-trust li {
    text-align: center;
  }

  .hero-visual {
    min-height: auto;
    display: grid;
    gap: 14px;
  }

  .dashboard-mock,
  .floating-card {
    position: static;
    width: 100%;
  }

  .dashboard-mock {
    padding: 18px;
  }

  .mock-grid,
  .preview-body,
  .grid-2,
  .auth-row,
  .payment-methods,
  .stats-grid,
  .feature-grid.four-up,
  .pricing-grid,
  .problem-grid,
  .faq-grid,
  .payment-grid,
  .course-grid {
    grid-template-columns: 1fr;
  }

  .wide {
    grid-column: span 1;
  }

  .section {
    padding: 46px 0;
  }

  .section-heading {
    text-align: left;
  }

  .center {
    text-align: left;
  }

  .cta-panel,
  .disclaimer-card {
    text-align: left;
  }

  .auth-side {
    min-height: auto;
  }

  .search-bar {
    width: 100%;
    min-width: 0;
    max-width: none;
  }

  .sidebar-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sidebar,
  .sidebar-nav,
  .sidebar-nav li,
  .sidebar-nav a,
  .side-badge {
    width: 100%;
    min-width: 0;
  }

  .sidebar-nav a,
  .side-badge {
    overflow-wrap: anywhere;
  }

  .side-badge {
    display: block;
  }

  .doc-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  .quick-actions {
    flex-direction: column;
  }

  .quick-actions .btn {
    width: 100%;
  }
}

/* Medmi-inspired homepage refresh */
.home-page {
  background: #faf7ef;
}

.home-page .site-bg {
  display: none;
}

.home-page .topbar.container {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 18px max(24px, calc((100vw - 1120px) / 2));
  color: #fff;
  background: #073b29;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.home-page .brand strong,
.home-page .nav a,
.home-page .btn-ghost {
  color: #fff;
}

.home-page .brand small {
  color: rgba(255, 255, 255, 0.72);
}

.home-page .brand-mark {
  background: #f9efe0;
  color: #073b29;
  box-shadow: none;
}

.home-page .btn-primary {
  background: #f9efe0;
  color: #073b29;
  box-shadow: none;
}

.home-page .btn-ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.26);
}

.medmi-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 50% 100%, rgba(253, 245, 230, 0.42), transparent 28%),
    linear-gradient(180deg, #073b29 0%, #0b3b2b 60%, #faf7ef 100%);
}

.medmi-noise {
  position: absolute;
  inset: 0;
  opacity: 0.18;
  background:
    radial-gradient(circle at 12% 22%, rgba(170, 227, 141, 0.22), transparent 22%),
    radial-gradient(circle at 88% 24%, rgba(255, 197, 112, 0.15), transparent 20%);
}

.medmi-hero-inner {
  position: relative;
  z-index: 1;
  min-height: 640px;
  padding: 74px 0 36px;
  display: grid;
  align-items: center;
  justify-items: center;
  text-align: center;
}

.medmi-hero-copy {
  max-width: 820px;
}

.medmi-kicker {
  display: inline-block;
  margin-bottom: 22px;
  color: #f7ead7;
  font-weight: 800;
}

.medmi-hero h1 {
  max-width: 12ch;
  margin: 0 auto 24px;
  color: #fff;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 5rem;
  line-height: 0.98;
  letter-spacing: 0;
}

.medmi-hero h1 em {
  color: #b6ea8f;
  font-style: italic;
}

.medmi-hero .lead {
  max-width: 700px;
  margin: 0 auto;
  color: rgba(255, 255, 255, 0.84);
  font-size: 1.08rem;
}

.medmi-hero .hero-actions {
  justify-content: center;
}

.btn-cream {
  color: #073b29;
  background: #f9efe0;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
}

.btn-outline-light {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.08);
}

.medmi-card-row {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  width: min(100%, 980px);
  margin: -70px auto 0;
}

.medmi-feature-card {
  min-height: 285px;
  padding: 18px;
  overflow: hidden;
  text-align: left;
  background: #fffaf2;
  border: 1px solid rgba(7, 59, 41, 0.08);
  border-radius: 28px;
  box-shadow: 0 22px 44px rgba(20, 45, 34, 0.14);
  transition: 0.25s ease;
}

.medmi-feature-card:hover {
  transform: translateY(-8px);
}

.card-topline {
  color: #557464;
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.feature-visual {
  position: relative;
  height: 128px;
  margin: 18px 0;
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(7, 59, 41, 0.1), rgba(182, 234, 143, 0.18)),
    #f4eadb;
}

.feature-visual i {
  position: absolute;
  display: block;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 12px 24px rgba(20, 45, 34, 0.12);
}

.medmi-doc-card .feature-visual i:nth-child(1) {
  width: 54%;
  height: 76%;
  top: 14%;
  left: 14%;
}

.medmi-doc-card .feature-visual i:nth-child(2) {
  width: 42%;
  height: 58%;
  top: 24%;
  right: 12%;
  background: #e5f3d2;
}

.medmi-doc-card .feature-visual i:nth-child(3) {
  width: 48px;
  height: 48px;
  right: 18%;
  bottom: 12%;
  border-radius: 50%;
  background: #073b29;
}

.ai-visual {
  background:
    radial-gradient(circle at 74% 26%, rgba(182, 234, 143, 0.72), transparent 22%),
    linear-gradient(135deg, #f8e4d4, #fff7ef);
}

.ai-visual i:nth-child(1) {
  width: 78px;
  height: 78px;
  left: 16%;
  top: 22%;
  border-radius: 50%;
  background: #073b29;
}

.ai-visual i:nth-child(2) {
  width: 44%;
  height: 18px;
  right: 14%;
  top: 38%;
  background: #fff;
}

.ai-visual i:nth-child(3) {
  width: 34%;
  height: 18px;
  right: 24%;
  top: 58%;
  background: #b6ea8f;
}

.reminder-visual {
  background:
    linear-gradient(135deg, rgba(251, 221, 169, 0.72), rgba(255, 250, 242, 0.9)),
    #fffaf2;
}

.reminder-visual i:nth-child(1) {
  width: 58%;
  height: 76%;
  left: 20%;
  top: 12%;
}

.reminder-visual i:nth-child(2) {
  width: 52%;
  height: 12px;
  left: 24%;
  top: 42%;
  background: #073b29;
}

.reminder-visual i:nth-child(3) {
  width: 38%;
  height: 12px;
  left: 24%;
  top: 60%;
  background: #b6ea8f;
}

.medmi-feature-card strong,
.medmi-feature-card small,
.medmi-feature-card b {
  display: block;
}

.medmi-feature-card strong {
  color: #163526;
  font-size: 1.15rem;
}

.medmi-feature-card small {
  margin-top: 8px;
  color: #557464;
  line-height: 1.45;
}

.medmi-feature-card b {
  margin-top: 18px;
  color: #073b29;
}

.medmi-proof {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  padding: 34px 0 64px;
}

.medmi-proof span {
  padding: 10px 14px;
  color: #345544;
  background: rgba(255, 250, 242, 0.86);
  border: 1px solid rgba(7, 59, 41, 0.08);
  border-radius: 999px;
  font-weight: 700;
}

.home-page .section {
  background: #faf7ef;
}

@media (max-width: 1180px) {
  .home-page .topbar.container {
    padding-inline: 18px;
  }

  .medmi-hero h1 {
    font-size: 4rem;
  }

  .medmi-card-row {
    grid-template-columns: repeat(3, minmax(220px, 1fr));
    max-width: 100%;
  }
}

@media (max-width: 820px) {
  .home-page .topbar.container {
    align-items: center;
  }

  .medmi-hero-inner {
    min-height: 560px;
    padding-top: 54px;
  }

  .medmi-hero h1 {
    font-size: 3.35rem;
  }

  .medmi-card-row {
    margin-top: -46px;
    overflow-x: auto;
    padding: 0 4px 18px;
    scroll-snap-type: x mandatory;
  }

  .medmi-feature-card {
    min-height: auto;
    scroll-snap-align: start;
  }
}

@media (max-width: 520px) {
  .medmi-hero h1 {
    font-size: 2.9rem;
  }

  .medmi-hero .lead {
    font-size: 1rem;
  }
}

@media (max-width: 520px) {
  .container,
  .dashboard-page .container {
    width: min(calc(100% - 20px), var(--container));
  }

  .topbar {
    border-radius: 0 0 18px 18px;
  }

  .brand-mark {
    width: 40px;
    height: 40px;
    border-radius: 12px;
  }

  .brand strong {
    max-width: 210px;
    overflow-wrap: anywhere;
  }

  .nav-actions .btn,
  .user-chip {
    width: 100%;
    justify-content: center;
  }

  .hero h1 {
    max-width: 100%;
    font-size: clamp(2.35rem, 13vw, 3.15rem);
  }

  .hero-trust,
  .sidebar-nav {
    grid-template-columns: 1fr;
  }

  .card,
  .feature-card,
  .price-card,
  .course-card,
  .faq-item,
  .sidebar,
  .workspace-card,
  .table-card,
  .metric-card,
  .payment-card,
  .course-sidebar,
  .checkout-card,
  .auth-card {
    border-radius: 20px;
  }

  .workspace-card.large,
  .table-card.large,
  .auth-card,
  .checkout-card,
  .module-card,
  .cta-panel,
  .disclaimer-card {
    padding: 20px;
  }

  .metric-card {
    min-height: auto;
  }

  .price-card h3 {
    font-size: 2.25rem;
  }

.bubble {
  max-width: 100%;
}
}

/* Final homepage and member-area polish */
.hero {
  align-items: start;
  padding-bottom: 74px;
}

.hero-visual {
  display: grid;
  gap: 16px;
  min-height: auto;
  overflow: visible;
  align-content: start;
}

.hero-visual .dashboard-mock {
  position: static;
  width: 100%;
  z-index: 2;
  overflow: hidden;
  order: 2;
}

.hero-visual .mini-panel.wide {
  display: none;
}

.hero-visual .floating-card {
  position: static;
  width: 100%;
  z-index: 4;
  background: rgba(255, 255, 255, 0.86);
}

.hero-visual .stats-card {
  order: 1;
}

.hero-visual .ai-card {
  order: 1;
}

.hero-visual {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hero-visual .dashboard-mock {
  grid-column: 1 / -1;
}

.hero-visual .floating-card strong {
  font-size: 1.55rem;
}

.hero-visual .dashboard-mock,
.hero-visual .mini-panel,
.hero-visual .floating-card {
  border-radius: 18px;
}

.hero-visual .dashboard-mock {
  padding: 18px;
}

.hero-visual .mock-grid {
  gap: 12px;
  margin-top: 14px;
}

.hero-visual .mini-panel {
  padding: 12px;
}

.hero-visual .checklist {
  margin: 12px 0 0;
}

.hero-visual .checklist li {
  margin-bottom: 8px;
  padding-left: 20px;
}

.hero-visual .timeline-mini {
  gap: 8px;
}

.hero-visual .timeline-mini div {
  padding: 8px 10px;
}

.hero-visual .timeline-mini div:nth-child(3) {
  display: none;
}

.problem-section {
  padding-top: 64px;
}

.pricing-section {
  padding-top: 28px;
}

.faq-item h3 {
  font-size: 1rem;
  margin-bottom: 12px;
}

.bottom-cta .cta-panel {
  display: grid;
  justify-items: center;
  gap: 22px;
  text-align: center;
}

.bottom-cta .hero-actions {
  justify-content: center;
  margin-top: 0;
}

.bottom-cta .btn {
  min-width: 140px;
}

.member-grid,
.billing-grid,
.task-board,
.form-grid {
  display: grid;
  gap: 18px;
}

.member-grid.two-col,
.billing-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.task-board {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.span-2 {
  grid-column: span 2;
}

.upload-zone {
  display: grid;
  place-items: center;
  gap: 10px;
  min-height: 220px;
  margin: 18px 0;
  padding: 28px;
  text-align: center;
  border: 1px dashed rgba(47, 111, 237, 0.32);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(47, 111, 237, 0.07), rgba(15, 141, 126, 0.06));
}

.upload-zone.dragging {
  border-color: var(--primary);
  background: linear-gradient(180deg, rgba(47, 111, 237, 0.14), rgba(15, 141, 126, 0.1));
}

.upload-zone p {
  max-width: 46ch;
  margin: 0;
}

.chat-input-row input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  font: inherit;
}

.checklist li {
  cursor: pointer;
}

.form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid .span-2 {
  grid-column: span 2;
}

.roomy .timeline-item {
  padding: 18px 20px;
}

.dashboard-page .dashboard-wrap {
  padding-top: 16px;
}

.dashboard-page .stats-grid {
  gap: 12px;
}

.dashboard-page .metric-card {
  min-height: auto;
  padding: 16px;
}

.dashboard-page .dashboard-grid {
  gap: 18px;
}

.dashboard-page .workspace-card.large,
.dashboard-page .table-card.large {
  padding: 20px;
}

.tall-chat {
  min-height: 360px;
  align-content: start;
}

.billing-grid h2 {
  font-size: 2.6rem;
  margin: 8px 0 12px;
}

.billing-grid h2 span {
  color: var(--muted);
  font-size: 1rem;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 999;
  max-width: min(360px, calc(100% - 44px));
  padding: 14px 16px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--stroke);
  border-radius: 16px;
  box-shadow: var(--shadow);
  transform: translateY(18px);
  opacity: 0;
  transition: 0.25s ease;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.saved-row {
  animation: savedFlash 1.2s ease;
}

.pricing-section .section-heading p,
.section-heading.center p {
  max-width: 62ch;
  margin: 12px auto 0;
}

.price-card {
  display: flex;
  flex-direction: column;
}

.price-card .btn {
  margin-top: auto;
}

.alert-card {
  background: linear-gradient(180deg, rgba(110, 168, 254, 0.12), rgba(15, 141, 126, 0.08));
}

.empty-state {
  padding: 18px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.58);
  border: 1px dashed var(--stroke);
  border-radius: 16px;
}

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

.empty-state p {
  margin: 6px 0 0;
}

.empty-state.compact {
  padding: 14px;
}

.prompt-list {
  display: grid;
  gap: 10px;
}

.quick-prompt {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  color: var(--text);
  font: inherit;
  text-align: left;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid var(--stroke);
  border-radius: 14px;
  cursor: pointer;
  transition: 0.2s ease;
}

.quick-prompt:hover {
  background: rgba(110, 168, 254, 0.12);
  transform: translateY(-1px);
}

.quick-prompt span {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--secondary), var(--primary));
}

.compact-header {
  margin-bottom: 10px;
}

.pending-upload {
  margin: 16px 0;
  padding: 14px;
  border: 1px solid rgba(47, 111, 237, 0.16);
  border-radius: 18px;
  background: rgba(47, 111, 237, 0.06);
}

.pending-list {
  display: grid;
  gap: 10px;
}

.pending-row,
.task-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.pending-row {
  padding: 11px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid var(--stroke);
}

.pending-row span,
.task-text {
  min-width: 0;
}

.pending-row small,
.review-list small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.45;
}

.mini-action {
  flex: 0 0 auto;
  padding: 8px 10px;
  border: 1px solid var(--stroke);
  border-radius: 999px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.72);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.danger-action {
  color: var(--danger);
}

.task-list {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 16px 0;
  list-style: none;
}

.task-row {
  padding: 10px;
  border: 1px solid var(--stroke);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.64);
  cursor: default;
}

.task-row.done .task-text {
  text-decoration: line-through;
  color: var(--muted);
}

.task-check {
  flex: 0 0 auto;
  padding: 7px 9px;
  border: 1px solid rgba(15, 141, 126, 0.16);
  border-radius: 999px;
  color: var(--secondary);
  background: rgba(15, 141, 126, 0.08);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}

.task-actions {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.task-composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-top: 14px;
}

.task-composer input {
  width: 100%;
  min-width: 0;
  padding: 12px 13px;
  border: 1px solid var(--stroke);
  border-radius: 14px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.72);
  font: inherit;
}

.empty-task {
  padding: 10px 0;
  color: var(--muted);
  cursor: default;
}

.review-list {
  display: grid;
  gap: 12px;
  padding: 0;
  list-style: none;
}

.review-list li {
  padding: 12px 13px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid var(--stroke);
  cursor: default;
}

.locked-link {
  opacity: 0.64;
  justify-content: space-between;
}

.lock-badge {
  margin-left: auto;
  padding: 4px 7px;
  border-radius: 999px;
  color: var(--warning);
  background: rgba(167, 101, 19, 0.1);
  font-size: 0.72rem;
  font-weight: 800;
}

.field.invalid input,
.field.invalid select,
.field.invalid textarea {
  border-color: rgba(194, 74, 53, 0.5);
  box-shadow: 0 0 0 3px rgba(194, 74, 53, 0.08);
}

.checkbox-row.invalid {
  color: var(--danger);
}

.field-error {
  display: block;
  margin-top: 7px;
  color: var(--danger);
  font-weight: 700;
}

.home-page .topbar {
  border-radius: 0;
}

.professional-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: #0d274a;
}

.professional-hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(7, 26, 54, 0.94), rgba(15, 79, 154, 0.72) 54%, rgba(9, 32, 58, 0.86)),
    url("https://images.unsplash.com/photo-1450101499163-c8848c66ca85?auto=format&fit=crop&w=1800&q=80") center/cover;
  transform: scale(1.02);
}

.professional-hero::before,
.professional-hero::after {
  content: "";
  position: absolute;
  inset: auto auto -80px -80px;
  width: 360px;
  height: 360px;
  background: linear-gradient(135deg, rgba(47, 111, 237, 0.88), rgba(15, 141, 126, 0.52));
  clip-path: polygon(0 0, 100% 18%, 74% 100%, 0 74%);
  opacity: 0.82;
}

.professional-hero::after {
  inset: 42px -120px auto auto;
  transform: rotate(18deg);
  opacity: 0.52;
}

.professional-hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(420px, 0.82fr);
  gap: 54px;
  align-items: center;
  min-height: 620px;
  padding: 86px 0 112px;
}

.professional-hero .hero-copy h1 {
  max-width: 12ch;
  font-size: clamp(3.1rem, 5vw, 5.2rem);
  letter-spacing: -0.045em;
  color: #fff;
}

.professional-hero .lead {
  max-width: 50ch;
  color: rgba(255, 255, 255, 0.84);
}

.light-eyebrow {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.22);
}

.btn-dark {
  color: #fff;
  background: rgba(6, 18, 34, 0.82);
  border-color: rgba(255, 255, 255, 0.18);
}

.hero-command-center {
  position: relative;
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: 16px;
  align-items: start;
}

.claim-flow-card,
.claim-review-card,
.claim-timeline-card {
  background: rgba(255, 255, 255, 0.94);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 10px;
  box-shadow: 0 24px 58px rgba(0, 0, 0, 0.24);
  animation: heroFloat 5.8s ease-in-out infinite;
}

.claim-flow-card {
  padding: 22px;
}

.claim-review-card {
  padding: 24px;
  animation-delay: -1.4s;
}

.claim-timeline-card {
  grid-column: 1 / -1;
  padding: 24px;
  animation-delay: -2.8s;
}

.claim-flow-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.claim-flow-top span,
.claim-review-card .status-pill {
  color: var(--secondary);
  font-weight: 800;
}

.claim-flow-top strong {
  font-size: 2rem;
}

.animated-progress i {
  width: 68%;
  animation: progressPulse 2.8s ease-in-out infinite;
}

.claim-timeline-card div {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 0;
  border-top: 1px solid var(--stroke);
}

.claim-timeline-card b {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  color: #fff;
  background: var(--primary);
}

.insurance-tabs {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: -68px;
  margin-bottom: 44px;
  background: #fff;
  border: 1px solid var(--stroke);
  border-radius: 12px;
  box-shadow: 0 22px 48px rgba(26, 50, 78, 0.16);
}

.insurance-tabs a {
  min-height: 112px;
  padding: 24px;
  border-right: 1px solid var(--stroke);
  transition: 0.24s ease;
}

.insurance-tabs a:last-child {
  border-right: 0;
}

.insurance-tabs a:hover {
  transform: translateY(-6px);
  background: linear-gradient(180deg, rgba(47, 111, 237, 0.08), rgba(15, 141, 126, 0.06));
}

.insurance-tabs strong,
.insurance-tabs span {
  display: block;
}

.insurance-tabs strong {
  margin-bottom: 8px;
  color: var(--text);
}

.insurance-tabs span {
  color: var(--muted);
  line-height: 1.45;
}

.search-wrap {
  position: relative;
  width: min(360px, 100%);
}

.search-wrap .search-bar {
  width: 100%;
  min-width: 0;
}

.search-results {
  position: absolute;
  z-index: 20;
  top: calc(100% + 8px);
  right: 0;
  width: min(420px, 92vw);
  padding: 10px;
  border: 1px solid var(--stroke);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.search-results a {
  display: grid;
  gap: 3px;
  padding: 12px;
  border-radius: 12px;
}

.search-results a:hover {
  background: rgba(47, 111, 237, 0.08);
}

.search-results span,
.search-results small {
  color: var(--muted);
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

@keyframes heroFloat {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(0, -10px, 0); }
}

@keyframes progressPulse {
  0%, 100% { width: 58%; }
  50% { width: 76%; }
}

.filter-pills span {
  cursor: pointer;
  user-select: none;
}

.filter-pills span:hover {
  background: rgba(110, 168, 254, 0.14);
  color: var(--text);
}

@keyframes savedFlash {
  0% { background: rgba(15, 141, 126, 0.14); }
  100% { background: transparent; }
}

@media (max-width: 1180px) {
  .hero {
    padding-bottom: 62px;
  }

  .professional-hero-inner {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 62px 0 106px;
  }

  .insurance-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .insurance-tabs a:nth-child(2) {
    border-right: 0;
  }

  .insurance-tabs a:nth-child(-n + 2) {
    border-bottom: 1px solid var(--stroke);
  }

  .task-board {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .hero {
    padding-bottom: 44px;
  }

  .hero-visual {
    display: none;
  }

  .professional-hero-inner {
    padding: 46px 0 86px;
  }

  .professional-hero .hero-copy h1 {
    max-width: 100%;
    font-size: clamp(2.45rem, 11vw, 3.4rem);
  }

  .hero-command-center,
  .insurance-tabs {
    grid-template-columns: 1fr;
  }

  .insurance-tabs a,
  .insurance-tabs a:nth-child(2) {
    border-right: 0;
  }

  .insurance-tabs a {
    min-height: auto;
    border-bottom: 1px solid var(--stroke);
  }

  .insurance-tabs a:last-child {
    border-bottom: 0;
  }

  .claim-timeline-card {
    grid-column: auto;
  }

  .member-grid.two-col,
  .billing-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .pending-row,
  .task-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .task-composer {
    grid-template-columns: 1fr;
  }

  .task-actions,
  .pending-row .mini-action,
  .task-composer .btn {
    width: 100%;
  }

  .span-2,
  .form-grid .span-2 {
    grid-column: span 1;
  }

  .bottom-cta .cta-panel {
    text-align: center;
  }

  .bottom-cta .hero-actions {
    width: 100%;
    align-items: center;
  }
}

/* Final visual pass: Medmi-inspired spacing and palette consistency */
.home-page .medmi-hero {
  background:
    radial-gradient(circle at 50% 86%, rgba(253, 245, 230, 0.28), transparent 26%),
    linear-gradient(180deg, #073b29 0%, #083f2c 58%, #f5efe4 100%);
}

.home-page .medmi-hero-inner {
  min-height: auto;
  padding: 84px 0 54px;
  align-items: start;
}

.home-page .medmi-hero-copy {
  max-width: 780px;
}

.home-page .medmi-hero h1 {
  margin-bottom: 28px;
}

.home-page .medmi-card-row {
  width: min(100%, 1060px);
  margin: 44px auto 0;
  gap: 26px;
}

.home-page .medmi-feature-card {
  min-height: 300px;
  border-radius: 26px;
}

.home-page .medmi-proof {
  padding: 24px 0 70px;
}

body:not(.home-page) {
  --bg: #fbf7ee;
  --bg-soft: #f1f6ef;
  --panel: rgba(255, 250, 242, 0.9);
  --panel-solid: #fffaf2;
  --panel-light: #f7efe2;
  --stroke: rgba(7, 59, 41, 0.12);
  --text: #163526;
  --muted: #607466;
  --primary: #073b29;
  --primary-strong: #0f5138;
  --secondary: #16834a;
  --accent: #b6ea8f;
  --warning: #9a650f;
  --danger: #b84a35;
  --success: #16834a;
  background:
    radial-gradient(circle at 8% 8%, rgba(182, 234, 143, 0.13), transparent 28%),
    radial-gradient(circle at 92% 10%, rgba(249, 239, 224, 0.7), transparent 24%),
    linear-gradient(180deg, #fbf7ee 0%, #f1f6ef 100%);
  color: var(--text);
}

body:not(.home-page) .site-bg::before {
  background: #b6ea8f;
}

body:not(.home-page) .site-bg::after {
  background: #f9efe0;
}

body:not(.home-page) .topbar {
  color: #163526;
  background: rgba(255, 250, 242, 0.9);
  border-color: rgba(7, 59, 41, 0.1);
  box-shadow: 0 18px 42px rgba(20, 45, 34, 0.06);
}

body:not(.home-page) .brand-mark,
body:not(.home-page) .avatar {
  color: #fffaf2;
  background: #073b29;
  box-shadow: none;
}

body:not(.home-page) .btn-primary {
  color: #fffaf2;
  background: linear-gradient(135deg, #073b29, #16834a 72%, #6fae57);
  box-shadow: 0 16px 34px rgba(7, 59, 41, 0.18);
}

body:not(.home-page) .btn-primary:hover {
  box-shadow: 0 20px 40px rgba(7, 59, 41, 0.22);
}

body:not(.home-page) .btn-secondary,
body:not(.home-page) .btn-ghost,
body:not(.home-page) .mini-action {
  color: #163526;
  background: rgba(255, 250, 242, 0.84);
  border-color: rgba(7, 59, 41, 0.14);
}

body:not(.home-page) .price-card,
body:not(.home-page) .auth-card,
body:not(.home-page) .checkout-card,
body:not(.home-page) .course-sidebar,
body:not(.home-page) .lesson-card,
body:not(.home-page) .payment-card,
body:not(.home-page) .glass-card {
  background: rgba(255, 250, 242, 0.9);
  border-color: rgba(7, 59, 41, 0.11);
  box-shadow: 0 18px 44px rgba(20, 45, 34, 0.08);
}

.dashboard-page {
  background:
    radial-gradient(circle at 8% 8%, rgba(182, 234, 143, 0.13), transparent 28%),
    radial-gradient(circle at 92% 10%, rgba(249, 239, 224, 0.7), transparent 24%),
    linear-gradient(180deg, #fbf7ee 0%, #f1f6ef 100%);
}

.dashboard-page .site-bg {
  background:
    radial-gradient(circle at 0% 0%, rgba(7, 59, 41, 0.08), transparent 30%),
    radial-gradient(circle at 100% 20%, rgba(182, 234, 143, 0.14), transparent 26%);
}

.dashboard-page .container {
  width: min(calc(100% - 56px), 1500px);
}

.dashboard-page .topbar {
  color: #163526;
  background: rgba(255, 250, 242, 0.9);
  border-color: rgba(7, 59, 41, 0.1);
  box-shadow: 0 18px 42px rgba(20, 45, 34, 0.06);
}

.dashboard-page .brand-mark,
.dashboard-page .avatar {
  color: #fffaf2;
  background: #073b29;
  box-shadow: none;
}

.dashboard-page .btn-primary {
  color: #fffaf2;
  background: linear-gradient(135deg, #073b29, #16834a 72%, #6fae57);
  box-shadow: 0 16px 34px rgba(7, 59, 41, 0.18);
}

.dashboard-page .btn-primary:hover {
  box-shadow: 0 20px 40px rgba(7, 59, 41, 0.22);
}

.dashboard-page .btn-secondary,
.dashboard-page .btn-ghost,
.dashboard-page .mini-action {
  color: #163526;
  background: rgba(255, 250, 242, 0.84);
  border-color: rgba(7, 59, 41, 0.14);
}

.dashboard-page .eyebrow,
.dashboard-page .status-pill,
.dashboard-page .task-check,
.dashboard-page .doc-pill,
.dashboard-page .lock-badge {
  color: #087054;
  background: rgba(182, 234, 143, 0.24);
  border-color: rgba(7, 59, 41, 0.16);
}

.dashboard-page .dashboard-wrap {
  grid-template-columns: 270px minmax(0, 1fr);
  gap: 34px;
  padding-top: 28px;
}

.dashboard-page .mainbar {
  gap: 24px;
}

.dashboard-page .dashboard-top {
  gap: 28px;
}

.dashboard-page .dashboard-top h1 {
  max-width: 14ch;
}

.dashboard-page .search-wrap {
  width: min(420px, 100%);
}

.dashboard-page .stats-grid {
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 18px;
}

.dashboard-page .metric-card,
.dashboard-page .workspace-card,
.dashboard-page .table-card,
.dashboard-page .sidebar,
.dashboard-page .course-sidebar,
.dashboard-page .auth-card,
.dashboard-page .checkout-card {
  background: rgba(255, 250, 242, 0.9);
  border-color: rgba(7, 59, 41, 0.11);
  box-shadow: 0 18px 44px rgba(20, 45, 34, 0.08);
}

.dashboard-page .metric-card:hover,
.dashboard-page .workspace-card:hover,
.dashboard-page .table-card:hover {
  border-color: rgba(7, 59, 41, 0.18);
  transform: translateY(-3px);
}

.dashboard-page .dashboard-grid {
  grid-template-columns: minmax(0, 1fr) 370px;
  gap: 30px;
}

.dashboard-page .workspace-card.large,
.dashboard-page .table-card.large {
  padding: 30px;
}

.dashboard-page .grid-2 {
  gap: 20px;
}

.dashboard-page .note-box,
.dashboard-page .ai-box,
.dashboard-page .alert-card,
.dashboard-page .side-badge {
  background: linear-gradient(180deg, rgba(182, 234, 143, 0.16), rgba(249, 239, 224, 0.42));
  border-color: rgba(7, 59, 41, 0.1);
}

.dashboard-page .sidebar-nav a.active,
.dashboard-page .sidebar-nav a:hover,
.dashboard-page .filter-pills span.active,
.dashboard-page .filter-pills span:hover,
.dashboard-page .quick-prompt:hover {
  color: #163526;
  background: rgba(182, 234, 143, 0.22);
}

.dashboard-page .progress {
  background: rgba(7, 59, 41, 0.1);
}

.dashboard-page .progress i,
.dashboard-page .quick-prompt span {
  background: linear-gradient(135deg, #073b29, #78b25d);
}

.dashboard-page .task-board {
  grid-template-columns: repeat(3, minmax(310px, 1fr));
  gap: 24px;
  align-items: start;
}

.dashboard-page .task-board .workspace-card {
  min-width: 0;
  padding: 24px;
}

.dashboard-page .task-list {
  gap: 14px;
}

.dashboard-page .task-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas:
    "check text"
    "check actions";
  align-items: start;
  gap: 14px;
  padding: 14px;
}

.dashboard-page .task-check {
  grid-area: check;
}

.dashboard-page .task-text {
  grid-area: text;
  line-height: 1.35;
  overflow-wrap: normal;
  word-break: normal;
}

.dashboard-page .task-actions {
  grid-area: actions;
  flex-wrap: nowrap;
  justify-content: flex-start;
  gap: 8px;
}

.dashboard-page .task-check {
  min-width: 54px;
  text-align: center;
}

.dashboard-page .task-composer {
  gap: 10px;
}

.dashboard-page .upload-zone {
  border-color: rgba(7, 59, 41, 0.2);
  background: linear-gradient(180deg, rgba(182, 234, 143, 0.16), rgba(249, 239, 224, 0.38));
}

.dashboard-page .upload-zone.dragging,
.dashboard-page .pending-upload {
  border-color: rgba(7, 59, 41, 0.22);
  background: rgba(182, 234, 143, 0.15);
}

.dashboard-page .search-results {
  background: rgba(255, 250, 242, 0.98);
  border-color: rgba(7, 59, 41, 0.12);
}

.dashboard-page .search-results a:hover {
  background: rgba(182, 234, 143, 0.18);
}

@media (max-width: 1280px) {
  .dashboard-page .dashboard-wrap,
  .dashboard-page .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-page .sidebar {
    position: static;
  }

  .dashboard-page .task-board {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .home-page .medmi-hero-inner {
    padding: 56px 0 36px;
  }

  .home-page .medmi-card-row {
    margin-top: 30px;
    gap: 16px;
  }

  .home-page .medmi-feature-card {
    min-width: 270px;
  }

  .dashboard-page .container {
    width: min(calc(100% - 28px), 1500px);
  }

  .dashboard-page .stats-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-page .dashboard-top {
    align-items: stretch;
  }

  .dashboard-page .task-row {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .dashboard-page .task-actions,
  .dashboard-page .task-actions .mini-action,
  .dashboard-page .task-composer .btn {
    width: 100%;
  }
}

/* Soft member-area color correction */
body:not(.home-page),
.dashboard-page {
  background: #fff;
}

body:not(.home-page) .site-bg::before,
body:not(.home-page) .site-bg::after,
.dashboard-page .site-bg::before,
.dashboard-page .site-bg::after {
  opacity: 0.035;
  filter: blur(90px);
}

body:not(.home-page) .topbar,
.dashboard-page .topbar {
  background: rgba(255, 255, 255, 0.94);
  border-color: rgba(7, 59, 41, 0.08);
  box-shadow: 0 12px 30px rgba(20, 45, 34, 0.045);
}

.dashboard-page .metric-card,
.dashboard-page .workspace-card,
.dashboard-page .table-card,
.dashboard-page .sidebar,
.dashboard-page .course-sidebar,
.dashboard-page .auth-card,
.dashboard-page .checkout-card,
body:not(.home-page) .price-card,
body:not(.home-page) .auth-card,
body:not(.home-page) .checkout-card,
body:not(.home-page) .course-sidebar,
body:not(.home-page) .lesson-card,
body:not(.home-page) .payment-card,
body:not(.home-page) .glass-card {
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(7, 59, 41, 0.08);
  box-shadow: 0 14px 34px rgba(20, 45, 34, 0.055);
}

.dashboard-page .note-box,
.dashboard-page .ai-box,
.dashboard-page .alert-card,
.dashboard-page .side-badge,
body:not(.home-page) .side-badge,
body:not(.home-page) .cta-panel {
  background: linear-gradient(180deg, rgba(182, 234, 143, 0.08), rgba(255, 255, 255, 0.72));
  border-color: rgba(7, 59, 41, 0.075);
}

.dashboard-page .eyebrow,
.dashboard-page .status-pill,
.dashboard-page .task-check,
.dashboard-page .doc-pill,
.dashboard-page .lock-badge,
body:not(.home-page) .eyebrow,
body:not(.home-page) .status-pill,
body:not(.home-page) .doc-pill {
  color: #087054;
  background: rgba(182, 234, 143, 0.13);
  border-color: rgba(7, 59, 41, 0.1);
}

.dashboard-page .sidebar-nav a.active,
.dashboard-page .sidebar-nav a:hover,
.dashboard-page .filter-pills span.active,
.dashboard-page .filter-pills span:hover,
.dashboard-page .quick-prompt:hover {
  background: rgba(182, 234, 143, 0.12);
}

.dashboard-page .progress {
  background: rgba(7, 59, 41, 0.07);
}

.dashboard-page .search-bar,
.dashboard-page .field,
.dashboard-page .task-composer input,
.dashboard-page .chat-input-row,
body:not(.home-page) .field,
body:not(.home-page) .search-bar {
  background: #fff;
  border-color: rgba(7, 59, 41, 0.08);
}

/* Homepage imagery, soft section bands, and moving carousels */
.home-page .medmi-hero h1 {
  max-width: min(980px, 100%);
  font-size: clamp(3.4rem, 5.4vw, 6.25rem);
  line-height: 0.96;
}

.home-page .medmi-hero h1 em {
  display: inline;
}

.home-page .photo-visual {
  height: 150px;
  margin: 18px 0 20px;
  overflow: hidden;
  background: #f7f1e8;
}

.home-page .photo-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 52%, rgba(7, 59, 41, 0.18));
  pointer-events: none;
}

.home-page .photo-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
  transition: transform 0.45s ease;
}

.home-page .medmi-feature-card:hover .photo-visual img {
  transform: scale(1.08);
}

.claim-marquee {
  overflow: hidden;
  padding: 15px 0;
  color: #5e665d;
  background: #fbf8f1;
  border-top: 1px solid rgba(7, 59, 41, 0.1);
  border-bottom: 1px solid rgba(7, 59, 41, 0.1);
}

.claim-marquee-track {
  display: flex;
  width: max-content;
  gap: 34px;
  animation: claimMarquee 28s linear infinite;
  will-change: transform;
}

.claim-marquee span {
  display: inline-flex;
  align-items: center;
  gap: 34px;
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.claim-marquee span::before {
  content: "+";
  color: #8d8170;
}

.editorial-band {
  position: relative;
  padding: 112px 0 88px;
  background: #fbf8f1;
  border-bottom: 1px solid rgba(7, 59, 41, 0.08);
}

.editorial-band-alt {
  background: #f3f0e9;
}

.editorial-layout {
  display: grid;
  grid-template-columns: minmax(300px, 0.9fr) minmax(420px, 1.1fr);
  gap: 64px;
  align-items: center;
  max-width: 1040px;
}

.editorial-layout.reverse {
  grid-template-columns: minmax(420px, 1.1fr) minmax(300px, 0.9fr);
}

.editorial-layout.reverse .editorial-media-card {
  order: 2;
}

.editorial-media-card {
  display: grid;
  gap: 18px;
}

.editorial-media-card > img {
  width: 100%;
  aspect-ratio: 1 / 0.92;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 20px 52px rgba(20, 45, 34, 0.12);
}

.included-list {
  display: grid;
  gap: 7px;
  color: #405b4b;
  font-size: 0.82rem;
}

.included-list strong {
  margin-bottom: 2px;
  color: #173f2b;
  font-size: 0.88rem;
}

.included-list span {
  position: relative;
  padding-left: 18px;
}

.included-list span::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #16834a;
}

.editorial-copy {
  display: grid;
  justify-items: start;
  gap: 18px;
}

.editorial-kicker {
  color: #6b665d;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.editorial-copy h2 {
  max-width: 11ch;
  margin: 0;
  color: #121f19;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(2.9rem, 5.6vw, 5.4rem);
  line-height: 0.9;
  letter-spacing: 0;
}

.editorial-copy h2 em {
  color: #087044;
  font-style: normal;
}

.editorial-photo-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  width: min(100%, 330px);
}

.editorial-photo-pair img {
  width: 100%;
  aspect-ratio: 0.78 / 1;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 16px 34px rgba(20, 45, 34, 0.09);
}

.editorial-copy h3 {
  max-width: 42ch;
  margin: 8px 0 0;
  color: #163526;
  font-size: 1rem;
  line-height: 1.35;
}

.editorial-copy p {
  max-width: 54ch;
  margin: 0;
  color: #5f6e64;
  line-height: 1.65;
}

.editorial-mini-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  max-width: 720px;
  margin-top: 56px;
}

.editorial-mini-row article {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 12px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(7, 59, 41, 0.08);
  border-radius: 12px;
  box-shadow: 0 14px 34px rgba(20, 45, 34, 0.07);
}

.editorial-mini-row img {
  width: 96px;
  height: 78px;
  object-fit: cover;
  border-radius: 8px;
}

.editorial-mini-row strong {
  color: #163526;
  font-size: 0.96rem;
}

.editorial-mini-row p {
  margin: 4px 0 0;
  color: #607466;
  font-size: 0.84rem;
  line-height: 1.4;
}

.home-page .pricing-section,
.home-page .problem-section,
.home-page #solution,
.home-page #chatbot,
.home-page .testimonial-section,
.home-page .disclaimer,
.home-page .bottom-cta {
  clip-path: inset(0 -100vmax);
}

.home-page .pricing-section {
  background: #fbf8f1;
  box-shadow: 0 0 0 100vmax #fbf8f1;
}

.home-page .problem-section {
  background: #f6f3ed;
  box-shadow: 0 0 0 100vmax #f6f3ed;
}

.home-page #solution {
  background: #fbfaf6;
  box-shadow: 0 0 0 100vmax #fbfaf6;
}

.home-page .feature-grid.four-up {
  padding: 4px 0;
}

.home-page #chatbot {
  background: #f3f7f2;
  box-shadow: 0 0 0 100vmax #f3f7f2;
}

.home-page .disclaimer {
  background: #fbf8f1;
  box-shadow: 0 0 0 100vmax #fbf8f1;
}

.home-page .bottom-cta {
  background: #f7f4ee;
  box-shadow: 0 0 0 100vmax #f7f4ee;
}

.testimonial-section {
  overflow: hidden;
  padding: 82px 0 76px;
  background: #faf8f2;
  box-shadow: 0 0 0 100vmax #faf8f2;
  clip-path: inset(0 -100vmax);
}

.testimonial-marquee {
  overflow: hidden;
  width: 100%;
  margin-top: 28px;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.testimonial-track {
  display: flex;
  width: max-content;
  gap: 12px;
  animation: testimonialMarquee 36s linear infinite;
  will-change: transform;
}

.testimonial-card {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  width: 330px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(7, 59, 41, 0.08);
  border-radius: 18px;
  box-shadow: 0 12px 26px rgba(20, 45, 34, 0.06);
}

.testimonial-card img {
  width: 74px;
  height: 74px;
  object-fit: cover;
  border-radius: 14px;
}

.testimonial-card strong {
  color: #163526;
}

.testimonial-card p {
  margin: 4px 0 0;
  color: #607466;
  font-size: 0.86rem;
  line-height: 1.35;
}

.dashboard-page .tall-chat {
  min-height: auto;
}

.dashboard-page .ai-chat-card {
  align-self: start;
}

.dashboard-page #aiChat {
  margin-bottom: 16px;
}

@keyframes claimMarquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@keyframes testimonialMarquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (max-width: 820px) {
  .home-page .medmi-hero h1 {
    font-size: clamp(2.85rem, 13vw, 4.1rem);
  }

  .editorial-band {
    padding: 72px 0 58px;
  }

  .editorial-layout,
  .editorial-layout.reverse {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .editorial-layout.reverse .editorial-media-card {
    order: 0;
  }

  .editorial-copy h2 {
    max-width: 12ch;
    font-size: clamp(2.6rem, 15vw, 4rem);
  }

  .editorial-photo-pair {
    width: min(100%, 360px);
  }

  .editorial-mini-row {
    grid-template-columns: 1fr;
    margin-top: 34px;
  }

  .testimonial-card {
    width: 300px;
  }
}

/* Final homepage polish: full-width footer and cleaner story carousel */
.home-page .footer,
.footer {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  color: #f9efe0;
  background: #123f2b;
  border: 0;
  box-shadow: none;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  min-height: 150px;
  padding: 42px 0;
}

.footer strong {
  color: #fffaf2;
  font-size: 1.1rem;
}

.footer p {
  margin: 10px 0 0;
  color: rgba(249, 239, 224, 0.72);
}

.footer .footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}

.footer .footer-links a {
  color: rgba(249, 239, 224, 0.78);
}

.footer .footer-links a:hover {
  color: #fffaf2;
}

.testimonial-section {
  padding: 92px 0;
  background: #f7f4ee;
  box-shadow: 0 0 0 100vmax #f7f4ee;
}

.testimonial-showcase {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(360px, 1.1fr);
  gap: 34px;
  align-items: stretch;
  max-width: 1080px;
}

.testimonial-featured {
  padding: 34px;
  background: #fffaf2;
  border: 1px solid rgba(7, 59, 41, 0.09);
  border-radius: 24px;
  box-shadow: 0 20px 44px rgba(20, 45, 34, 0.08);
}

.testimonial-featured h2 {
  max-width: 12ch;
  margin: 18px 0;
  color: #163526;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(2.4rem, 4vw, 4rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.testimonial-featured p {
  max-width: 34ch;
  color: #4e6255;
  font-size: 1.05rem;
  line-height: 1.6;
}

.testimonial-person {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 24px;
}

.testimonial-person img {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: 18px;
}

.testimonial-person strong,
.testimonial-person span {
  display: block;
}

.testimonial-person span {
  margin-top: 2px;
  color: #607466;
}

.testimonial-rail {
  overflow: hidden;
  height: 430px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.46);
  border: 1px solid rgba(7, 59, 41, 0.07);
  border-radius: 24px;
  mask-image: linear-gradient(180deg, transparent, #000 10%, #000 90%, transparent);
}

.testimonial-rail-track {
  display: grid;
  gap: 14px;
  animation: testimonialRail 26s linear infinite;
  will-change: transform;
}

.testimonial-showcase .testimonial-card {
  display: block;
  width: auto;
  min-height: 92px;
  padding: 20px 22px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(7, 59, 41, 0.08);
  border-radius: 18px;
  box-shadow: 0 12px 28px rgba(20, 45, 34, 0.055);
}

.testimonial-showcase .testimonial-card strong {
  color: #163526;
  font-size: 1rem;
}

.testimonial-showcase .testimonial-card p {
  margin: 8px 0 0;
  color: #607466;
  font-size: 0.94rem;
  line-height: 1.45;
}

@keyframes testimonialRail {
  from { transform: translateY(0); }
  to { transform: translateY(-50%); }
}

@media (max-width: 820px) {
  .footer-inner,
  .testimonial-showcase {
    display: grid;
    grid-template-columns: 1fr;
  }

  .footer-inner {
    min-height: auto;
    padding: 34px 0;
  }

  .testimonial-section {
    padding: 68px 0;
  }

  .testimonial-featured {
    padding: 26px;
  }

  .testimonial-rail {
    height: 340px;
  }
}
