:root {
  --bg: #f5f3ee;
  --surface: #fffdfa;
  --surface-soft: #eef3fb;
  --ink: #10223e;
  --muted: #5c6e85;
  --line: #d6ddeb;
  --accent: rgb(22, 82, 240);
  --accent-soft: #e6f2ff;
  --dark: #101828;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: "Manrope", "Avenir Next", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 90% -10%, #ddeeff 0%, transparent 40%),
    radial-gradient(circle at -10% 30%, #eaf7ef 0%, transparent 30%),
    var(--bg);
}

h1, h2, h3 {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  letter-spacing: -0.01em;
}

p { margin: 0; }
a { color: var(--ink); text-decoration: none; }

button {
  font-family: "Manrope", "Avenir Next", "Segoe UI", sans-serif;
}

main {
  flex: 1 0 auto;
}

.container {
  width: min(1120px, 92vw);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(8px);
  background: color-mix(in srgb, var(--bg), transparent 20%);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
}

.brand {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  font-weight: 700;
}

.logo {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: #fff;
  font-size: 12px;
}

.nav-links {
  display: flex;
  gap: 16px;
  font-size: 14px;
  color: var(--muted);
}

.nav-links a { color: var(--muted); }
.nav-links a:hover { color: var(--ink); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  border-radius: 0.5rem;
  padding: 11px 18px;
  font-weight: 700;
  font-family: "Manrope", "Avenir Next", "Segoe UI", sans-serif;
  transition: transform 180ms ease, box-shadow 220ms ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(22, 82, 240, 0.28);
}

.btn-sm {
  padding: 8px 14px;
  font-size: 13px;
}

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}

.btn-invert {
  background: #fff;
  border-color: #fff;
  color: #0f1728;
}

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

.hero {
  padding: 72px 0 44px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 20px;
  align-items: center;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 12px;
}

h1 {
  font-size: clamp(2rem, 4vw, 3.3rem);
  line-height: 1.08;
  margin-bottom: 14px;
}

.hero-copy {
  color: var(--muted);
  max-width: 60ch;
  font-size: 1.05rem;
  margin-bottom: 18px;
  line-height: 1.5;
}

.hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.hero-card {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: 0 10px 24px rgba(16, 34, 62, 0.08);
  padding: 16px;
}

.hero-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid var(--line);
  margin-bottom: 12px;
}

.hero-card h2 {
  font-size: 1.45rem;
  margin-bottom: 10px;
}

.hero-card ul {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
  color: var(--muted);
}

.section {
  padding: 58px 0;
}

.section.alt {
  background: color-mix(in srgb, var(--surface-soft), transparent 14%);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  margin-bottom: 10px;
}

.section-copy {
  color: var(--muted);
  margin-bottom: 18px;
}

.section-copy-light {
  color: #c8d1df;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 14px;
  margin-bottom: 16px;
}

.cards {
  display: grid;
  gap: 14px;
}

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

.card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  padding: 16px;
  box-shadow: 0 6px 18px rgba(16, 34, 62, 0.06);
}

.card h3 {
  font-size: 1.12rem;
  margin-bottom: 10px;
}

.card p {
  color: var(--muted);
  line-height: 1.5;
}

.services-grid {
  margin-top: 14px;
}

.service-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.service-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 10px;
}

.post {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  overflow: hidden;
}

.post .meta {
  color: #406086;
  font-size: 12px;
  font-weight: 700;
}

.post-topline {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.post-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

.post-body {
  padding: 14px;
}

.post a {
  display: inline-block;
  margin-top: 12px;
  color: var(--accent);
  font-weight: 700;
}

.home-post {
  box-shadow: 0 8px 20px rgba(16, 34, 62, 0.06);
}

.mentoring-section {
  background: var(--dark);
}

.mentoring-section h2,
.mentoring-section .eyebrow {
  color: #fff;
}

.mentoring-card {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.mentoring-card p,
.mentoring-card li,
.mentoring-card .price {
  color: #d1d9e5;
}

.mentoring-card ul {
  margin: 0 0 14px;
  padding-left: 18px;
  display: grid;
  gap: 6px;
}

.featured-mentoring {
  background: linear-gradient(160deg, #007fff 0%, #2f91ff 100%);
  border-color: #4ea5ff;
}

.featured-mentoring p,
.featured-mentoring li,
.featured-mentoring .price {
  color: #eef6ff;
}

.newsletter-wrap {
  background: #ffffff;
}

.newsletter-shell {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  border: 1px solid #1f2b3f;
  background: #0f1728;
  color: #fff;
  padding: clamp(26px, 4vw, 48px);
  text-align: center;
}

.newsletter-shell h2 {
  color: #fff;
  margin-bottom: 10px;
}

.newsletter-shell p {
  color: #bcc7d9;
  max-width: 640px;
  margin: 0 auto 18px;
}

.newsletter-form {
  display: flex;
  gap: 10px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.newsletter-form input {
  width: min(420px, 88vw);
  border: 1px solid #2a3a55;
  border-radius: 999px;
  padding: 12px 14px;
  font-size: 15px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.newsletter-form input::placeholder {
  color: #8ea0bc;
}

.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding: 20px 0 28px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.footer-inner div {
  display: flex;
  gap: 14px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* About page */
.about-page {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 20px;
  align-items: center;
}

.about-copy {
  display: grid;
  gap: 14px;
}

.about-copy p {
  color: var(--muted);
  line-height: 1.6;
}

.about-media-wrap {
  position: relative;
}

.about-media {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 24px;
  border: 1px solid var(--line);
  position: relative;
  z-index: 1;
}

.blob {
  position: absolute;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  filter: blur(30px);
  z-index: 0;
}

.blob-a {
  background: #d6ecff;
  right: -40px;
  bottom: -30px;
}

.blob-b {
  background: #d9f5e8;
  left: -40px;
  top: -30px;
}

/* Lab pages */
.lab-title {
  margin-bottom: 12px;
}

.lab-hero-block {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 18px;
  align-items: stretch;
  margin-bottom: 18px;
}

.lab-hero-media {
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  min-height: 320px;
  box-shadow: 0 10px 24px rgba(16, 34, 62, 0.08);
}

.lab-hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.lab-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  margin-bottom: 16px;
}

.lab-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  background: #fff;
  color: var(--ink);
  font-weight: 500;
  cursor: pointer;
}

.chip.is-active {
  border-color: #9bc9ff;
  background: #e9f4ff;
}

.featured-post {
  margin-bottom: 16px;
}

.featured-post-card {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 0;
  background: #0f1728;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid #20304a;
}

.featured-media-wrap img {
  width: 100%;
  height: 100%;
  min-height: 280px;
  object-fit: cover;
  display: block;
}

.featured-content {
  padding: 20px;
}

.featured-content .meta,
.featured-content p {
  color: #c5d1e2;
}

.featured-content h3 {
  color: #fff;
  font-size: 1.65rem;
  margin: 8px 0;
}

.post-layout {
  max-width: 760px;
}

.post-layout h1 {
  margin: 10px 0;
}

.post-cover {
  width: 100%;
  max-height: 380px;
  object-fit: cover;
  border-radius: 12px;
  margin: 12px 0 14px;
  border: 1px solid var(--line);
}

.post-content {
  margin-top: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 14px;
  padding: 18px;
  color: var(--ink);
  line-height: 1.7;
}

.post-content p {
  margin: 0 0 12px;
}


.post-content img,
.post-content picture,
.post-content figure img {
  max-width: 100% !important;
  width: 100% !important;
  height: auto !important;
  display: block;
  margin: 12px 0;
  border-radius: 10px;
}

.post-content figure {
  margin: 14px 0;
  max-width: 100% !important;
}

.post-content iframe,
.post-content video {
  max-width: 100% !important;
  width: 100% !important;
  height: auto;
}

@media (max-width: 980px) {
  .hero-grid,
  .cards-4,
  .cards-3,
  .about-page,
  .featured-post-card,
  .lab-hero-block {
    grid-template-columns: 1fr;
  }

  .nav-links {
    display: none;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .section-head,
  .lab-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }
}


/* Mentoring page (Figma Make match) */
.page-mentoring {
  background: #ffffff;
}

.mentoring-make {
  background: #0b1730;
  padding: 88px 0 66px;
}

.mentoring-wrap {
  max-width: 1320px;
}

.mentoring-head {
  max-width: 980px;
}

.page-mentoring .mentoring-head .eyebrow {
  color: #f1f5f9;
  margin-bottom: 12px;
}

.mentoring-head h1 {
  color: #f8fbff;
  font-size: clamp(2.3rem, 4.2vw, 4.4rem);
  line-height: 1.05;
  margin: 0 0 16px;
}

.mentoring-head p {
  color: #cbd5e1;
  font-size: 1.04rem;
  margin: 0;
  max-width: 980px;
}

.mentoring-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 22px;
}

.mentoring-package {
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  padding: 20px;
  color: #e2e8f0;
}

.mentoring-package h3 {
  color: #ffffff;
  font-size: 2rem;
  margin: 0 0 10px;
}

.mentoring-package .sub {
  color: #d4dde8;
  margin-bottom: 4px;
  font-size: 1.04rem;
}

.mentoring-package ul {
  margin: 0 0 16px;
  padding-left: 20px;
  display: grid;
  gap: 6px;
}

.mentoring-package li {
  color: #e6edf7;
  font-size: 1.04rem;
}

.mentoring-package.featured {
  background: linear-gradient(140deg, #1f7ef1 0%, #3190f8 100%);
  border-color: rgba(255, 255, 255, 0.22);
}

.pill-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 11px 16px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #f1f5f9;
  background: transparent;
  font-weight: 700;
}

.featured-btn {
  background: #ffffff;
  color: #0f1728;
  border-color: #ffffff;
}

@media (max-width: 1120px) {
  .mentoring-grid {
    grid-template-columns: 1fr;
  }
}


/* Mentoring page v2 (single package like Figma Make preview) */
.page-mentoring.v2 {
  background: #f8fafc;
}

.page-mentoring.v2 .mentor-main {
  padding: 24px 0 72px;
}

.page-mentoring.v2 .mentor-hero {
  text-align: center;
  max-width: 980px;
  margin: 0 auto 30px;
}

.page-mentoring.v2 .badge {
  display: inline-flex;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.92rem;
  font-weight: 700;
  padding: 8px 14px;
  margin-bottom: 14px;
}

.page-mentoring.v2 .mentor-hero h1 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #12151f;
  margin: 0 0 12px;
  font-size: clamp(2.6rem, 5vw, 5.1rem);
}

.page-mentoring.v2 .lead {
  color: #4b5563;
  font-size: 1.05rem;
  margin-bottom: 10px;
}

.page-mentoring.v2 .muted {
  color: #9ca3af;
  font-size: 1.02rem;
  font-weight: 600;
}

.page-mentoring.v2 .single-package {
  max-width: 980px;
  margin: 0 auto;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.12);
  background: #fff;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.page-mentoring.v2 .pack-left {
  background: #11131d;
  color: #f8fafc;
  padding: 44px 48px;
}

.page-mentoring.v2 .pack-left h3 {
  font-family: "Fraunces", Georgia, serif;
  font-size: 2rem;
  margin: 0 0 8px;
}

.page-mentoring.v2 .pack-left p {
  color: #c5cedc;
  margin: 0 0 22px;
  font-size: 1.03rem;
}

.page-mentoring.v2 .price {
  font-family: "Manrope", sans-serif;
  font-size: clamp(2.4rem, 4vw, 3.4rem);
  font-weight: 800;
  margin: 0 0 24px;
  letter-spacing: -0.03em;
}

.page-mentoring.v2 .price span {
  font-size: 1.35rem;
  font-weight: 600;
  color: #d1d5db;
}

.page-mentoring.v2 .cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  background: var(--accent);
  color: #ffffff;
  font-weight: 800;
  font-size: 1.08rem;
  padding: 14px 24px;
}

.page-mentoring.v2 .pack-left small {
  display: block;
  color: #8c94a4;
  margin-top: 16px;
  font-size: 0.95rem;
}

.page-mentoring.v2 .pack-right {
  background: #ffffff;
  color: #111827;
  padding: 44px 48px;
}

.page-mentoring.v2 .pack-right h4 {
  margin: 0 0 16px;
  font-size: 1.55rem;
  font-family: "Fraunces", Georgia, serif;
  font-weight: 700;
}

.page-mentoring.v2 .pack-right ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 14px;
}

.page-mentoring.v2 .pack-right li {
  position: relative;
  padding-left: 34px;
  font-size: 1.08rem;
  color: #1f2937;
}

.page-mentoring.v2 .pack-right li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0.1rem;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #e8fff2;
  color: #16a34a;
  font-size: 0.9rem;
  font-weight: 800;
  display: grid;
  place-items: center;
}

.page-mentoring.v2 .why-one {
  max-width: 820px;
  margin: 74px auto 0;
  text-align: center;
}

.page-mentoring.v2 .why-one h2 {
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(2rem, 3.2vw, 2.9rem);
  font-weight: 700;
  color: #131722;
  margin: 0 0 14px;
}

.page-mentoring.v2 .why-one p {
  margin: 0 auto 18px;
  color: #4b5563;
  font-size: 1.15rem;
  line-height: 1.7;
}

.page-mentoring.v2 .why-one strong {
  color: #111827;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.4rem;
  font-weight: 700;
}

@media (max-width: 980px) {
  .page-mentoring.v2 .single-package {
    grid-template-columns: 1fr;
  }

  .page-mentoring.v2 .pack-left,
  .page-mentoring.v2 .pack-right {
    padding: 28px 24px;
  }
}


/* Course page (Figma Make /demo structure) */
.course-page {
  background: #f7f8fb;
}

.course-hero {
  padding: 86px 0 64px;
  border-bottom: 1px solid #e5e7eb;
  background: #ffffff;
}

.course-hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 34px;
  align-items: center;
}

.course-page h1 {
  font-family: "Manrope", sans-serif;
  font-size: clamp(2.3rem, 4.7vw, 4.3rem);
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin: 0 0 14px;
}

.course-page .lead {
  font-size: 1.2rem;
  color: #6b7280;
  margin-bottom: 16px;
}

.course-page .hero-actions .note {
  color: #9ca3af;
  font-size: 0.9rem;
}

.course-mockup {
  position: relative;
  border-radius: 28px;
  background: #0b1020;
  color: #fff;
  border: 1px solid #1f2937;
  min-height: 480px;
  padding: 20px;
}

.mock-tag { color: #fb923c; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.14em; }
.mock-balance { font-size: 2.2rem; font-weight: 800; margin: 10px 0 18px; }
.mock-list div { display: flex; justify-content: space-between; border-top: 1px solid #1f2937; padding: 10px 0; color: #d1d5db; }
.mock-intent { margin-top: auto; background: rgba(31,41,55,.88); border: 1px solid #374151; border-radius: 999px; padding: 10px 12px; display: flex; justify-content: space-between; color: #d1d5db; }
.mock-intent .go { background: #f97316; color: #fff; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; }

.mock-popup {
  position: absolute;
  left: 50%;
  top: 52%;
  transform: translate(-50%, -50%);
  width: min(280px, 86%);
  background: #030712;
  border: 1px solid #374151;
  border-radius: 16px;
  padding: 14px;
  text-align: center;
}

.mock-popup h4 { margin: 0 0 8px; font-family: "Manrope", sans-serif; }
.mock-popup pre { margin: 0 0 10px; background: #111827; color: #34d399; border: 1px solid #1f2937; border-radius: 10px; padding: 8px; text-align: left; font-size: 11px; }
.mock-popup button { border: 0; border-radius: 999px; background: #f97316; color: #fff; font-weight: 700; padding: 8px 14px; }

.course-problems, .course-compare { padding: 72px 0; }
.course-problems h2, .course-compare h2 { text-align: center; font-family: "Manrope", sans-serif; font-size: clamp(1.8rem, 3.2vw, 3rem); margin: 0 0 24px; }
.course-compare-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.course-compare-grid article small { display: block; margin-bottom: 8px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; color: #9ca3af; }
.before-box, .after-box { min-height: 250px; border-radius: 20px; border: 1px solid #d1d5db; display: grid; place-items: center; text-align: center; padding: 24px; font-weight: 600; }
.before-box { background: #f3f4f6; color: #4b5563; }
.after-box { background: #0b1020; color: #fff; border-color: #1f2937; }

.course-cta {
  padding: 84px 0;
  background: #0b1020;
  color: #fff;
  text-align: center;
}

.course-cta h2 { font-family: "Manrope", sans-serif; font-size: clamp(2rem, 4vw, 3.6rem); margin: 0 0 12px; }
.course-cta p { color: #9ca3af; font-size: 1.1rem; margin: 0 0 18px; }
.course-cta small { display: block; margin-top: 14px; color: #6b7280; }

@media (max-width: 980px) {
  .course-hero-grid,
  .course-compare-grid {
    grid-template-columns: 1fr;
  }
}


/* Course page spacing refinement (Figma-like layout, brand typography/colors kept) */
.course-page .site-header {
  background: #ffffff;
}

.course-hero {
  padding: 108px 0 86px;
}

.course-hero-grid {
  grid-template-columns: 1.08fr 0.92fr;
  gap: 44px;
}

.course-page h1 {
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(2.4rem, 5vw, 4.8rem);
  line-height: 1.04;
  letter-spacing: -0.012em;
  margin: 0 0 16px;
}

.course-page .lead {
  max-width: 62ch;
  margin-bottom: 22px;
}

.course-page .hero-actions {
  align-items: center;
  gap: 14px;
}

.course-page .hero-actions .note {
  margin: 0;
}

.course-mockup {
  min-height: 520px;
  padding: 24px;
  border-radius: 30px;
}

.mock-balance {
  margin: 12px 0 22px;
}

.mock-list {
  margin-bottom: 14px;
}

.mock-popup {
  top: 56%;
  width: min(300px, 88%);
}

.course-problems {
  padding: 96px 0 84px;
}

.course-problems h2,
.course-compare h2 {
  font-family: "Fraunces", Georgia, serif;
  margin-bottom: 30px;
}

.course-problems .cards {
  gap: 18px;
}

.course-problems .card {
  padding: 22px;
  border-radius: 20px;
}

.course-problems .card h3 {
  margin-bottom: 12px;
}

.course-compare {
  padding: 88px 0;
  border-top: 1px solid #e5e7eb;
  background: #ffffff;
}

.course-compare-grid {
  gap: 22px;
}

.before-box,
.after-box {
  min-height: 320px;
  border-radius: 24px;
}

.course-cta {
  padding: 108px 0;
}

.course-cta h2 {
  font-family: "Fraunces", Georgia, serif;
  margin-bottom: 14px;
}

.course-cta p {
  margin-bottom: 24px;
}

.course-cta .btn {
  min-width: 220px;
}

@media (max-width: 980px) {
  .course-hero {
    padding: 72px 0 58px;
  }

  .course-hero-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .course-mockup {
    min-height: 430px;
  }

  .course-problems,
  .course-compare,
  .course-cta {
    padding: 64px 0;
  }
}


/* Course page strict spacing alignment (Figma /demo), keep brand typography + CTA color */
.course-page {
  background: #f8fafc;
}

.course-page .site-header {
  background: #ffffff;
}

.course-page .course-hero,
.course-page .course-problems,
.course-page .course-compare,
.course-page .course-cta {
  position: relative;
}

.course-page .course-hero .container,
.course-page .course-problems .container,
.course-page .course-compare .container,
.course-page .course-cta .container {
  width: min(1280px, 92vw);
}

/* Hero: align with Figma /demo text hierarchy */
.course-page .course-hero {
  padding: 128px 0 84px;
  border-bottom: 1px solid #e5e7eb;
  background: #f8fafc;
}

.course-page .course-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, 0.94fr);
  gap: 64px;
  align-items: center;
}

.course-page h1 {
  margin: 0 0 26px;
  line-height: 1.03;
  letter-spacing: -0.02em;
  font-size: clamp(3.6rem, 7vw, 6.2rem);
  max-width: 11ch;
}

.course-page .hero-subtitle {
  margin: 0 0 24px;
  font-family: "Manrope", "Avenir Next", "Segoe UI", sans-serif;
  font-size: clamp(1.75rem, 2.5vw, 3rem);
  line-height: 1.2;
  font-weight: 700;
  color: #171923;
}

.course-page .course-hero .lead {
  margin: 0 0 40px;
  max-width: 28ch;
  font-size: clamp(1.1rem, 1.55vw, 1.9rem);
  line-height: 1.45;
  color: #6b7280;
}

.course-page .hero-actions {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 16px;
}

.course-page .hero-actions .note {
  margin: 0;
  font-size: clamp(1rem, 1.2vw, 1.2rem);
  color: #8d92a0;
  font-weight: 600;
}

.course-page .course-mockup {
  min-height: 480px;
  border-radius: 32px;
  padding: 24px;
}

/* Problems: py-24 */
.course-page .course-problems {
  padding: 96px 0;
  background: #f8fafc;
}

.course-page .course-problems h2,
.course-page .course-compare h2 {
  margin: 0 0 64px;
  text-align: center;
  font-size: clamp(1.9rem, 3.2vw, 2.85rem);
}

.course-page .course-problems .cards {
  gap: 32px;
}

.course-page .course-problems .card {
  padding: 32px;
  border-radius: 18px;
}

/* Process section replaces compare: keep spacing equivalent to py-24 */
.course-page .course-compare {
  padding: 96px 0;
  border-top: 1px solid #e5e7eb;
  background: #ffffff;
}

.course-page .course-compare .card {
  max-width: 920px;
  margin: 0 auto;
  padding: 32px;
  border-radius: 18px;
}

.course-page .course-compare ol {
  margin: 0 0 20px;
  padding-left: 24px;
  display: grid;
  gap: 12px;
}

.course-page .course-compare p {
  margin: 0;
  font-size: 1.05rem;
  color: #4b5563;
}

/* Beyond the Intensive (Figma spacing/layout) */
.course-page .course-beyond {
  padding: 96px 0 104px;
}

.course-page .course-beyond .container {
  max-width: 1000px;
  text-align: center;
}

.course-page .course-beyond h2 {
  margin: 0 0 22px;
  font-family: "Fraunces", Georgia, serif;
  letter-spacing: -0.01em;
  font-size: clamp(1.9rem, 2.6vw, 3.1rem);
  line-height: 1.08;
  color: #171923;
}

.course-page .course-beyond .lead {
  max-width: 980px;
  margin: 0 auto 44px;
  color: #5b5f6b;
  font-size: clamp(1.02rem, 1.35vw, 1.28rem);
  line-height: 1.45;
}

.course-page .course-beyond .beyond-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 64px;
  padding: 0 40px;
  border: 1px solid #d8dbe2;
  border-radius: 999px;
  background: #f8f8fa;
  color: #666b78;
  font-family: "Manrope", "Avenir Next", "Segoe UI", sans-serif;
  font-size: clamp(0.98rem, 1.1vw, 1.2rem);
  font-weight: 600;
  line-height: 1.2;
  margin: 0;
}

/* Final CTA: py-32 */
.course-page .course-cta {
  padding: 128px 0;
  background: #0b1020;
  color: #ffffff;
  text-align: center;
}

.course-page .course-cta h2 {
  margin: 0 0 24px;
  font-size: clamp(2.4rem, 4.8vw, 4rem);
  line-height: 1.1;
}

.course-page .course-cta p {
  margin: 0 0 40px;
  font-size: 1.25rem;
  color: #9ca3af;
}

.course-page .course-cta .btn {
  min-width: 220px;
}

.course-page .course-cta small {
  display: block;
  margin-top: 16px;
  color: #6b7280;
  font-size: 0.9rem;
}

@media (max-width: 1024px) {
  .course-page .course-hero {
    padding: 96px 0 64px;
  }

  .course-page .course-hero-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .course-page .hero-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .course-page .hero-subtitle {
    margin-bottom: 16px;
    font-size: clamp(1.45rem, 4.2vw, 2rem);
  }

  .course-page .course-hero .lead {
    max-width: none;
    font-size: 1.04rem;
    line-height: 1.5;
  }

  .course-page .course-problems,
  .course-page .course-compare,
  .course-page .course-beyond,
  .course-page .course-cta {
    padding: 72px 0;
  }

  .course-page .course-problems h2,
  .course-page .course-compare h2 {
    margin-bottom: 40px;
  }
}


/* Course 7-day steps block (Figma-like rows) */
.course-page .course-steps {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  gap: 22px;
}

.course-page .step-row {
  min-height: 112px;
  border-radius: 22px;
  border: 1px solid #e5e7eb;
  background: #f8fafc;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 0 32px;
}

.course-page .step-icon {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #e6f2ff;
  color: var(--accent);
  border: 1px solid #c7defc;
  font-weight: 800;
  line-height: 1;
}

.course-page .step-row p {
  margin: 0;
  font-family: "Manrope", sans-serif;
  font-size: clamp(1.12rem, 1.32vw, 1.65rem);
  line-height: 1.2;
  font-weight: 700;
  color: #171923;
}

.course-page .steps-note {
  max-width: 960px;
  margin: 58px auto 0;
  text-align: center;
  color: #6b7280;
  font-size: clamp(1.15rem, 1.7vw, 1.9rem);
  line-height: 1.35;
}

@media (max-width: 1024px) {
  .course-page .course-steps {
    gap: 16px;
  }

  .course-page .step-row {
    min-height: 86px;
    border-radius: 16px;
    gap: 14px;
    padding: 0 16px;
  }

  .course-page .step-icon {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
    font-size: 0.85rem;
  }

  .course-page .step-row p {
    font-size: 1.02rem;
  }

  .course-page .steps-note {
    margin-top: 48px !important;
    font-size: 1.02rem;
  }
}


@media (max-width: 768px) {
  .course-page .course-beyond {
    padding: 68px 0 78px;
  }

  .course-page .course-beyond .lead {
    margin-bottom: 28px;
    font-size: 1.1rem;
  }

  .course-page .course-beyond .beyond-pill {
    width: 100%;
    min-height: 58px;
    padding: 0 18px;
    font-size: 1.06rem;
  }
}

/* Final override: Figma /demo typography + centering alignment */
.course-page .course-hero {
  background: #f8fafc;
}

.course-page .course-hero-grid > div {
  max-width: 760px;
}

.course-page .course-hero h1 {
  font-family: "Manrope", "Avenir Next", "Segoe UI", sans-serif;
  font-weight: 800;
  font-size: clamp(3.2rem, 5.8vw, 5.6rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  max-width: 9.2ch;
  margin: 0 0 24px;
}

.course-page .course-hero .hero-subtitle {
  font-size: clamp(1.6rem, 2.5vw, 2.35rem);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 22px;
}

.course-page .course-hero .lead {
  font-size: clamp(1rem, 1.02vw, 1.22rem);
  line-height: 1.45;
  max-width: 34ch;
  margin: 0 0 36px;
}

.course-page .course-hero .hero-actions {
  gap: 28px;
}

.course-page .course-problems h2,
.course-page .course-compare h2,
.course-page .course-beyond h2 {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.course-page .course-problems .lead,
.course-page .course-compare .lead,
.course-page .course-beyond .lead,
.course-page .steps-note {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 1024px) {
  .course-page .course-hero h1 {
    font-size: clamp(2.7rem, 9vw, 4.2rem);
    max-width: none;
  }

  .course-page .course-hero .hero-subtitle {
    font-size: clamp(1.35rem, 4.8vw, 1.9rem);
  }

  .course-page .course-hero .lead {
    font-size: 1.05rem;
    max-width: none;
  }
}

/* Final override: Beyond section matches Figma composition */
.course-page .course-beyond {
  padding: 136px 0 150px;
  background: #f8fafc;
  border-top: 1px solid #e5e7eb;
}

.course-page .course-beyond .container {
  max-width: 1040px;
  text-align: center;
}

.course-page .course-beyond h2 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 800;
  font-size: clamp(3rem, 5vw, 4.8rem);
  line-height: 1.06;
  letter-spacing: -0.02em;
  margin: 0 0 34px;
}

.course-page .course-beyond .lead {
  max-width: 1100px;
  margin: 0 auto 54px;
  font-family: "Manrope", "Avenir Next", "Segoe UI", sans-serif;
  font-size: clamp(1.05rem, 1.1vw, 1.25rem);
  line-height: 1.4;
  color: #5b5f6b;
}

.course-page .course-beyond .beyond-stack {
  margin: 0 auto 52px;
  font-family: "Manrope", "Avenir Next", "Segoe UI", sans-serif;
  font-size: clamp(1.2rem, 1.5vw, 1.6rem);
  line-height: 1.45;
  font-weight: 700;
  color: #171923;
}

.course-page .course-beyond .beyond-outro {
  margin: 0 auto;
  font-family: "Manrope", "Avenir Next", "Segoe UI", sans-serif;
  font-size: clamp(1.05rem, 1.1vw, 1.25rem);
  line-height: 1.4;
  color: #5b5f6b;
}

@media (max-width: 1024px) {
  .course-page .course-beyond {
    padding: 80px 0 92px;
  }

  .course-page .course-beyond h2 {
    margin-bottom: 22px;
  }

  .course-page .course-beyond .lead {
    margin-bottom: 26px;
    font-size: 1.05rem;
  }

  .course-page .course-beyond .beyond-stack {
    margin-bottom: 26px;
    font-size: 1.2rem;
    line-height: 1.5;
  }

  .course-page .course-beyond .beyond-outro {
    font-size: 1.05rem;
  }
}

/* Final override: 7-day section spacing matches Figma */
.course-page .course-compare h2 {
  margin: 0 0 22px;
}

.course-page .course-compare .lead {
  margin: 0 auto 40px;
  max-width: 720px;
  font-size: clamp(1.05rem, 1.15vw, 1.32rem);
  line-height: 1.4;
  color: #5f6573;
}

.course-page .course-steps {
  gap: 24px;
}

.course-page .steps-note {
  display: block;
  margin: 96px auto 0 !important;
  max-width: 760px;
  font-size: clamp(1.05rem, 1.15vw, 1.28rem);
  line-height: 1.35;
  color: #616776;
}

@media (max-width: 1024px) {
  .course-page .course-compare .lead {
    margin-bottom: 24px;
    font-size: 1.02rem;
  }

  .course-page .steps-note {
    margin-top: 34px;
    font-size: 1.02rem;
  }
}


/* Final override: hero note/body scale fix for large screens */
.course-page .course-hero .hero-actions .note {
  font-size: clamp(0.98rem, 0.95vw, 1.08rem);
  line-height: 1.35;
  font-weight: 500;
}

@media (min-width: 1440px) {
  .course-page .course-hero .lead {
    font-size: 1.16rem;
  }

  .course-page .course-hero .hero-actions .note {
    font-size: 1rem;
  }
}

/* Lab page: Figma blog top area alignment (keep brand fonts) */
.lab-hero-block {
  grid-template-columns: 1fr;
  gap: 0;
  margin-bottom: 26px;
}

.lab-hero-block > div:first-child {
  max-width: 980px;
}

.lab-title {
  margin: 8px 0 14px;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(2.3rem, 4.8vw, 4.6rem);
  line-height: 1.06;
  letter-spacing: -0.01em;
}

.lab-hero-block .hero-copy {
  max-width: 780px;
  margin: 0;
  color: #5c6e85;
  font-size: clamp(1.05rem, 1.4vw, 1.75rem);
  line-height: 1.45;
}

.lab-toolbar {
  background: #fffdfa;
  border-radius: 24px;
  border: 1px solid var(--line);
  padding: 20px 24px;
  margin-bottom: 28px;
}

.lab-toolbar strong {
  display: block;
  margin-bottom: 4px;
}

.lab-toolbar .meta {
  margin: 0;
}

@media (max-width: 980px) {
  .lab-title {
    font-size: clamp(2rem, 8.8vw, 2.9rem);
  }

  .lab-hero-block .hero-copy {
    font-size: 1.05rem;
  }

  .lab-toolbar {
    padding: 16px;
    margin-bottom: 20px;
  }
}

/* Lab page: Figma /blog content and filter layout */
.lab-hero-block {
  display: block;
  margin: 8px 0 46px;
}

.lab-hero-block > div:first-child {
  max-width: 1080px;
}

.lab-kicker {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 28px;
}

.lab-badge {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  background: #ffe9cf;
  color: #a03f06;
  font-family: "Manrope", "Avenir Next", "Segoe UI", sans-serif;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
}

.lab-kicker-tail {
  color: #6b7280;
  font-size: clamp(1.35rem, 1.8vw, 2.8rem);
  font-weight: 500;
}

.lab-title {
  margin: 0 0 26px;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(3.1rem, 6.2vw, 7.8rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
}

.lab-title-accent {
  color: #ff6a00;
}

.lab-hero-block .hero-copy {
  max-width: 1120px;
  margin: 0;
  color: #5b5f6b;
  font-size: clamp(1.35rem, 2vw, 3rem);
  line-height: 1.5;
}

.lab-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin: 0 0 34px;
  padding: 0 0 20px;
  border: 0;
  border-radius: 0;
  background: transparent;
  border-bottom: 1px solid #d9dce2;
  box-shadow: none;
}

.lab-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.lab-toolbar .chip {
  border: 1px solid #eceef2;
  background: #f9fafb;
  color: #4f5460;
  border-radius: 999px;
  min-height: 52px;
  padding: 0 24px;
  font-size: clamp(1.1rem, 1.4vw, 2rem);
  font-weight: 600;
}

.lab-toolbar .chip.is-active {
  background: #11131b;
  border-color: #11131b;
  color: #ffffff;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.14);
}

.lab-search {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 350px;
  height: 52px;
  padding: 0 18px;
  border: 1px solid #eceef2;
  border-radius: 999px;
  background: #f9fafb;
  color: #959baa;
}

.lab-search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  color: #616776;
}

.lab-search input::placeholder {
  color: #9ca3af;
}

@media (max-width: 1100px) {
  .lab-badge {
    min-height: 36px;
    padding: 0 14px;
    font-size: 1.2rem;
  }

  .lab-kicker-tail {
    font-size: 1.06rem;
  }

  .lab-title {
    font-size: clamp(2.4rem, 9vw, 4rem);
  }

  .lab-hero-block .hero-copy {
    font-size: 1.15rem;
  }

  .lab-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }

  .lab-toolbar .chip {
    min-height: 40px;
    padding: 0 16px;
    font-size: 1rem;
  }

  .lab-search {
    min-width: 0;
    width: 100%;
    height: 44px;
  }
}

/* Final override: Lab desktop scale fix */
@media (min-width: 1200px) {
  .lab-badge {
    min-height: 40px;
    padding: 0 18px;
    font-size: 1rem;
  }

  .lab-kicker-tail {
    font-size: 1rem;
  }

  .lab-title {
    font-size: 4.25rem;
    line-height: 1;
  }

  .lab-hero-block .hero-copy {
    font-size: 1.1rem;
    line-height: 1.5;
    max-width: 900px;
  }

  .lab-toolbar .chip {
    font-size: 1rem;
    min-height: 46px;
    padding: 0 20px;
  }

  .lab-search,
  .lab-search input {
    font-size: 1rem;
  }
}

/* Lab chatbot (Figma Make-style floating assistant) */
.lab-chat {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 50;
}

.lab-chat-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #11131b;
  background: #11131b;
  color: #fff;
  border-radius: 999px;
  height: 48px;
  padding: 0 16px;
  font-family: "Manrope", "Avenir Next", "Segoe UI", sans-serif;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(17, 19, 27, 0.28);
}

.lab-chat-toggle span {
  color: #007fff;
  font-size: 0.95rem;
}

.lab-chat-panel {
  width: min(380px, calc(100vw - 24px));
  max-height: min(560px, calc(100vh - 96px));
  margin-bottom: 12px;
  background: #fffdfa;
  border: 1px solid #d6ddeb;
  border-radius: 18px;
  box-shadow: 0 18px 40px rgba(16, 34, 62, 0.18);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr auto auto;
}

.lab-chat-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid #e7ebf2;
  background: #f8fafc;
}

.lab-chat-head strong {
  font-size: 0.94rem;
}

.lab-chat-close {
  border: 0;
  background: transparent;
  color: #5c6e85;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.lab-chat-messages {
  overflow: auto;
  padding: 14px;
  display: grid;
  gap: 8px;
}

.chat-bot,
.chat-user {
  margin: 0;
  max-width: 90%;
  border-radius: 12px;
  padding: 9px 11px;
  font-size: 0.93rem;
  line-height: 1.45;
}

.chat-bot {
  background: #eef3fb;
  color: #10223e;
  justify-self: start;
}

.chat-user {
  background: #11131b;
  color: #fff;
  justify-self: end;
}

.lab-chat-quick {
  padding: 0 12px 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.lab-chat-quick button {
  border: 1px solid #d6ddeb;
  background: #fff;
  border-radius: 999px;
  height: 30px;
  padding: 0 10px;
  font-size: 0.8rem;
  color: #3b4a62;
  cursor: pointer;
}

.lab-chat-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 10px 12px 12px;
  border-top: 1px solid #e7ebf2;
}

.lab-chat-form input {
  border: 1px solid #d6ddeb;
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  color: #10223e;
  background: #fff;
}

.lab-chat-form button {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  border-radius: 10px;
  padding: 0 14px;
  font-weight: 700;
}

@media (max-width: 720px) {
  .lab-chat {
    right: 12px;
    bottom: 12px;
  }

  .lab-chat-panel {
    width: calc(100vw - 24px);
    margin-bottom: 10px;
  }

  .lab-chat-toggle {
    height: 44px;
    padding: 0 14px;
    font-size: 0.9rem;
  }
}

/* Final override: Contact chatbot (Figma-like) */
.lab-chat {
  right: 20px;
  bottom: 20px;
  z-index: 80;
}

.lab-chat-toggle {
  width: 50px;
  height: 50px;
  border-radius: 999px;
  padding: 0;
  justify-content: center;
  font-size: 1.7rem;
  font-weight: 500;
  background: #11131b;
  border-color: #11131b;
}

.lab-chat-toggle span {
  color: #ffffff;
  font-size: 1.9rem;
  line-height: 1;
  transform: translateY(-1px);
}

.lab-chat-panel {
  width: min(720px, calc(100vw - 28px));
  max-height: min(860px, calc(100vh - 92px));
  border-radius: 28px;
  border: 1px solid #d6ddeb;
  background: #f8f8fa;
  margin-bottom: 14px;
}

.lab-chat-head {
  background: #11131b;
  border-bottom: 0;
  padding: 16px 20px;
  color: #fff;
}

.lab-chat-id {
  display: flex;
  align-items: center;
  gap: 14px;
}

.lab-chat-brand-icon {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: #ff6a00;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  font-weight: 700;
}

.lab-chat-brand-icon svg {
  width: 24px;
  height: 24px;
  display: block;
}

.lab-chat-head strong {
  display: block;
  font-size: 2rem;
  line-height: 1.1;
}

.lab-chat-head p {
  margin: 4px 0 0;
  color: #b5bbc8;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.online-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #16a34a;
  display: inline-block;
}

.lab-chat-close {
  color: #8b90a0;
  font-size: 2.6rem;
}

.lab-chat-messages {
  padding: 16px 16px 10px;
  gap: 12px;
  background: #f8f8fa;
}

.chat-bot,
.chat-user {
  max-width: 86%;
  border-radius: 20px;
  padding: 16px 20px;
  font-size: 1rem;
  line-height: 1.45;
}

.chat-bot {
  background: #ffffff;
  color: #2a2d36;
  border: 1px solid #d5d9e2;
  box-shadow: 0 2px 6px rgba(16, 34, 62, 0.08);
}

.chat-user {
  background: #11131b;
  color: #fff;
  border-radius: 28px;
  justify-self: center;
}

.chat-contact a {
  color: #ea580c;
  font-weight: 700;
}

.lab-chat-quick {
  padding: 10px 16px 12px;
  border-top: 1px solid #e3e6ee;
  border-bottom: 1px solid #e3e6ee;
}

.lab-chat-quick button {
  height: 42px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid #d0d5df;
  background: #fff;
  color: #454b58;
  font-size: 1rem;
  font-weight: 600;
}

.lab-chat-form {
  padding: 14px 16px 16px;
  grid-template-columns: 1fr auto;
  gap: 10px;
  border-top: 0;
}

.lab-chat-form input {
  border-radius: 999px;
  min-height: 54px;
  border: 1px solid #d7dbe4;
  background: #eff0f3;
  color: #6a6f7b;
  font-size: 1rem;
}

.lab-chat-form button {
  width: 54px;
  height: 54px;
  border-radius: 999px;
  padding: 0;
  border: 1px solid #959aa6;
  background: #8f939c;
  font-size: 1.3rem;
}

@media (max-width: 820px) {
  .lab-chat-panel {
    width: calc(100vw - 24px);
    border-radius: 16px;
  }

  .lab-chat-head strong {
    font-size: 1.2rem;
  }

  .chat-bot,
  .chat-user {
    max-width: 100%;
    font-size: 0.95rem;
    padding: 12px 14px;
  }

  .lab-chat-quick button {
    height: 36px;
    padding: 0 14px;
    font-size: 0.9rem;
  }

  .lab-chat-form input,
  .lab-chat-form button {
    min-height: 44px;
    height: 44px;
  }
}

/* Final override: chatbot desktop width/type scale (closer to Figma) */
.lab-chat-panel {
  width: min(360px, calc(100vw - 20px));
  max-height: min(680px, calc(100vh - 84px));
}

.lab-chat-head {
  padding: 14px 16px;
}

.lab-chat-brand-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
}

.lab-chat-head strong {
  font-size: clamp(1rem, 1vw, 1.2rem);
}

.lab-chat-head p {
  font-size: 0.95rem;
}

.chat-bot,
.chat-user {
  font-size: 0.95rem;
  padding: 14px 16px;
}

.lab-chat-quick button {
  height: 38px;
  padding: 0 16px;
  font-size: 0.92rem;
}

.lab-chat-form input {
  min-height: 48px;
  font-size: 0.95rem;
}

.lab-chat-form button {
  width: 48px;
  height: 48px;
  font-size: 1.1rem;
}


/* Chatbot hard-close + disabled input visual */
.lab-chat-panel[hidden] {
  display: none !important;
}

.lab-chat-form input:disabled {
  opacity: 1;
  background: #eceef2;
  color: #9aa0ad;
  cursor: not-allowed;
}

.lab-chat-form button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* Motion pass: Figma-like subtle reveals and image hover */
@keyframes dmFadeUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes dmFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

.lab-hero-block,
.lab-toolbar,
.featured-post-card,
.lab-grid .post-card,
.post-layout {
  animation: dmFadeUp 520ms ease both;
}

.lab-toolbar { animation-delay: 80ms; }
.featured-post-card { animation-delay: 130ms; }
.lab-grid .post-card:nth-child(1) { animation-delay: 170ms; }
.lab-grid .post-card:nth-child(2) { animation-delay: 210ms; }
.lab-grid .post-card:nth-child(3) { animation-delay: 250ms; }
.lab-grid .post-card:nth-child(4) { animation-delay: 290ms; }
.lab-grid .post-card:nth-child(5) { animation-delay: 330ms; }
.lab-grid .post-card:nth-child(6) { animation-delay: 370ms; }

.post-card,
.featured-post-card {
  transition: transform 220ms ease, box-shadow 260ms ease, border-color 220ms ease;
}

.post-card:hover,
.featured-post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 28px rgba(16, 34, 62, 0.12);
}

.post-thumb,
.featured-media-wrap img,
.post-cover {
  transition: transform 420ms cubic-bezier(.2,.7,.2,1), filter 260ms ease;
  will-change: transform;
}

.post-card:hover .post-thumb,
.featured-post-card:hover .featured-media-wrap img {
  transform: scale(1.06);
}

.post-cover:hover {
  transform: scale(1.025);
}

.lab-chat-toggle {
  animation: dmFloat 2.8s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .lab-hero-block,
  .lab-toolbar,
  .featured-post-card,
  .lab-grid .post-card,
  .post-layout,
  .lab-chat-toggle {
    animation: none !important;
  }

  .post-card,
  .featured-post-card,
  .post-thumb,
  .featured-media-wrap img,
  .post-cover {
    transition: none !important;
  }
}

/* Global page-enter motion */
body > .site-header {
  animation: dmFadeUp 420ms ease both;
}

body > main > section,
body > main > .section,
body > main > .container,
body > main > article {
  animation: dmFadeUp 520ms ease both;
}

body > main > section:nth-of-type(1),
body > main > .section:nth-of-type(1) {
  animation-delay: 80ms;
}

body > main > section:nth-of-type(2),
body > main > .section:nth-of-type(2) {
  animation-delay: 140ms;
}

body > main > section:nth-of-type(3),
body > main > .section:nth-of-type(3) {
  animation-delay: 200ms;
}

body > .site-footer {
  animation: dmFadeUp 520ms ease both;
  animation-delay: 240ms;
}

@media (prefers-reduced-motion: reduce) {
  body > .site-header,
  body > main > section,
  body > main > .section,
  body > main > .container,
  body > main > article,
  body > .site-footer {
    animation: none !important;
  }
}

/* Icon asset wiring */
.logo {
  background: transparent;
  color: transparent;
  overflow: hidden;
}

.logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 50%;
  filter: grayscale(1) saturate(0) contrast(1.25) brightness(0.85);
}

.lab-chat-brand-icon {
  background: transparent;
  padding: 0;
  overflow: hidden;
}

.lab-chat-brand-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: inherit;
  filter: grayscale(1) saturate(0) contrast(1.25) brightness(0.85);
}

/* Featured article spacing (Figma-like rhythm) */
.featured-post {
  margin-bottom: 24px;
}

.featured-post-card {
  min-height: 520px;
}

.featured-content {
  padding: 44px 40px 42px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.featured-content .featured-meta {
  margin: 0 0 24px;
  font-size: clamp(1.05rem, 1.1vw, 1.2rem);
  color: #f7dcb8;
  font-weight: 600;
}

.featured-content h3 {
  margin: 0 0 20px;
  font-size: clamp(2.4rem, 3.2vw, 3.9rem);
  line-height: 1.04;
  max-width: 12ch;
}

.featured-content p {
  margin: 0 0 28px;
  font-size: clamp(1.08rem, 1.25vw, 1.45rem);
  line-height: 1.5;
  color: #c8cfdd;
  max-width: 30ch;
}

.featured-content .btn {
  margin-top: 2px;
  border-color: rgb(22, 82, 240);
  background: rgb(22, 82, 240);
  color: #ffffff;
  font-size: 1.05rem;
  padding: 12px 22px;
  border-radius: 0.5rem;
}

.featured-content .btn:hover {
  box-shadow: 0 10px 18px rgba(22, 82, 240, 0.28);
}

@media (max-width: 980px) {
  .featured-post-card {
    min-height: 0;
  }

  .featured-content {
    padding: 22px 18px 24px;
  }

  .featured-content .featured-meta {
    margin-bottom: 12px;
    font-size: 0.95rem;
  }

  .featured-content h3 {
    margin-bottom: 10px;
    font-size: 2rem;
    max-width: none;
  }

  .featured-content p {
    margin-bottom: 14px;
    font-size: 1rem;
    max-width: none;
  }

  .featured-content .btn {
  margin-top: 2px;
  border-color: rgb(22, 82, 240);
  background: rgb(22, 82, 240);
  color: #ffffff;
  font-size: 1.05rem;
  padding: 12px 22px;
  border-radius: 0.5rem;
}
}

/* Theme switch */
.theme-toggle {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  display: inline-grid;
  place-items: center;
  position: relative;
  cursor: pointer;
}

.theme-toggle span {
  position: absolute;
  font-size: 0.95rem;
  transition: opacity 180ms ease, transform 180ms ease;
}

.theme-toggle-sun { opacity: 1; transform: scale(1); }
.theme-toggle-moon { opacity: 0; transform: scale(.8); }

html[data-theme="dark"] .theme-toggle-sun { opacity: 0; transform: scale(.8); }
html[data-theme="dark"] .theme-toggle-moon { opacity: 1; transform: scale(1); }

/* Dark theme */
html[data-theme="dark"] {
  --bg: #0b1020;
  --surface: #101828;
  --surface-soft: #111b2f;
  --ink: #e6edf7;
  --muted: #a3b2c8;
  --line: #263347;
  --accent: #2d8dff;
  --accent-soft: #1b2b43;
  --dark: #050914;
}

html[data-theme="dark"] body {
  background:
    radial-gradient(circle at 90% -10%, #122746 0%, transparent 40%),
    radial-gradient(circle at -10% 30%, #112a22 0%, transparent 30%),
    var(--bg);
}

html[data-theme="dark"] .site-header,
html[data-theme="dark"] .site-footer {
  background: color-mix(in srgb, var(--bg), transparent 15%);
  border-color: var(--line);
}

html[data-theme="dark"] .card,
html[data-theme="dark"] .post,
html[data-theme="dark"] .post-content,
html[data-theme="dark"] .lab-toolbar,
html[data-theme="dark"] .lab-search,
html[data-theme="dark"] .chip,
html[data-theme="dark"] .step-row,
html[data-theme="dark"] .course-beyond .beyond-pill {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink);
}

html[data-theme="dark"] .post .meta,
html[data-theme="dark"] .hero-copy,
html[data-theme="dark"] .featured-content p,
html[data-theme="dark"] .featured-content .meta,
html[data-theme="dark"] .steps-note,
html[data-theme="dark"] .course-page .lead,
html[data-theme="dark"] .course-page .hero-actions .note,
html[data-theme="dark"] .course-beyond .lead,
html[data-theme="dark"] .course-beyond .beyond-outro {
  color: var(--muted);
}

html[data-theme="dark"] .site-header .brand,
html[data-theme="dark"] .site-header .nav-links a,
html[data-theme="dark"] a {
  color: var(--ink);
}

html[data-theme="dark"] .course-page,
html[data-theme="dark"] .course-page .course-hero,
html[data-theme="dark"] .course-page .course-problems,
html[data-theme="dark"] .course-page .course-compare,
html[data-theme="dark"] .course-page .course-beyond {
  background: var(--bg);
}

html[data-theme="dark"] .lab-chat-panel,
html[data-theme="dark"] .lab-chat-messages,
html[data-theme="dark"] .lab-chat-form input,
html[data-theme="dark"] .lab-chat-quick button {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink);
}

html[data-theme="dark"] .lab-chat-head {
  background: #0a0f1f;
}

html[data-theme="dark"] .lab-chat-form button {
  background: #5f6673;
  border-color: #7b8494;
}

@media (max-width: 980px) {
  .theme-toggle {
    width: 36px;
    height: 36px;
  }
}
