:root {
  --ink: #101114;
  --muted: #62666f;
  --line: #e5e7eb;
  --paper: #ffffff;
  --soft: #f6f7f9;
  --red: #ff2028;
  --yellow: #ffd21f;
  --green: #65f20a;
  --blue: #2354ff;
  --black: #050505;
  --radius: 8px;
  --shadow: 0 18px 60px rgba(16, 17, 20, 0.11);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body.wstudio-app {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: "Inter", "Segoe UI", Arial, sans-serif;
  letter-spacing: 0;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.site-shell {
  width: calc(100% - 32px);
  max-width: 1180px;
  margin: 0 auto;
}

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 76px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.brand-mark {
  width: 72px;
  height: 46px;
  object-fit: contain;
}

.brand-text {
  font-size: 1rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  color: var(--muted);
  font-weight: 650;
}

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

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

.language-switcher {
  display: grid;
  grid-template-columns: repeat(3, 40px);
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--soft);
}

.language-option {
  height: 32px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 800;
}

.language-option.is-active {
  background: var(--black);
  color: white;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 0 18px;
  cursor: pointer;
  font-weight: 800;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  background: var(--ink);
  color: white;
  box-shadow: 0 10px 28px rgba(16, 17, 20, 0.18);
}

.button-secondary {
  background: var(--yellow);
  color: var(--ink);
}

.button-ghost {
  border-color: var(--line);
  background: white;
  color: var(--ink);
}

.button-google {
  width: 100%;
  background: white;
  border-color: var(--line);
}

.button-small {
  min-height: 38px;
  padding: 0 14px;
  background: var(--ink);
  color: white;
}

.button-full {
  width: 100%;
}

.hero {
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(255, 32, 40, 0.08), transparent 28%),
    linear-gradient(135deg, rgba(35, 84, 255, 0.08), transparent 48%),
    var(--paper);
  border-bottom: 1px solid var(--line);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 56px;
  align-items: center;
  min-height: calc(100vh - 76px);
  padding: 48px 0;
}

.hero-copy h1,
.page-hero h1,
.course-hero h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(2.6rem, 7vw, 6.3rem);
  line-height: 0.92;
  letter-spacing: 0;
}

.hero-copy p,
.page-hero p,
.course-hero p {
  max-width: 650px;
  color: var(--muted);
  font-size: 1.12rem;
  line-height: 1.65;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.hero-panel {
  display: grid;
  gap: 14px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  box-shadow: var(--shadow);
}

.hero-logo {
  width: min(100%, 420px);
  margin: 0 auto 8px;
}

.hero-stat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  border-radius: var(--radius);
  background: var(--soft);
}

.hero-stat strong {
  font-size: 1.35rem;
}

.hero-stat span {
  color: var(--muted);
  font-weight: 700;
}

.section {
  padding: 72px 0;
}

.section-band {
  background: var(--soft);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

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

.section-head h2,
.curriculum h2,
.checkout-panel h2,
.lesson-player h2,
.outcome-panel h2 {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.5rem);
  line-height: 1;
  letter-spacing: 0;
}

.course-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.course-card {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  box-shadow: 0 10px 30px rgba(16, 17, 20, 0.06);
}

.course-image {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--course-accent, var(--blue));
}

.course-image::after {
  position: absolute;
  inset: auto 16px 16px auto;
  width: 46px;
  height: 6px;
  background: var(--yellow);
  content: "";
}

.course-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  mix-blend-mode: multiply;
}

.course-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
}

.course-card h3 {
  margin: 0;
  font-size: 1.28rem;
  line-height: 1.08;
  letter-spacing: 0;
}

.course-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.52;
}

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

.tag-row span {
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: auto 0 0;
}

.meta-grid div {
  padding: 10px;
  border-radius: var(--radius);
  background: var(--soft);
}

.meta-grid dt {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.meta-grid dd {
  margin: 4px 0 0;
  font-weight: 850;
}

.card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 4px;
}

.card-bottom strong {
  font-size: 1.25rem;
}

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

.step-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
}

.step-card span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: var(--green);
  color: var(--ink);
  font-weight: 900;
}

.step-card h3 {
  margin: 22px 0 8px;
}

.step-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.page-hero {
  padding: 72px 0 24px;
}

.course-hero {
  background: var(--soft);
  border-bottom: 1px solid var(--line);
}

.course-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 42px;
  align-items: center;
  padding: 56px 0;
}

.course-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.course-hero-meta span,
.back-link {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  color: var(--muted);
  font-weight: 800;
}

.back-link {
  margin-bottom: 22px;
  color: var(--ink);
}

.checkout-panel,
.lesson-player,
.curriculum,
.outcome-panel,
.auth-card,
.signed-in-card,
.empty-state {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  box-shadow: 0 10px 34px rgba(16, 17, 20, 0.07);
}

.checkout-panel {
  padding: 18px;
}

.checkout-panel img {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius);
  object-fit: cover;
}

.checkout-panel h2 {
  margin-top: 18px;
}

.checkout-panel p {
  color: var(--muted);
  line-height: 1.55;
}

.paypal-buttons {
  min-height: 150px;
}

.payment-message,
.form-message {
  min-height: 22px;
  margin-top: 12px;
  color: var(--muted);
  font-weight: 700;
}

.payment-message.is-success {
  color: #087f44;
}

.payment-message.is-error,
.form-message.is-error {
  color: #c51625;
}

.course-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
  align-items: start;
}

.lesson-player {
  min-height: 520px;
  padding: 28px;
}

.lesson-player p {
  color: var(--muted);
  line-height: 1.65;
}

.lesson-player iframe,
.lesson-brief,
.locked-player {
  width: 100%;
  min-height: 320px;
  margin-top: 22px;
  border: 0;
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 32, 40, 0.14), transparent 35%),
    linear-gradient(135deg, rgba(101, 242, 10, 0.18), transparent 70%),
    var(--ink);
  color: white;
}

.lesson-brief,
.locked-player {
  display: grid;
  place-items: center;
  padding: 34px;
  text-align: center;
}

.lesson-brief span {
  font-size: 1.4rem;
  font-weight: 900;
}

.lesson-brief p,
.locked-player p {
  max-width: 560px;
  color: rgba(255, 255, 255, 0.78);
}

.curriculum {
  position: sticky;
  top: 96px;
  padding: 18px;
}

.lesson-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.lesson-button {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  background: white;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.lesson-button.is-active {
  border-color: var(--ink);
  box-shadow: inset 4px 0 0 var(--blue);
}

.lesson-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.lesson-button strong,
.lesson-button small {
  display: block;
}

.lesson-button small {
  margin-top: 5px;
  color: var(--muted);
  font-weight: 750;
}

.outcome-panel {
  display: grid;
  grid-template-columns: 0.75fr 1fr;
  gap: 28px;
  padding: 28px;
}

.outcome-panel ul {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.outcome-panel li {
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--soft);
  font-weight: 750;
}

.auth-page {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) 420px;
  gap: 42px;
  align-items: center;
  padding: 72px 0;
}

.auth-copy h1 {
  margin: 0;
  font-size: clamp(2.4rem, 6vw, 5rem);
  line-height: 0.96;
}

.auth-copy p {
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.6;
}

.auth-card {
  display: grid;
  gap: 14px;
  padding: 24px;
}

.auth-card label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 800;
}

.auth-card input {
  width: 100%;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 12px;
  color: var(--ink);
}

.auth-card input:focus {
  border-color: var(--blue);
  outline: 3px solid rgba(35, 84, 255, 0.12);
}

.auth-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.text-button {
  border: 0;
  background: transparent;
  color: var(--blue);
  cursor: pointer;
  font-weight: 850;
}

.signed-in-card,
.empty-state {
  display: grid;
  gap: 12px;
  margin-top: 24px;
  padding: 18px;
}

.signed-in-card span,
.empty-state p {
  color: var(--muted);
}

.notice {
  margin: 12px 0;
  padding: 12px 14px;
  border: 1px solid #ffd9a3;
  border-radius: var(--radius);
  background: #fff7e8;
  color: #7a4d00;
  font-weight: 750;
  overflow-wrap: anywhere;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--ink);
  color: white;
}

.footer-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 86px;
}

.footer-shell p {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
}

.status-pill {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 30;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  color: var(--muted);
  box-shadow: 0 10px 30px rgba(16, 17, 20, 0.12);
  font-size: 0.78rem;
  font-weight: 850;
}

@media (max-width: 980px) {
  .nav-shell,
  .nav-actions {
    flex-wrap: wrap;
  }

  .hero-grid,
  .course-hero-grid,
  .course-layout,
  .auth-page,
  .outcome-panel {
    grid-template-columns: 1fr;
  }

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

  .curriculum {
    position: static;
  }
}

@media (max-width: 640px) {
  .site-shell {
    width: calc(100% - 20px);
    max-width: 1180px;
  }

  .nav-shell {
    min-height: 92px;
    gap: 12px;
    padding: 10px 0;
  }

  .brand {
    flex: 0 0 100%;
  }

  .brand-text {
    max-width: 120px;
    white-space: normal;
  }

  .brand-mark {
    width: 58px;
    height: 40px;
  }

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

  .nav-links {
    order: 3;
    flex: 0 0 100%;
    width: 100%;
    justify-content: space-between;
  }

  .language-switcher {
    grid-template-columns: repeat(3, 34px);
  }

  .language-option {
    height: 30px;
  }

  .hero-grid {
    min-height: auto;
    padding: 38px 0;
  }

  .hero-copy h1,
  .page-hero h1,
  .course-hero h1,
  .auth-copy h1 {
    max-width: 340px;
    font-size: 1.75rem;
    line-height: 0.98;
    overflow-wrap: break-word;
  }

  .hero-copy p,
  .page-hero p,
  .course-hero p,
  .auth-copy p,
  .hero-panel {
    max-width: 340px;
  }

  .section,
  .auth-page {
    padding: 42px 0;
  }

  .course-grid,
  .steps-grid,
  .auth-buttons {
    grid-template-columns: 1fr;
  }

  .section-head,
  .footer-shell {
    align-items: start;
    flex-direction: column;
  }

  .checkout-panel,
  .lesson-player,
  .curriculum,
  .outcome-panel,
  .auth-card {
    padding: 16px;
  }

  .lesson-player {
    min-height: 0;
  }
}
