:root {
  --bg-top: #eef6fc;
  --bg-bottom: #d8e8f6;
  --surface: #ffffff;
  --surface-muted: #f4f9fd;
  --text: #0f172a;
  --muted: #475569;
  --accent: #1d4ed8;
  --accent-hover: #1e40af;
  --accent-ring: rgba(29, 78, 216, 0.35);
  --border: #c7dbf0;
  --border-soft: rgba(255, 255, 255, 0.85);
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(30, 64, 175, 0.08);
  --shadow-hover: 0 4px 12px rgba(15, 23, 42, 0.06), 0 16px 36px rgba(30, 64, 175, 0.12);
  --radius: 14px;
  --radius-sm: 10px;
  --font: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text);
  line-height: 1.55;
  background-color: var(--bg-bottom);
  background-image:
    radial-gradient(ellipse 100% 70% at 50% -15%, rgba(191, 219, 254, 0.55), transparent 55%),
    radial-gradient(ellipse 60% 45% at 100% 0%, rgba(224, 242, 254, 0.7), transparent 50%),
    radial-gradient(ellipse 55% 40% at 0% 100%, rgba(219, 234, 254, 0.5), transparent 45%),
    linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 100%);
  background-attachment: fixed;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(199, 219, 240, 0.8);
}

.site-header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.9rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-brand {
  text-decoration: none;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.site-nav-link {
  text-decoration: none;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.92rem;
  padding: 0.55rem 0.75rem;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.site-nav-link:hover {
  background: rgba(255, 255, 255, 0.75);
  border-color: var(--border);
  color: var(--text);
}

.site-nav-link-cta {
  color: #fff;
  background: linear-gradient(180deg, #2563eb 0%, var(--accent) 100%);
  border-color: rgba(29, 78, 216, 0.25);
}

.site-nav-link-cta:hover {
  color: #fff;
  border-color: rgba(29, 78, 216, 0.35);
  background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
}

.page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2.25rem 1.25rem 3.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.home {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2.25rem 1.25rem 3.5rem;
  display: block;
}

.home-main {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  min-width: 0;
}

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

.course-shortcut-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.course-shortcut-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: var(--shadow-hover);
}

.course-shortcut-card img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.course-shortcut-label {
  display: block;
  padding: 0.55rem 0.5rem;
  text-align: center;
  font-size: 0.88rem;
  font-weight: 700;
  background: var(--surface-muted);
  border-top: 1px solid var(--border);
}

.home-sidebar {
  position: sticky;
  top: 5rem;
}

.sidebar-card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.sidebar-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.sidebar-lead {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.hero {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  align-items: start;
  padding: 2rem 2rem 2.25rem;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow);
}

.hero-compact {
  grid-template-columns: 1fr;
}

.hero-main {
  padding-right: 0.5rem;
}

.hero-title {
  margin: 0 0 0.85rem;
  font-size: clamp(1.85rem, 4.2vw, 2.45rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.12;
  color: var(--text);
}

.hero-lead {
  margin: 0;
  font-size: 1.0625rem;
  color: var(--muted);
  max-width: 38ch;
}

.hero-subtitle {
  margin: 1rem 0 0;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.hero-main p {
  margin: 0.85rem 0 0;
  max-width: 72ch;
  color: var(--text);
}

.hero-main p.hero-lead {
  color: var(--muted);
  max-width: 42ch;
}

.hero-toolkit-heading,
.hero-section-heading {
  margin: 1.1rem 0 0;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.hero-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
  align-items: stretch;
}

.hero-column {
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-muted);
}

.hero-column .hero-section-heading {
  margin-top: 0;
  font-size: 1rem;
}

.hero-column-kicker {
  margin: 0.25rem 0 0.65rem !important;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
  max-width: none !important;
}

.hero-column p {
  max-width: none;
  font-size: 0.88rem;
}

.hero-column .hero-copy-list {
  flex: 1;
  max-width: none;
  font-size: 0.86rem;
}

.hero-cta {
  margin-top: 1.25rem;
  text-align: center;
}

.hero-cta p {
  max-width: 56ch;
  margin-left: auto;
  margin-right: auto;
}

.hero-cta-btn {
  display: inline-block;
  width: auto;
  min-width: 14rem;
  margin-top: 0.85rem;
}

.hero-cta-btn.btn-primary {
  background: linear-gradient(180deg, #22c55e 0%, #16a34a 100%);
  border-color: #15803d;
  box-shadow: 0 2px 8px rgba(22, 163, 74, 0.35);
}

.hero-cta-btn.btn-primary:hover {
  background: linear-gradient(180deg, #4ade80 0%, #22c55e 100%);
  box-shadow: 0 4px 14px rgba(22, 163, 74, 0.4);
}

.hero-cta-btn.btn-primary:focus-visible {
  outline-color: #16a34a;
}

.hero-copy-list {
  margin: 0.5rem 0 0;
  padding-left: 1.15rem;
  display: grid;
  gap: 0.55rem;
  max-width: 72ch;
}

.hero-copy-close {
  margin-top: 1rem;
  font-weight: 800;
}

.btn {
  display: block;
  text-align: center;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9375rem;
  padding: 0.9rem 1.1rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.btn-primary {
  background: linear-gradient(180deg, #2563eb 0%, var(--accent) 100%);
  color: #fff;
  box-shadow: 0 2px 8px var(--accent-ring);
}

.btn-primary:hover {
  background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
  box-shadow: 0 4px 14px var(--accent-ring);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--surface);
  color: var(--accent);
  border-color: var(--border);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.btn-secondary:hover {
  border-color: var(--accent);
  background: var(--surface-muted);
  transform: translateY(-1px);
}

.channels {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow);
  padding: 1.75rem 1.75rem 2rem;
}

.channels-title {
  margin: 0 0 1.35rem;
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.channels-title::after {
  content: "";
  display: block;
  width: 3rem;
  height: 3px;
  margin-top: 0.65rem;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), rgba(29, 78, 216, 0.25));
}

.section-title {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.section-lead {
  margin: 0;
  color: var(--muted);
  max-width: 80ch;
}

.courses {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow);
  padding: 1.5rem;
}

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

.course-card {
  display: block;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-muted);
  padding: 1.1rem 1.1rem 1rem;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.course-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: var(--shadow-hover);
}

.course-card h3 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.course-card p {
  margin: 0 0 0.75rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.course-cta {
  display: inline-block;
  font-weight: 800;
  color: var(--accent);
  font-size: 0.9rem;
}

.channel-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem 1.25rem;
}

.channel-column {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.channel-btn {
  display: block;
  text-align: center;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius-sm);
  background: var(--surface-muted);
  color: var(--text);
  border: 1px solid var(--border);
  transition:
    border-color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease,
    color 0.18s ease;
}

.channel-btn:hover {
  border-color: var(--accent);
  background: var(--surface);
  color: var(--accent);
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.channel-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (max-width: 768px) {
  .page {
    padding: 1.5rem 1rem 2.5rem;
  }

  .home {
    padding: 1.5rem 1rem 2.5rem;
    grid-template-columns: 1fr;
  }

  .home-sidebar {
    position: static;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 1.5rem 1.35rem;
  }

  .hero-main {
    padding-right: 0;
  }

  .channels {
    padding: 1.35rem 1.15rem 1.5rem;
  }

  .channel-grid {
    grid-template-columns: 1fr;
  }

  .course-grid {
    grid-template-columns: 1fr;
  }

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

  .course-shortcut-label {
    font-size: 0.8rem;
  }

  .hero-columns {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 769px) and (max-width: 900px) {
  .hero {
    grid-template-columns: 1.4fr 1fr;
  }
}

.hero-auth {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.hero-auth .btn {
  display: inline-block;
  width: auto;
  min-width: 8rem;
}

.flash-messages {
  max-width: 1100px;
  margin: 0 auto 1rem;
  padding: 0 1.25rem;
}

.flash {
  margin: 0 0 0.5rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
}

.flash-error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.flash-success {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.auth-card-wide {
  max-width: 480px;
}

.package-fieldset {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  margin: 0 0 1rem;
}

.package-fieldset legend {
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0 0.25rem;
}

.package-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.35rem 0;
  font-weight: 500;
}

.auth-intro {
  margin: 0 0 1.25rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.auth-form select {
  display: block;
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font: inherit;
}

.auth-card {
  max-width: 420px;
  margin: 2rem auto;
  padding: 2rem;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow);
}

.auth-card h1 {
  margin: 0 0 1.25rem;
  font-size: 1.5rem;
}

.auth-form label {
  display: block;
  margin-bottom: 1rem;
  font-weight: 600;
  font-size: 0.875rem;
}

.auth-form input {
  display: block;
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font: inherit;
}

.auth-form .btn {
  width: 100%;
  margin-top: 0.5rem;
  cursor: pointer;
  border: none;
}

.auth-alt {
  margin: 1.25rem 0 0;
  font-size: 0.9rem;
  color: var(--muted);
  text-align: center;
}

.hint {
  font-weight: 500;
  color: var(--muted);
}

.site-footer {
  margin-top: auto;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 1rem 1.25rem 1.25rem;
}

.site-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 2rem;
}

.footer-heading {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
}

.footer-lessons {
  margin: 0.15rem 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.footer-progress-label {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.footer-bar-wrap {
  flex: 1;
  min-width: 140px;
  max-width: 280px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-bar {
  flex: 1;
  height: 8px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}

.footer-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #7c3aed, #a78bfa);
  border-radius: 999px;
}

.footer-pct {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
}

.footer-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  margin-left: auto;
  font-size: 0.85rem;
  font-weight: 600;
}

.footer-stat {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.footer-booking {
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.footer-booking .btn {
  width: auto;
  min-width: 10.5rem;
  padding: 0.6rem 0.85rem;
  font-size: 0.84rem;
}

body.learn-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

body.learn-page .learn-layout {
  flex: 1;
  max-width: none;
  padding: 0 1rem 1rem;
}
