/* ==========================================================================
   Cumbre English — Page and product patterns
   ========================================================================== */

/* --------------------------------------------------------------------------
   Home — hero
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  overflow: hidden;
  padding-block: var(--sp-10) var(--sp-12);
  background:
    radial-gradient(circle at 90% 0%, rgba(22, 184, 166, 0.09), transparent 34%),
    var(--bg);
}

.hero-grid {
  display: grid;
  gap: var(--sp-10);
  align-items: center;
}

.hero-copy {
  display: grid;
  gap: var(--sp-6);
  max-width: 660px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-self: start;
  padding: 6px 12px 6px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.8);
  color: var(--muted-strong);
  font-size: var(--text-xs);
  font-weight: 500;
}

.hero-kicker .badge__dot {
  width: 8px;
  height: 8px;
  background: var(--teal-500);
  box-shadow: 0 0 0 4px rgba(22, 184, 166, 0.14);
}

.hero h1 {
  font-size: clamp(2.45rem, 1.55rem + 3.9vw, 4.1rem);
  letter-spacing: -0.035em;
  line-height: 1.06;
}

.hero h1 span {
  display: block;
}

.hero h1 .hero-accent {
  color: var(--blue-700);
}

.hero-sub {
  max-width: 52ch;
  color: var(--muted-strong);
  font-size: clamp(1rem, 0.94rem + 0.3vw, 1.15rem);
  line-height: var(--leading-relaxed);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-3);
}

.hero-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 10px var(--sp-5);
  padding-top: var(--sp-2);
  color: var(--muted-strong);
  font-size: var(--text-sm);
}

.hero-proof span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.hero-proof .icon {
  color: var(--teal-700);
  width: 18px;
  height: 18px;
}

.hero-visual {
  position: relative;
  isolation: isolate;
}

.hero-orbit {
  position: absolute;
  z-index: -1;
  width: 86%;
  max-width: 460px;
  aspect-ratio: 1;
  top: -8%;
  right: -6%;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 50%;
}

.hero-orbit::after {
  content: "";
  position: absolute;
  inset: 12%;
  border: 1px dashed rgba(22, 184, 166, 0.32);
  border-radius: 50%;
}

.hero-dot {
  position: absolute;
  z-index: -1;
  width: 180px;
  height: 180px;
  bottom: 8%;
  left: -10%;
  border-radius: 32px;
  background-image: radial-gradient(rgba(20, 45, 78, 0.16) 1.2px, transparent 1.2px);
  background-size: 14px 14px;
  transform: rotate(-6deg);
}

.portrait-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 10px;
  box-shadow: var(--shadow-md);
}

.portrait-card > img {
  width: 100%;
  height: auto;
  border-radius: calc(var(--radius-xl) - 8px);
  object-position: center 42%;
}

.portrait-tag {
  position: absolute;
  top: 24px;
  left: 24px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 11px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.94);
  color: var(--navy-800);
  font-size: var(--text-xs);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(8px);
}

.portrait-tag .badge__dot {
  background: var(--teal-500);
}

.portrait-person {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: rgba(15, 36, 64, 0.92);
  color: #fff;
  backdrop-filter: blur(10px);
}

.portrait-person .avatar {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.portrait-person strong {
  display: block;
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 700;
}

.portrait-person small {
  display: block;
  font-size: 11.5px;
  color: #b8c8dc;
  margin-top: 2px;
}

.portrait-person .badge {
  margin-left: auto;
}

.hero-note {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin-top: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--line);
}

.hero-note div {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: var(--surface);
  color: var(--muted-strong);
  font-size: var(--text-xs);
  line-height: 1.4;
}

.hero-note .icon {
  color: var(--blue-700);
  width: 18px;
  height: 18px;
}

.hero-note strong {
  display: block;
  color: var(--ink);
  font-size: var(--text-sm);
  font-weight: 600;
}

@media (min-width: 900px) {
  .hero {
    padding-block: var(--sp-16) var(--sp-20);
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
    gap: var(--sp-16);
  }

  .hero-visual {
    padding-left: var(--sp-6);
  }
}

/* Trust strip */

.trust-strip {
  border-block: 1px solid var(--line);
  background: var(--surface);
}

.trust-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: var(--sp-5) var(--sp-4);
  background: var(--surface);
  color: var(--muted-strong);
  font-size: var(--text-sm);
  line-height: 1.4;
}

.trust-item .icon {
  color: var(--teal-700);
  width: 22px;
  height: 22px;
}

.trust-item strong {
  display: block;
  color: var(--ink);
  font-weight: 600;
}

@media (min-width: 900px) {
  .trust-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .trust-item {
    padding-inline: var(--sp-5);
  }
}

/* --------------------------------------------------------------------------
   Home — benefits
   -------------------------------------------------------------------------- */

.benefits-grid {
  display: grid;
  gap: var(--sp-10);
}

.benefit-intro {
  display: grid;
  align-content: start;
  gap: var(--sp-4);
}

.benefit-intro p {
  color: var(--muted-strong);
  line-height: var(--leading-relaxed);
}

.benefit-list {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

.benefit {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: var(--sp-4);
  padding-block: var(--sp-6);
  border-bottom: 1px solid var(--line);
}

.benefit__num {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--teal-700);
  letter-spacing: 0.06em;
  padding-top: 3px;
}

.benefit h3 {
  font-size: var(--text-lg);
  margin-bottom: 6px;
}

.benefit p {
  color: var(--muted-strong);
  font-size: var(--text-sm);
  line-height: 1.65;
  max-width: 52ch;
}

@media (min-width: 900px) {
  .benefits-grid {
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    gap: var(--sp-16);
  }

  .benefit-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: var(--sp-10);
  }

  .benefit:nth-last-child(-n + 2) {
    border-bottom: 0;
    padding-bottom: 0;
  }
}

/* --------------------------------------------------------------------------
   Course cards
   -------------------------------------------------------------------------- */

.course-grid {
  display: grid;
  gap: var(--sp-5);
}

.course-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  transition: border-color var(--dur-fast) var(--ease-out),
    box-shadow var(--dur-base) var(--ease-out),
    transform var(--dur-base) var(--ease-out);
}

.course-card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.course-media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--surface-alt);
}

.course-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--dur-slow) var(--ease-out);
}

.course-card:hover .course-media img {
  transform: scale(1.03);
}

.course-media .level-chip {
  position: absolute;
  top: 14px;
  left: 14px;
}

.course-media .badge {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--navy-800);
  backdrop-filter: blur(6px);
}

.course-body {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: var(--sp-5) var(--sp-5) var(--sp-4);
  flex: 1;
}

.course-kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--teal-700);
}

.course-card h3 {
  font-size: 1.2rem;
  letter-spacing: -0.015em;
}

.course-card h3 a:hover {
  color: var(--blue-700);
}

.course-desc {
  color: var(--muted-strong);
  font-size: var(--text-sm);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.course-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: auto;
  padding-top: var(--sp-3);
  border-top: 1px solid var(--line);
  font-size: var(--text-xs);
  color: var(--muted);
}

.course-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.course-meta .icon {
  width: 15px;
  height: 15px;
}

.course-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  padding: 0 var(--sp-5) var(--sp-5);
}

.price {
  display: flex;
  align-items: baseline;
  gap: 4px;
  font-family: var(--font-display);
  color: var(--navy-800);
}

.price strong {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.price span {
  font-size: var(--text-xs);
  color: var(--muted);
  font-weight: 500;
}

.price-note {
  font-size: var(--text-xs);
  color: var(--muted);
}

@media (min-width: 700px) {
  .course-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .course-grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* --------------------------------------------------------------------------
   Home — method
   -------------------------------------------------------------------------- */

.method-grid {
  display: grid;
  gap: var(--sp-6);
  counter-reset: step;
}

.method-step {
  position: relative;
  padding-top: var(--sp-5);
  border-top: 2px solid var(--line);
}

.method-step::before {
  content: "";
  position: absolute;
  top: -5px;
  left: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal-500);
  box-shadow: 0 0 0 4px var(--teal-50);
}

.method-step__num {
  display: block;
  margin-bottom: var(--sp-3);
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.method-step h3 {
  font-size: var(--text-lg);
  margin-bottom: 8px;
}

.method-step p {
  color: var(--muted-strong);
  font-size: var(--text-sm);
  line-height: 1.65;
}

.method-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: var(--sp-8);
  padding: var(--sp-4) var(--sp-5);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--muted-strong);
  font-size: var(--text-sm);
  line-height: 1.55;
}

.method-note .icon {
  color: var(--blue-700);
  margin-top: 1px;
}

@media (min-width: 820px) {
  .method-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--sp-8);
  }
}

/* --------------------------------------------------------------------------
   Home — teacher
   -------------------------------------------------------------------------- */

.teacher-grid {
  display: grid;
  gap: var(--sp-10);
  align-items: center;
}

.teacher-media {
  position: relative;
}

.teacher-media img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
}

.teacher-media__badge {
  position: absolute;
  left: 20px;
  bottom: 20px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.94);
  color: var(--navy-800);
  font-size: var(--text-xs);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(8px);
}

.teacher-media__badge .icon {
  color: var(--teal-700);
}

.teacher-content {
  display: grid;
  gap: var(--sp-5);
}

.teacher-content h2 {
  font-size: clamp(1.9rem, 1.4rem + 1.8vw, 2.7rem);
}

.teacher-content > p {
  color: var(--muted-strong);
  line-height: var(--leading-relaxed);
}

.teacher-facts {
  display: grid;
  gap: 12px;
  padding-block: var(--sp-2);
}

.teacher-facts li {
  display: flex;
  gap: 10px;
  color: var(--muted-strong);
  font-size: var(--text-sm);
  line-height: 1.55;
}

.teacher-facts .icon {
  color: var(--teal-700);
  margin-top: 1px;
}

.teacher-facts strong {
  color: var(--ink);
  font-weight: 600;
}

.teacher-langs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: var(--text-sm);
  color: var(--muted-strong);
}

.sample-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-xs);
  color: var(--muted);
}

.sample-note .icon {
  width: 14px;
  height: 14px;
}

@media (min-width: 900px) {
  .teacher-grid {
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
    gap: var(--sp-16);
  }
}

/* --------------------------------------------------------------------------
   Home — testimonials
   -------------------------------------------------------------------------- */

.testimonial-grid {
  display: grid;
  gap: var(--sp-5);
}

.testimonial {
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
  padding: var(--sp-6);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.testimonial blockquote {
  color: var(--ink);
  font-size: var(--text-base);
  line-height: 1.7;
}

.testimonial blockquote::before {
  content: "“";
  display: block;
  font-family: var(--font-display);
  font-size: 2.6rem;
  line-height: 0.7;
  color: var(--teal-500);
  margin-bottom: 8px;
}

.testimonial footer {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  padding-top: var(--sp-4);
  border-top: 1px solid var(--line);
}

.testimonial footer strong {
  display: block;
  font-size: var(--text-sm);
  color: var(--ink);
}

.testimonial footer small {
  display: block;
  font-size: var(--text-xs);
  color: var(--muted);
}

@media (min-width: 760px) {
  .testimonial-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* --------------------------------------------------------------------------
   Home — pricing
   -------------------------------------------------------------------------- */

.pricing-grid {
  display: grid;
  gap: var(--sp-5);
  align-items: stretch;
}

.price-card {
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
  padding: var(--sp-6);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.price-card--featured {
  background: var(--navy-900);
  border-color: var(--navy-900);
  color: #fff;
}

.price-card--featured h3,
.price-card--featured .price-card__amount strong {
  color: #fff;
}

.price-card--featured p,
.price-card--featured .price-card__amount span,
.price-card--featured li {
  color: #b9c7da;
}

.price-card__top {
  display: grid;
  gap: 8px;
}

.price-card__top h3 {
  font-size: var(--text-xl);
}

.price-card__top p {
  font-size: var(--text-sm);
  color: var(--muted-strong);
  line-height: 1.6;
}

.price-card__amount {
  display: flex;
  align-items: baseline;
  gap: 5px;
  font-family: var(--font-display);
}

.price-card__amount strong {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.035em;
  color: var(--navy-800);
}

.price-card__amount span {
  font-size: var(--text-sm);
  color: var(--muted);
}

.price-card ul {
  display: grid;
  gap: 10px;
  font-size: var(--text-sm);
  color: var(--muted-strong);
}

.price-card li {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  line-height: 1.5;
}

.price-card li .icon {
  color: var(--teal-700);
  width: 17px;
  height: 17px;
  margin-top: 1px;
}

.price-card--featured li .icon {
  color: var(--teal-500);
}

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

.price-card--featured .btn {
  background: #fff;
  color: var(--navy-900);
}

.price-card--featured .btn:hover {
  background: var(--teal-50);
}

.price-footnote {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: var(--sp-5);
  font-size: var(--text-xs);
  color: var(--muted);
  line-height: 1.6;
}

.price-footnote .icon {
  width: 15px;
  height: 15px;
  margin-top: 1px;
}

@media (min-width: 860px) {
  .pricing-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* --------------------------------------------------------------------------
   Home — FAQ
   -------------------------------------------------------------------------- */

.faq {
  max-width: 840px;
  margin-inline: auto;
  border-top: 1px solid var(--line);
}

.faq details {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-4);
  padding: var(--sp-5) 0;
  cursor: pointer;
  list-style: none;
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--navy-800);
  line-height: 1.45;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary:hover {
  color: var(--blue-700);
}

.faq summary .icon {
  color: var(--muted);
  transition: transform var(--dur-fast) var(--ease-out);
  margin-top: 2px;
}

.faq details[open] summary .icon {
  transform: rotate(45deg);
  color: var(--blue-700);
}

.faq details p {
  max-width: 68ch;
  padding-bottom: var(--sp-5);
  color: var(--muted-strong);
  font-size: var(--text-sm);
  line-height: 1.7;
}

/* --------------------------------------------------------------------------
   Home — final CTA
   -------------------------------------------------------------------------- */

.cta-panel {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: var(--sp-8);
  padding: var(--sp-8);
  border-radius: var(--radius-xl);
  background: var(--navy-900);
  color: #fff;
}

.cta-panel h2 {
  color: #fff;
  font-size: clamp(1.9rem, 1.4rem + 2vw, 2.9rem);
  letter-spacing: -0.03em;
}

.cta-panel p {
  max-width: 48ch;
  margin-top: var(--sp-3);
  color: #c3d0e1;
  line-height: 1.7;
}

.cta-panel__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-3);
}

.cta-panel .btn--secondary {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.28);
  color: #fff;
}

.cta-panel .btn--secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.5);
}

.cta-panel__art {
  position: absolute;
  right: -80px;
  top: -60px;
  width: 320px;
  height: 320px;
  border: 1px solid rgba(22, 184, 166, 0.35);
  border-radius: 50%;
  pointer-events: none;
}

.cta-panel__art::before,
.cta-panel__art::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.cta-panel__art::before {
  inset: 40px;
}

.cta-panel__art::after {
  inset: 90px;
  background: rgba(22, 184, 166, 0.14);
}

.cta-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 8px var(--sp-6);
  margin-top: var(--sp-5);
  font-size: var(--text-sm);
  color: #c3d0e1;
}

.cta-contact a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (min-width: 860px) {
  .cta-panel {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
    align-items: end;
    padding: var(--sp-16);
    gap: var(--sp-12);
  }

  .cta-panel__content {
    position: relative;
    z-index: 1;
  }

  .cta-panel__aside {
    position: relative;
    z-index: 1;
    display: grid;
    gap: var(--sp-4);
    justify-items: start;
  }
}

/* --------------------------------------------------------------------------
   Catalog page
   -------------------------------------------------------------------------- */

.page-hero {
  padding-block: var(--sp-8) var(--sp-10);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: var(--sp-5);
  font-size: var(--text-xs);
  color: var(--muted);
}

.breadcrumbs a:hover {
  color: var(--blue-700);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.breadcrumbs .icon {
  width: 13px;
  height: 13px;
  color: var(--line-strong);
}

.page-hero h1 {
  font-size: clamp(2.1rem, 1.6rem + 2vw, 3.1rem);
  max-width: 18ch;
}

.page-hero p {
  max-width: 62ch;
  margin-top: var(--sp-3);
  color: var(--muted-strong);
  font-size: var(--text-lg);
  line-height: var(--leading-relaxed);
}

.page-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px var(--sp-4);
  margin-top: var(--sp-5);
  font-size: var(--text-sm);
  color: var(--muted-strong);
}

.page-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.page-meta .icon {
  color: var(--teal-700);
  width: 17px;
  height: 17px;
}

.catalog {
  padding-block: var(--sp-8) var(--sp-16);
}

.catalog-toolbar {
  padding: var(--sp-5);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.filter-grid {
  display: grid;
  gap: var(--sp-4);
}

.filter-search {
  min-width: 0;
}

.filter-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-3);
  margin-top: var(--sp-4);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--line);
}

.filter-count {
  font-size: var(--text-sm);
  color: var(--muted-strong);
}

.filter-count strong {
  color: var(--ink);
}

.filter-sort {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--text-xs);
  color: var(--muted);
}

.filter-sort .select {
  min-height: 38px;
  width: auto;
  font-size: var(--text-xs);
  padding-block: 6px;
}

.results-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-3);
  margin: var(--sp-8) 0 var(--sp-4);
}

.results-head h2 {
  font-size: var(--text-lg);
}

.results-head p {
  font-size: var(--text-xs);
  color: var(--muted);
}

.catalog-grid {
  display: grid;
  gap: var(--sp-5);
}

.catalog-empty {
  display: none;
}

.catalog-empty.is-visible {
  display: grid;
}

.catalog-empty .btn {
  margin-top: var(--sp-2);
}

@media (min-width: 700px) {
  .catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .filter-search {
    grid-column: 1 / -1;
  }
}

@media (min-width: 1024px) {
  .catalog-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .filter-grid {
    grid-template-columns: minmax(0, 1.8fr) repeat(3, minmax(0, 1fr));
    align-items: end;
  }

  .filter-search {
    grid-column: auto;
  }
}

/* Course sheet */

.sheet-media {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--surface-alt);
}

.sheet-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sheet-media .level-chip {
  position: absolute;
  top: 16px;
  left: 16px;
}

.sheet-body {
  display: grid;
  gap: var(--sp-5);
  padding: var(--sp-6);
}

.sheet-kicker {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal-700);
}

.sheet-body h2 {
  font-size: var(--text-2xl);
}

.sheet-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  font-size: var(--text-xs);
  color: var(--muted);
}

.sheet-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.sheet-meta .icon {
  width: 15px;
  height: 15px;
}

.sheet-section {
  display: grid;
  gap: 10px;
  padding-top: var(--sp-5);
  border-top: 1px solid var(--line);
}

.sheet-section h3 {
  font-size: var(--text-base);
}

.sheet-section p {
  font-size: var(--text-sm);
  color: var(--muted-strong);
  line-height: 1.65;
}

.sheet-list {
  display: grid;
  gap: 8px;
  font-size: var(--text-sm);
  color: var(--muted-strong);
}

.sheet-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.55;
}

.sheet-list .icon {
  color: var(--teal-700);
  width: 16px;
  height: 16px;
  margin-top: 2px;
}

.sheet-modules {
  display: grid;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.sheet-modules li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  padding: 11px 14px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  font-size: var(--text-sm);
  color: var(--muted-strong);
}

.sheet-modules li:last-child {
  border-bottom: 0;
}

.sheet-modules li span:first-child {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.sheet-modules li b {
  font-family: var(--font-display);
  color: var(--navy-800);
  font-size: var(--text-xs);
}

.sheet-foot {
  position: sticky;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-6);
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
}

.sheet-foot .price strong {
  font-size: 1.45rem;
}

/* --------------------------------------------------------------------------
   Booking dialog
   -------------------------------------------------------------------------- */

.booking-layout {
  display: grid;
}

.booking-main {
  display: grid;
  gap: var(--sp-5);
  padding: var(--sp-6);
}

.booking-block {
  display: grid;
  gap: 10px;
}

.booking-block h3 {
  font-size: var(--text-sm);
  font-weight: 700;
  font-family: var(--font-body);
  color: var(--ink);
}

.choice-grid {
  display: grid;
  gap: 8px;
}

.choice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease-out),
    background-color var(--dur-fast) var(--ease-out);
}

.choice:hover {
  border-color: var(--line-strong);
  background: #fcfdff;
}

.choice input {
  accent-color: var(--blue-600);
  margin: 3px 0 0;
  flex: none;
}

.choice strong {
  display: block;
  font-size: var(--text-sm);
  color: var(--ink);
  line-height: 1.35;
}

.choice small {
  display: block;
  margin-top: 2px;
  font-size: var(--text-xs);
  color: var(--muted);
  line-height: 1.4;
}

.choice:has(input:checked) {
  border-color: var(--blue-600);
  background: var(--blue-50);
}

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

.duration-btn {
  display: grid;
  gap: 2px;
  justify-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--muted-strong);
  font-size: var(--text-sm);
  font-weight: 600;
}

.duration-btn small {
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
}

.duration-btn[aria-pressed="true"] {
  border-color: var(--blue-600);
  background: var(--blue-50);
  color: var(--blue-700);
}

.date-rail {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.date-rail::-webkit-scrollbar {
  display: none;
}

.date-btn {
  display: grid;
  gap: 2px;
  justify-items: center;
  min-width: 62px;
  padding: 10px 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--muted-strong);
  flex: none;
}

.date-btn span:first-child {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.date-btn strong {
  font-family: var(--font-display);
  font-size: var(--text-base);
  color: var(--ink);
}

.date-btn[aria-pressed="true"] {
  border-color: var(--navy-800);
  background: var(--navy-800);
}

.date-btn[aria-pressed="true"] span:first-child {
  color: #b9c7da;
}

.date-btn[aria-pressed="true"] strong {
  color: #fff;
}

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

.time-btn {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--ink);
  font-size: var(--text-sm);
  font-weight: 500;
}

.time-btn:hover {
  border-color: var(--blue-600);
}

.time-btn[aria-pressed="true"] {
  border-color: var(--blue-600);
  background: var(--blue-600);
  color: #fff;
}

.time-btn:disabled {
  color: #a9b5c4;
  background: var(--surface-alt);
  text-decoration: line-through;
}

.booking-tz {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-xs);
  color: var(--muted);
}

.booking-tz .icon {
  width: 15px;
  height: 15px;
}

.booking-summary {
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
  padding: var(--sp-6);
  background: var(--navy-900);
  color: #fff;
}

.booking-summary h3 {
  color: #fff;
  font-size: var(--text-lg);
}

.booking-teacher {
  display: flex;
  align-items: center;
  gap: 10px;
}

.booking-teacher .avatar {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.booking-teacher strong {
  display: block;
  font-size: var(--text-sm);
}

.booking-teacher small {
  display: block;
  font-size: var(--text-xs);
  color: #b9c7da;
}

.summary-rows {
  display: grid;
  gap: 10px;
  padding-block: var(--sp-5);
  border-block: 1px solid rgba(255, 255, 255, 0.14);
  font-size: var(--text-sm);
}

.summary-rows div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-4);
}

.summary-rows dt {
  color: #b9c7da;
}

.summary-rows dd {
  margin: 0;
  color: #fff;
  text-align: right;
  font-weight: 500;
}

.summary-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-4);
  font-family: var(--font-display);
}

.summary-total span {
  font-size: var(--text-sm);
  color: #b9c7da;
}

.summary-total strong {
  font-size: 1.8rem;
  letter-spacing: -0.03em;
}

.summary-note {
  font-size: var(--text-xs);
  color: #9fb0c6;
  line-height: 1.55;
}

.booking-summary .btn--confirm {
  width: 100%;
  background: #fff;
  color: var(--navy-900);
  margin-top: auto;
}

.booking-summary .btn--confirm:hover {
  background: var(--teal-50);
}

.booking-success {
  display: grid;
  justify-items: center;
  gap: var(--sp-4);
  padding: var(--sp-12) var(--sp-8);
  text-align: center;
}

.booking-success .success-mark {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--green-50);
  color: var(--green-700);
}

.booking-success .success-mark .icon {
  width: 30px;
  height: 30px;
}

.booking-success h3 {
  font-size: var(--text-2xl);
}

.booking-success p {
  max-width: 40ch;
  color: var(--muted-strong);
  font-size: var(--text-sm);
  line-height: 1.6;
}

.booking-success dl {
  display: grid;
  gap: 8px;
  width: 100%;
  max-width: 360px;
  padding: var(--sp-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-alt);
  font-size: var(--text-sm);
  text-align: left;
}

.booking-success dl div {
  display: flex;
  justify-content: space-between;
  gap: var(--sp-4);
}

.booking-success dt {
  color: var(--muted);
}

.booking-success dd {
  margin: 0;
  color: var(--ink);
  font-weight: 500;
}

@media (min-width: 760px) {
  .choice-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .booking-layout {
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.85fr);
  }

  .booking-summary {
    padding: var(--sp-8) var(--sp-6);
  }
}

/* Auth dialog */

.auth-form {
  display: grid;
  gap: var(--sp-4);
}

.auth-alt {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
  font-size: var(--text-xs);
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  font-size: var(--text-xs);
  color: var(--muted);
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* --------------------------------------------------------------------------
   Application shell (student + teacher dashboards)
   -------------------------------------------------------------------------- */

.app-body {
  background: #f4f7fb;
}

.app-shell {
  min-height: 100dvh;
}

.app-sidebar {
  position: fixed;
  z-index: 90;
  inset: 0 auto 0 0;
  width: min(86vw, 286px);
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
  padding: var(--sp-5);
  background: var(--navy-950);
  color: #fff;
  transform: translateX(-104%);
  transition: transform var(--dur-base) var(--ease-out);
  overflow-y: auto;
}

.app-sidebar.is-open {
  transform: translateX(0);
}

.app-sidebar .brand {
  padding: 4px 4px var(--sp-2);
}

.app-sidebar .brand-name {
  color: #fff;
}

.app-sidebar .brand-sub {
  color: #91a2b8;
}

.app-sidebar .brand img {
  width: 36px;
  height: 36px;
}

.side-label {
  padding-inline: 10px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #8194ab;
}

.side-nav {
  display: grid;
  gap: 2px;
}

.side-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  color: #c1cede;
  font-size: var(--text-sm);
  font-weight: 500;
  transition: background-color var(--dur-fast) var(--ease-out),
    color var(--dur-fast) var(--ease-out);
}

.side-nav a:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}

.side-nav a[aria-current="true"],
.side-nav a.is-active {
  background: rgba(255, 255, 255, 0.11);
  color: #fff;
}

.side-nav a .icon {
  width: 18px;
  height: 18px;
  color: #8fa3bb;
}

.side-nav a[aria-current="true"] .icon,
.side-nav a.is-active .icon {
  color: var(--teal-500);
}

.side-nav .count {
  margin-left: auto;
  min-width: 20px;
  padding: 1px 6px;
  border-radius: var(--radius-pill);
  background: rgba(22, 184, 166, 0.18);
  color: #7fe3d5;
  font-size: 10px;
  font-weight: 700;
  text-align: center;
}

.side-nav-sep {
  height: 1px;
  margin: var(--sp-3) 8px;
  background: rgba(255, 255, 255, 0.1);
}

.side-card {
  margin-top: auto;
  padding: var(--sp-4);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.05);
}

.side-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: var(--text-xs);
  color: #b9c7da;
}

.side-card strong {
  display: block;
  margin: 6px 0 8px;
  font-family: var(--font-display);
  font-size: var(--text-xl);
  color: #fff;
}

.side-card .progress {
  background: rgba(255, 255, 255, 0.16);
}

.side-card .progress > span {
  background: var(--teal-500);
}

.side-card .small {
  margin-top: 8px;
  color: #93a6bd;
  font-size: 11px;
}

.side-card .link-btn {
  color: #7fe3d5;
  font-size: var(--text-xs);
  margin-top: 10px;
}

.side-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: var(--radius-md);
  color: #fff;
}

.side-user:hover {
  background: rgba(255, 255, 255, 0.06);
}

.side-user .avatar {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.side-user strong {
  display: block;
  font-size: var(--text-sm);
}

.side-user small {
  display: block;
  font-size: 11px;
  color: #91a2b8;
}

.app-scrim {
  position: fixed;
  inset: 0;
  z-index: 85;
  background: rgba(8, 18, 32, 0.5);
  border: 0;
  padding: 0;
  display: none;
}

.app-scrim.is-open {
  display: block;
}

.app-menu-btn {
  display: inline-flex;
}

.app-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  min-height: 66px;
  padding: 10px var(--sp-5);
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.app-topbar-title {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.app-topbar-title strong {
  font-family: var(--font-display);
  font-size: var(--text-base);
  color: var(--navy-800);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-topbar-title small {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.app-search {
  display: none;
  position: relative;
  width: 260px;
}

.app-search .input {
  min-height: 40px;
  padding-left: 38px;
  font-size: var(--text-xs);
  background: var(--surface-alt);
  border-color: transparent;
}

.app-search .icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  width: 17px;
  height: 17px;
  color: var(--muted);
}

.notification-btn {
  position: relative;
}

.notification-dot {
  position: absolute;
  top: 9px;
  right: 9px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal-500);
  border: 2px solid #fff;
}

.topbar-user {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px 4px 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--surface);
}

.topbar-user .avatar {
  width: 30px;
  height: 30px;
  font-size: 11px;
}

.topbar-user span {
  display: none;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--ink);
}

.app-main {
  min-width: 0;
}

.app-content {
  display: grid;
  gap: var(--sp-6);
  padding: var(--sp-6) var(--sp-5) var(--sp-16);
  max-width: 1240px;
  margin-inline: auto;
}

.app-section {
  display: grid;
  gap: var(--sp-5);
  scroll-margin-top: 88px;
}

.app-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--sp-3);
}

.app-section-head h2 {
  font-size: var(--text-2xl);
}

.app-section-head p {
  margin-top: 4px;
  color: var(--muted);
  font-size: var(--text-sm);
}

.demo-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}

@media (min-width: 640px) {
  .app-search {
    display: block;
  }

  .topbar-user span {
    display: inline;
  }
}

@media (min-width: 1100px) {
  .app-shell {
    display: grid;
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  }

  .app-sidebar {
    position: sticky;
    top: 0;
    transform: none;
    width: auto;
    height: 100dvh;
  }

  .app-menu-btn {
    display: none;
  }

  .app-scrim {
    display: none !important;
  }

  .app-topbar {
    padding-inline: var(--sp-8);
  }

  .app-content {
    padding: var(--sp-8) var(--sp-8) var(--sp-20);
    gap: var(--sp-8);
  }
}

/* Dashboard welcome */

.welcome {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: var(--sp-6);
  padding: var(--sp-6);
  border-radius: var(--radius-lg);
  background: var(--navy-900);
  color: #fff;
}

.welcome h2 {
  color: #fff;
  font-size: clamp(1.55rem, 1.3rem + 1vw, 2.1rem);
}

.welcome p {
  max-width: 48ch;
  margin-top: 6px;
  color: #b9c7da;
  font-size: var(--text-sm);
  line-height: 1.65;
}

.welcome-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: var(--sp-5);
}

.welcome .btn--primary {
  background: #fff;
  color: var(--navy-900);
}

.welcome .btn--primary:hover {
  background: var(--teal-50);
}

.welcome .btn--ghost {
  color: #dbe5f1;
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.welcome .btn--ghost:hover {
  background: rgba(255, 255, 255, 0.08);
}

.welcome-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: var(--sp-5);
  font-size: var(--text-xs);
  color: #aebcd0;
}

.welcome-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.welcome-meta .icon {
  width: 15px;
  height: 15px;
  color: var(--teal-500);
}

.welcome__next {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 4px;
  align-content: center;
  padding: var(--sp-4);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.06);
}

.welcome__next span {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #8fe0d5;
}

.welcome__next strong {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  color: #fff;
}

.welcome__next small {
  font-size: var(--text-xs);
  color: #aebcd0;
}

.welcome__art {
  position: absolute;
  right: -60px;
  bottom: -100px;
  width: 260px;
  height: 260px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  pointer-events: none;
}

.welcome__art::after {
  content: "";
  position: absolute;
  inset: 55px;
  border: 1px solid rgba(22, 184, 166, 0.24);
  border-radius: 50%;
}

@media (min-width: 760px) {
  .welcome {
    grid-template-columns: minmax(0, 1.5fr) minmax(240px, 0.7fr);
    align-items: center;
    padding: var(--sp-8);
  }
}

/* Stats */

.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-3);
}

.stat-card {
  display: grid;
  gap: 4px;
  padding: var(--sp-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.stat-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.stat-card__label {
  font-size: var(--text-xs);
  color: var(--muted);
  line-height: 1.4;
}

.stat-card__icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  background: var(--surface-alt);
  color: var(--navy-700);
}

.stat-card__icon .icon {
  width: 16px;
  height: 16px;
}

.stat-card__value {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--navy-800);
  line-height: 1.1;
}

.stat-card__meta {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.4;
}

.stat-card__meta strong {
  color: var(--green-700);
  font-weight: 600;
}

.stat-card__meta.warn strong {
  color: var(--amber-700);
}

@media (min-width: 760px) {
  .metric-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--sp-4);
  }

  .stat-card {
    padding: var(--sp-5);
  }

  .stat-card__value {
    font-size: 2rem;
  }
}

/* Dashboard widget cards */

.widget {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: var(--sp-5);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.widget-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
}

.widget-head h3 {
  font-size: var(--text-base);
}

.widget-head p {
  margin-top: 2px;
  font-size: var(--text-xs);
  color: var(--muted);
}

.widget-head .badge {
  flex: none;
}

.dash-grid {
  display: grid;
  gap: var(--sp-4);
}

.span-4,
.span-6,
.span-8,
.span-12 {
  min-width: 0;
}

@media (min-width: 900px) {
  .dash-grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: var(--sp-5);
  }

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

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

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

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

/* Course progress rows */

.course-list {
  display: grid;
  gap: var(--sp-3);
}

.course-row {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.course-row:hover {
  border-color: var(--line-strong);
}

.course-thumb {
  width: 58px;
  height: 58px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex: none;
  background: var(--surface-alt);
}

.course-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.course-row__body {
  display: grid;
  gap: 5px;
  flex: 1;
  min-width: 0;
}

.course-row__title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.course-row__title strong {
  display: block;
  font-size: var(--text-sm);
  color: var(--ink);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.course-row__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  font-size: 11px;
  color: var(--muted);
}

.course-row .progress {
  height: 6px;
}

.course-row__action {
  flex: none;
}

.course-row__action .icon-btn {
  width: 36px;
  height: 36px;
}

/* Lesson rows */

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

.lesson-row {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.lesson-date {
  display: grid;
  justify-items: center;
  gap: 1px;
  min-width: 48px;
  padding: 6px 4px;
  border-radius: var(--radius-sm);
  background: var(--blue-50);
  color: var(--blue-700);
}

.lesson-date span {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lesson-date strong {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  line-height: 1;
}

.lesson-row__body {
  flex: 1;
  min-width: 0;
}

.lesson-row__body strong {
  display: block;
  font-size: var(--text-sm);
  color: var(--ink);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.lesson-row__body small {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  margin-top: 2px;
  font-size: 11px;
  color: var(--muted);
}

/* Assignment rows */

.task-list {
  display: grid;
  gap: 0;
}

.task-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.task-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.task-row:first-child {
  padding-top: 0;
}

.task-check {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: none;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: transparent;
}

.task-check:hover {
  border-color: var(--teal-600);
  color: var(--teal-600);
}

.task-check[aria-pressed="true"] {
  background: var(--teal-600);
  border-color: var(--teal-600);
  color: #fff;
}

.task-check .icon {
  width: 16px;
  height: 16px;
}

.task-row__body {
  flex: 1;
  min-width: 0;
}

.task-row__body strong {
  display: block;
  font-size: var(--text-sm);
  color: var(--ink);
  line-height: 1.45;
}

.task-row__body small {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  color: var(--muted);
}

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

.task-row.is-done .task-row__body small {
  color: var(--muted);
}

.task-row__side {
  display: grid;
  justify-items: end;
  gap: 4px;
  flex: none;
}

.task-row__side .badge {
  font-size: 10px;
  padding: 2px 8px;
}

/* Grades */

.grade-list {
  display: grid;
  gap: 2px;
}

.grade-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: var(--text-sm);
}

.grade-row:last-child {
  border-bottom: 0;
}

.grade-row strong {
  display: block;
  font-weight: 500;
  color: var(--ink);
}

.grade-row small {
  display: block;
  margin-top: 1px;
  font-size: 11px;
  color: var(--muted);
}

.grade-score {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  background: var(--green-50);
  color: var(--green-700);
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 700;
}

.grade-score--mid {
  background: var(--amber-50);
  color: var(--amber-700);
}

/* Announcements */

.announcement {
  display: flex;
  gap: 11px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.announcement:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.announcement:first-child {
  padding-top: 0;
}

.announcement__body {
  min-width: 0;
}

.announcement__body strong {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
  color: var(--ink);
  font-size: var(--text-sm);
}

.announcement__body strong span {
  font-size: 10px;
  font-weight: 400;
  color: var(--muted);
}

.announcement__body p {
  margin-top: 2px;
  font-size: var(--text-xs);
  color: var(--muted-strong);
  line-height: 1.55;
}

/* Balance */

.balance {
  display: grid;
  gap: var(--sp-4);
}

.balance__num {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.balance__num strong {
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--navy-800);
  line-height: 1;
}

.balance__num span {
  font-size: var(--text-sm);
  color: var(--muted);
}

.class-dots {
  display: flex;
  gap: 5px;
}

.class-dots span {
  width: 100%;
  height: 7px;
  border-radius: var(--radius-pill);
  background: var(--teal-100);
}

.class-dots span.is-used {
  background: var(--teal-600);
}

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

/* --------------------------------------------------------------------------
   Student dashboard specifics
   -------------------------------------------------------------------------- */

.student-section .section-grid {
  display: grid;
  gap: var(--sp-4);
}

.sub-card {
  padding: var(--sp-5);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.sub-card h3 {
  font-size: var(--text-base);
  margin-bottom: var(--sp-3);
}

.sub-card p {
  font-size: var(--text-sm);
  color: var(--muted-strong);
  line-height: 1.6;
}

.week-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.day-btn {
  display: grid;
  gap: 3px;
  justify-items: center;
  padding: 10px 2px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--muted-strong);
  min-width: 0;
}

.day-btn span {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.day-btn strong {
  font-family: var(--font-display);
  font-size: var(--text-base);
  color: var(--ink);
}

.day-btn i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--teal-500);
}

.day-btn i.is-empty {
  background: transparent;
}

.day-btn[aria-pressed="true"] {
  border-color: var(--navy-800);
  background: var(--navy-800);
}

.day-btn[aria-pressed="true"] span,
.day-btn[aria-pressed="true"] strong {
  color: #fff;
}

.agenda {
  display: grid;
  gap: 8px;
}

.agenda-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.agenda-time {
  flex: none;
  min-width: 48px;
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--blue-700);
}

.agenda-item__body {
  min-width: 0;
  flex: 1;
}

.agenda-item__body strong {
  display: block;
  font-size: var(--text-sm);
  color: var(--ink);
}

.agenda-item__body small {
  display: block;
  margin-top: 1px;
  font-size: 11px;
  color: var(--muted);
}

.agenda-empty {
  padding: var(--sp-5);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-md);
  text-align: center;
  font-size: var(--text-sm);
  color: var(--muted);
}

.skill-list {
  display: grid;
  gap: var(--sp-4);
}

.skill-row {
  display: grid;
  gap: 6px;
}

.skill-row__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-3);
  font-size: var(--text-sm);
  color: var(--muted-strong);
}

.skill-row__head strong {
  color: var(--ink);
  font-weight: 500;
}

.skill-row__head span {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-sm);
  color: var(--navy-800);
}

.level-estimate {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-4);
  border: 1px solid var(--teal-100);
  border-radius: var(--radius-md);
  background: var(--teal-50);
}

.level-estimate__badge {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  flex: none;
  border-radius: var(--radius-md);
  background: var(--teal-600);
  color: #fff;
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 800;
}

.level-estimate strong {
  display: block;
  color: var(--teal-800);
  font-size: var(--text-sm);
}

.level-estimate small {
  display: block;
  margin-top: 2px;
  color: #2e6b64;
  font-size: 11px;
  line-height: 1.5;
}

.pay-summary {
  display: grid;
  gap: var(--sp-4);
}

.pay-summary__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  font-size: var(--text-sm);
  color: var(--muted-strong);
}

.pay-summary__row strong {
  color: var(--ink);
}

.invoice-list {
  display: grid;
  gap: 2px;
}

.invoice-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  font-size: var(--text-sm);
}

.invoice-row:last-child {
  border-bottom: 0;
}

.invoice-row small {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  color: var(--muted);
}

.invoice-row strong {
  font-weight: 500;
  color: var(--ink);
}

/* --------------------------------------------------------------------------
   Teacher dashboard specifics
   -------------------------------------------------------------------------- */

.schedule-list {
  display: grid;
  gap: 8px;
}

.schedule-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.schedule-row.is-live {
  border-color: var(--teal-100);
  background: var(--teal-50);
}

.schedule-time {
  flex: none;
  min-width: 54px;
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--navy-800);
}

.schedule-row__body {
  flex: 1;
  min-width: 0;
}

.schedule-row__body strong {
  display: block;
  font-size: var(--text-sm);
  color: var(--ink);
}

.schedule-row__body small {
  display: block;
  margin-top: 1px;
  font-size: 11px;
  color: var(--muted);
}

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

.request {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.request__top {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.request__body {
  flex: 1;
  min-width: 0;
}

.request__body strong {
  display: block;
  font-size: var(--text-sm);
  color: var(--ink);
}

.request__body small {
  display: block;
  margin-top: 1px;
  font-size: 11px;
  color: var(--muted);
}

.request__actions {
  display: flex;
  gap: 6px;
}

.request__actions .btn {
  min-height: 34px;
  padding-inline: 12px;
  font-size: var(--text-xs);
}

.request__actions .btn--approve {
  background: var(--teal-600);
  color: #fff;
}

.request__actions .btn--approve:hover {
  background: var(--teal-700);
}

.request__actions .btn--decline {
  background: var(--surface);
  border-color: var(--line-strong);
  color: var(--muted-strong);
}

.request__actions .btn--decline:hover {
  border-color: var(--red-600);
  color: var(--red-700);
}

.request-note {
  font-size: 11px;
  color: var(--muted);
}

.course-admin-list {
  display: grid;
  gap: 2px;
}

.course-admin {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.course-admin:last-child {
  border-bottom: 0;
}

.course-admin .course-thumb {
  width: 46px;
  height: 46px;
}

.course-admin__body {
  flex: 1;
  min-width: 0;
}

.course-admin__body strong {
  display: block;
  font-size: var(--text-sm);
  color: var(--ink);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.course-admin__body small {
  display: block;
  margin-top: 1px;
  font-size: 11px;
  color: var(--muted);
}

.course-admin__side {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: none;
}

.course-admin__side .switch span {
  font-size: 11px;
  min-width: 54px;
}

.chart {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  height: 168px;
  padding-top: var(--sp-4);
}

.chart-col {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  height: 100%;
}

.chart-bar {
  width: 100%;
  max-width: 38px;
  border-radius: 6px 6px 2px 2px;
  background: var(--blue-600);
  min-height: 4px;
}

.chart-bar--muted {
  background: var(--blue-100);
}

.chart-col span {
  font-size: 10px;
  color: var(--muted);
  white-space: nowrap;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-4);
  margin-top: var(--sp-4);
  font-size: var(--text-xs);
  color: var(--muted);
}

.chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.chart-legend i {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--blue-600);
}

.h-38 { height: 38%; }
.h-48 { height: 48%; }
.h-58 { height: 58%; }
.h-66 { height: 66%; }
.h-74 { height: 74%; }
.h-86 { height: 86%; }

.attendance-list {
  display: grid;
  gap: 0;
}

.attendance-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.attendance-row:last-child {
  border-bottom: 0;
}

.attendance-row__body {
  flex: 1;
  min-width: 0;
}

.attendance-row__body strong {
  display: block;
  font-size: var(--text-sm);
  color: var(--ink);
}

.attendance-row__body small {
  display: block;
  font-size: 11px;
  color: var(--muted);
}

.attendance-row .segmented {
  flex: none;
}

.attendance-row .segmented button {
  min-height: 30px;
  padding: 4px 7px;
}

.attendance-row .segmented button[aria-pressed="true"] {
  background: var(--teal-600);
  color: #fff;
}

.attendance-status {
  display: none;
  font-size: 11px;
  color: var(--muted);
  flex: none;
}

@media (min-width: 760px) {
  .attendance-status {
    display: inline;
    min-width: 72px;
    text-align: right;
  }
}

.integration-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.integration-row:last-child {
  border-bottom: 0;
}

.integration-row__icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--surface-alt);
  color: var(--navy-700);
  flex: none;
}

.integration-row__body {
  flex: 1;
  min-width: 0;
}

.integration-row__body strong {
  display: block;
  font-size: var(--text-sm);
  color: var(--ink);
}

.integration-row__body small {
  display: block;
  margin-top: 1px;
  font-size: 11px;
  color: var(--muted);
}

/* Settings forms */

.form-card {
  padding: var(--sp-5);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  display: grid;
  gap: var(--sp-4);
}

.form-card h3 {
  font-size: var(--text-base);
}

.form-grid {
  display: grid;
  gap: var(--sp-4);
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  justify-content: flex-end;
  padding-top: var(--sp-2);
}

@media (min-width: 760px) {
  .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .form-grid .field--full {
    grid-column: 1 / -1;
  }
}

/* Mobile table stacking */

@media (max-width: 899px) {
  .data-table--stack thead {
    display: none;
  }

  .data-table--stack,
  .data-table--stack tbody,
  .data-table--stack tr,
  .data-table--stack td {
    display: block;
    width: 100%;
  }

  .data-table--stack tr {
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
  }

  .data-table--stack tr:last-child {
    border-bottom: 0;
  }

  .data-table--stack td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-4);
    padding: 3px 0;
    border: 0;
    text-align: right;
  }

  .data-table--stack td::before {
    content: attr(data-label);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
    text-align: left;
    flex: none;
  }

  .data-table--stack td[data-label=""]::before,
  .data-table--stack td:first-child::before {
    display: none;
  }

  .data-table--stack td:first-child {
    justify-content: flex-start;
    text-align: left;
    padding-bottom: 8px;
  }

  .data-table--stack .cell-person {
    text-align: left;
  }
}

/* --------------------------------------------------------------------------
   Design system page
   -------------------------------------------------------------------------- */

.ds-hero {
  padding-block: var(--sp-10) var(--sp-8);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.ds-hero h1 {
  font-size: clamp(2rem, 1.6rem + 2vw, 3rem);
  max-width: 20ch;
}

.ds-hero p {
  max-width: 60ch;
  margin-top: var(--sp-3);
  color: var(--muted-strong);
  line-height: var(--leading-relaxed);
}

.ds-hero .eyebrow {
  margin-top: 0;
  color: var(--teal-700);
}

.ds-hero .cluster {
  margin-top: var(--sp-5);
}

.ds-subnav {
  position: sticky;
  top: var(--header-height);
  z-index: 40;
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}

.ds-subnav nav {
  display: flex;
  gap: 2px;
  overflow-x: auto;
  padding-block: 8px;
  scrollbar-width: none;
}

.ds-subnav nav::-webkit-scrollbar {
  display: none;
}

.ds-subnav a {
  flex: none;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  color: var(--muted-strong);
}

.ds-subnav a:hover {
  background: var(--surface-alt);
  color: var(--ink);
}

.ds-section {
  padding-block: var(--sp-12);
  border-bottom: 1px solid var(--line);
  scroll-margin-top: calc(var(--header-height) + 56px);
}

.ds-section > .container > h2 {
  font-size: var(--text-2xl);
  margin-bottom: var(--sp-2);
}

.ds-section > .container > p {
  max-width: 66ch;
  color: var(--muted-strong);
  font-size: var(--text-sm);
  line-height: 1.7;
  margin-bottom: var(--sp-8);
}

.ds-block {
  display: grid;
  gap: var(--sp-4);
  margin-bottom: var(--sp-10);
}

.ds-block > h3 {
  font-size: var(--text-base);
  font-family: var(--font-body);
  font-weight: 700;
  color: var(--ink);
}

.ds-block > h3 span {
  font-weight: 400;
  color: var(--muted);
  font-size: var(--text-xs);
  margin-left: 8px;
}

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

.swatch {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.swatch__color {
  height: 64px;
}

.swatch__meta {
  padding: 8px 10px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
}

.swatch__meta strong {
  display: block;
  font-size: var(--text-xs);
  color: var(--ink);
}

.swatch__meta code {
  font-size: 10px;
  color: var(--muted);
}

.type-specimen {
  display: grid;
  gap: var(--sp-5);
  padding: var(--sp-6);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.type-specimen > div {
  display: grid;
  gap: 4px;
  padding-bottom: var(--sp-5);
  border-bottom: 1px solid var(--line);
}

.type-specimen > div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.type-specimen small {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.type-specimen p {
  font-size: var(--text-sm);
  color: var(--muted-strong);
}

.token-row {
  display: grid;
  gap: 10px;
}

.token-list {
  display: grid;
  gap: 8px;
  padding: var(--sp-5);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.token-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
  font-size: var(--text-xs);
  color: var(--muted-strong);
}

.token-item:last-child {
  border-bottom: 0;
}

.token-item code {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
  color: var(--navy-800);
  background: var(--surface-alt);
  padding: 2px 6px;
  border-radius: 4px;
}

.spacing-demo {
  display: grid;
  gap: 8px;
}

.spacing-demo div {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  color: var(--muted);
}

.spacing-demo i {
  display: block;
  height: 10px;
  background: var(--blue-100);
  border-radius: 2px;
}

.spacing-demo i:nth-child(1) {
  width: 8px;
}

.spacing-demo div:nth-child(1) i { width: 8px; }
.spacing-demo div:nth-child(2) i { width: 12px; }
.spacing-demo div:nth-child(3) i { width: 16px; }
.spacing-demo div:nth-child(4) i { width: 24px; }
.spacing-demo div:nth-child(5) i { width: 32px; }
.spacing-demo div:nth-child(6) i { width: 48px; }
.spacing-demo div:nth-child(7) i { width: 64px; }
.spacing-demo div:nth-child(8) i { width: 96px; }

.ds-component-grid {
  display: grid;
  gap: var(--sp-5);
}

.ds-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-5);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.ds-panel--stack {
  display: grid;
  align-items: stretch;
  gap: var(--sp-4);
}

.ds-panel--tint {
  background: var(--bg);
}

.ds-spec {
  display: flex;
  flex-wrap: wrap;
  gap: 8px var(--sp-4);
  font-size: 11px;
  color: var(--muted);
}

.ds-spec code {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
}

.ds-demo-form {
  display: grid;
  gap: var(--sp-4);
  width: 100%;
  max-width: 420px;
}

.ds-radius-demo {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.ds-radius-demo span {
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  background: var(--blue-50);
  border: 1px solid var(--blue-100);
  color: var(--blue-700);
  font-size: 10px;
}

.ds-shadow-demo {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-5);
  padding: var(--sp-6);
}

.ds-shadow-demo div {
  display: grid;
  place-items: center;
  width: 120px;
  height: 80px;
  border-radius: var(--radius-md);
  background: var(--surface);
  font-size: 10px;
  color: var(--muted);
}

.ds-empty-demo {
  display: grid;
  gap: var(--sp-4);
}

@media (min-width: 700px) {
  .swatch-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

  .ds-component-grid .ds-panel--wide {
    grid-column: span 2;
  }
}

@media (min-width: 1024px) {
  .swatch-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .token-row {
    grid-template-columns: 1fr 1fr;
  }
}

/* Reveal on scroll, opt-in and reduced-motion safe */

[data-reveal] {
  opacity: 1;
}

@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 500ms var(--ease-out), transform 500ms var(--ease-out);
  }

  .js [data-reveal].is-visible {
    opacity: 1;
    transform: none;
  }
}

/* --------------------------------------------------------------------------
   Shared dashboard utilities and detail views
   -------------------------------------------------------------------------- */

.chart-value {
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
  color: var(--muted-strong);
}

.h-62 { height: 62%; }
.h-78 { height: 78%; }
.w-28 { width: 28%; }
.w-74 { width: 74%; }

.span-5,
.span-7 {
  min-width: 0;
}

@media (min-width: 900px) {
  .span-5 {
    grid-column: span 5;
  }

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

.course-progress {
  display: grid;
  gap: 6px;
  margin-top: 2px;
}

.welcome__content {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.attendance-status.is-present {
  color: var(--green-700);
}

.attendance-status.is-absent {
  color: var(--red-700);
}

.detail-list {
  display: grid;
  gap: 0;
  margin: 0;
}

.detail-list > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-4);
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.detail-list > div:last-child {
  border-bottom: 0;
}

.detail-list dt {
  font-size: var(--text-sm);
  color: var(--muted);
}

.detail-list dd {
  margin: 0;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--ink);
  text-align: right;
}

.sheet-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-sm);
}

.on-dark-muted {
  color: var(--on-dark-muted);
}

/* Design system code samples */

.ds-code {
  margin: 0;
  padding: var(--sp-5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  background: var(--navy-950);
  color: #dbe7f4;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 11.5px;
  line-height: 1.85;
  overflow-x: auto;
  tab-size: 2;
}

/* Design system type specimens */

.ds-display {
  font-family: var(--font-display);
  font-size: var(--text-5xl);
  font-weight: 700;
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--navy-800);
}

.ds-h2 {
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  font-weight: 700;
  line-height: var(--leading-snug);
  letter-spacing: var(--tracking-tight);
  color: var(--navy-800);
}

.ds-h3 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  line-height: var(--leading-snug);
  color: var(--navy-800);
}

.ds-body {
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  color: var(--muted-strong);
}

.ds-component-grid .course-card {
  max-width: 360px;
}

.ds-inline-swatch {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 3px;
  border: 1px solid rgba(15, 36, 64, 0.12);
  vertical-align: -1px;
  margin-right: 6px;
}

/* Small layout utilities used by documentation pages */

.w-45 { width: 45%; }

.cluster--nowrap { flex-wrap: nowrap; }

.grow {
  flex: 1;
  min-width: 0;
}

.mt-5 { margin-top: var(--sp-5); }

@media (max-width: 899px) {
  .data-table--stack td .course-progress {
    flex: 1 1 120px;
    max-width: 180px;
  }

  .data-table--stack td[data-label=""]:not(:first-child) {
    justify-content: flex-end;
  }
}

/* Prevent dense rows from forcing horizontal overflow on small screens */

.lesson-row,
.schedule-row {
  min-width: 0;
}

.row-between {
  flex-wrap: wrap;
}

@media (max-width: 560px) {
  .demo-chip > span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
}

@media (max-width: 560px) {
  .schedule-row {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr) auto;
    grid-template-areas:
      "time body body"
      "time meta action";
    row-gap: 8px;
  }

  .schedule-time {
    grid-area: time;
    align-self: start;
  }

  .schedule-row__body {
    grid-area: body;
  }

  .schedule-row .badge {
    grid-area: meta;
    justify-self: start;
  }

  .schedule-row .btn {
    grid-area: action;
  }
}

@media (max-width: 560px) {
  .app-topbar {
    gap: 8px;
    padding-inline: 12px;
  }

  .app-topbar-actions {
    gap: 6px;
  }

  .app-topbar-title small {
    display: none;
  }
}

@media (max-width: 560px) {
  .app-topbar .topbar-user {
    display: none;
  }
}

.data-table th {
  position: relative;
}

/* Keep toasts clear of the WhatsApp action on public pages */

body:has(.whatsapp-float) .toast-region {
  bottom: calc(18px + 56px + 18px);
}

@media (min-width: 900px) {
  body:has(.whatsapp-float) .toast-region {
    bottom: calc(28px + 56px + 18px);
  }
}

.progress-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 110px;
}

.progress-cell .progress {
  flex: 1;
}

.progress-cell > span {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  flex: none;
}

@media (max-width: 899px) {
  .data-table--stack td .progress-cell {
    flex: 1;
    max-width: 220px;
  }
}

/* ==========================================================================
   Course detail page
   ========================================================================== */

.course-detail-hero {
  padding-block: var(--sp-6) var(--sp-10);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.course-hero-grid {
  display: grid;
  gap: var(--sp-8);
  align-items: center;
}

.course-hero-media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: var(--surface-alt);
  box-shadow: var(--shadow-md);
}

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

.course-hero-media .level-chip {
  position: absolute;
  left: var(--sp-4);
  top: var(--sp-4);
}

.course-hero-body h1 {
  margin-block: var(--sp-3) var(--sp-4);
  font-size: var(--text-4xl);
}

.course-lead {
  max-width: 58ch;
  color: var(--muted-strong);
  font-size: var(--text-lg);
  line-height: var(--leading-relaxed);
}

.course-facts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3) var(--sp-5);
  margin-top: var(--sp-5);
}

.course-facts span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted-strong);
  font-size: var(--text-sm);
}

.course-facts .icon {
  width: 17px;
  height: 17px;
  color: var(--blue-600);
}

.course-detail-grid {
  display: grid;
  gap: var(--sp-8);
}

.course-detail-main {
  display: grid;
  gap: var(--sp-10);
  min-width: 0;
}

.course-detail-aside {
  display: grid;
  gap: var(--sp-5);
  align-content: start;
}

.detail-block > h2 {
  margin-bottom: var(--sp-4);
  font-size: var(--text-2xl);
}

.detail-block > p {
  color: var(--muted-strong);
  line-height: var(--leading-relaxed);
}

.enrol-card {
  padding: var(--sp-6);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.enrol-card .price {
  margin-bottom: var(--sp-4);
}

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

.enrol-list {
  display: grid;
  gap: 10px;
  margin-block: var(--sp-4) var(--sp-5);
  font-size: var(--text-sm);
  color: var(--muted-strong);
}

.enrol-list li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  line-height: 1.5;
}

.enrol-list .icon {
  flex: none;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  color: var(--teal-700);
}

.enrol-card .btn + .btn {
  margin-top: 8px;
}

.enrol-note {
  margin-top: var(--sp-4);
  font-size: var(--text-xs);
  color: var(--muted);
  line-height: 1.6;
}

.outcome-grid {
  display: grid;
  gap: var(--sp-4);
}

.outcome {
  display: flex;
  gap: var(--sp-3);
  padding: var(--sp-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.outcome .icon {
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  color: var(--teal-700);
}

.outcome strong {
  display: block;
  font-size: var(--text-sm);
  color: var(--navy-text);
}

.outcome p {
  margin-top: 3px;
  font-size: var(--text-xs);
  color: var(--muted);
  line-height: 1.55;
}

.curriculum {
  display: grid;
  gap: 10px;
}

.curriculum-item {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.curriculum-item summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--navy-text);
  cursor: pointer;
  list-style: none;
}

.curriculum-item summary::-webkit-details-marker {
  display: none;
}

.curriculum-item summary .week {
  flex: none;
  min-width: 58px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue-700);
}

.curriculum-item summary .icon {
  flex: none;
  margin-left: auto;
  width: 18px;
  height: 18px;
  color: var(--muted);
  transition: transform var(--dur-fast) var(--ease-out);
}

.curriculum-item[open] summary .icon {
  transform: rotate(180deg);
}

.curriculum-body {
  padding: 0 16px 16px;
  font-size: var(--text-sm);
  color: var(--muted-strong);
  line-height: 1.65;
}

.curriculum-body ul {
  display: grid;
  gap: 6px;
  margin-top: 8px;
  padding-left: 18px;
  list-style: disc;
}

.teacher-mini {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-5);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.teacher-mini .avatar {
  width: 56px;
  height: 56px;
  font-size: var(--text-base);
}

.teacher-mini strong {
  display: block;
  color: var(--navy-text);
}

.teacher-mini small {
  display: block;
  margin-top: 2px;
  font-size: var(--text-xs);
  color: var(--muted);
}

.teacher-mini .btn {
  margin-left: auto;
}

.related-grid {
  display: grid;
  gap: var(--sp-5);
}

@media (min-width: 700px) {
  .outcome-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (min-width: 960px) {
  .course-hero-grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  }

  .course-detail-grid {
    grid-template-columns: minmax(0, 1fr) 340px;
    align-items: start;
  }

  .course-detail-aside .enrol-card {
    position: sticky;
    top: calc(var(--header-height) + 18px);
  }

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

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

/* ==========================================================================
   Pricing page
   ========================================================================== */

.rate-grid {
  display: grid;
  gap: var(--sp-4);
}

.rate-card {
  padding: var(--sp-5);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.rate-card .rate-label {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.rate-card strong {
  display: block;
  margin-block: 6px 2px;
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  color: var(--navy-800);
}

.rate-card p {
  font-size: var(--text-sm);
  color: var(--muted);
}

.rate-card--free {
  border-color: var(--teal-100);
  background: var(--teal-50);
}

.pay-grid {
  display: grid;
  gap: var(--sp-4);
}

.pay-card {
  display: flex;
  gap: var(--sp-3);
  padding: var(--sp-5);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.pay-card .icon {
  flex: none;
  width: 22px;
  height: 22px;
  color: var(--blue-600);
}

.pay-card strong {
  display: block;
  font-size: var(--text-sm);
  color: var(--navy-text);
}

.pay-card p {
  margin-top: 3px;
  font-size: var(--text-xs);
  color: var(--muted);
  line-height: 1.55;
}

.include-grid {
  display: grid;
  gap: 12px;
}

.include-grid li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: var(--text-sm);
  color: var(--muted-strong);
  line-height: 1.5;
}

.include-grid .icon {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  color: var(--teal-700);
}

@media (min-width: 620px) {
  .rate-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

@media (min-width: 760px) {
  .include-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ==========================================================================
   About the teacher page
   ========================================================================== */

.about-hero {
  padding-block: var(--sp-10) var(--sp-12);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.about-grid {
  display: grid;
  gap: var(--sp-8);
  align-items: center;
}

.about-portrait {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: var(--surface-alt);
  box-shadow: var(--shadow-md);
}

.about-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 5;
}

.about-portrait figcaption {
  position: absolute;
  left: var(--sp-4);
  right: var(--sp-4);
  bottom: var(--sp-4);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background: rgba(11, 27, 49, 0.86);
  color: #fff;
  font-size: var(--text-xs);
  backdrop-filter: blur(8px);
}

.about-copy h1 {
  margin-block: var(--sp-3) var(--sp-4);
  font-size: var(--text-4xl);
}

.about-copy > p {
  max-width: 58ch;
  color: var(--muted-strong);
  font-size: var(--text-lg);
  line-height: var(--leading-relaxed);
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-4);
  margin-top: var(--sp-6);
}

.about-stat {
  padding: var(--sp-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-alt);
}

.about-stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  line-height: 1;
  color: var(--navy-800);
}

.about-stat span {
  display: block;
  margin-top: 6px;
  font-size: var(--text-xs);
  color: var(--muted);
}

.credentials {
  display: grid;
  gap: var(--sp-4);
}

.credential {
  display: flex;
  gap: var(--sp-3);
  padding: var(--sp-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.credential .icon {
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  color: var(--blue-600);
}

.credential strong {
  display: block;
  font-size: var(--text-sm);
  color: var(--navy-text);
}

.credential p {
  margin-top: 2px;
  font-size: var(--text-xs);
  color: var(--muted);
  line-height: 1.55;
}

.timeline {
  display: grid;
  gap: 0;
  padding-left: var(--sp-2);
}

.timeline-item {
  position: relative;
  padding: 0 0 var(--sp-6) var(--sp-6);
  border-left: 1px solid var(--line);
}

.timeline-item:last-child {
  padding-bottom: 0;
  border-left-color: transparent;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 4px;
  width: 9px;
  height: 9px;
  border: 2px solid var(--surface);
  border-radius: 50%;
  background: var(--blue-600);
  box-shadow: 0 0 0 1px var(--blue-600);
}

.timeline-item:last-child::before {
  background: var(--teal-500);
  box-shadow: 0 0 0 1px var(--teal-500);
}

.timeline-item .timeline-year {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue-700);
}

.timeline-item strong {
  display: block;
  margin-top: 3px;
  font-size: var(--text-sm);
  color: var(--navy-text);
}

.timeline-item p {
  margin-top: 3px;
  font-size: var(--text-sm);
  color: var(--muted-strong);
  line-height: 1.6;
}

@media (min-width: 620px) {
  .credentials {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 900px) {
  .about-grid {
    grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
  }

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

/* ==========================================================================
   Booking page
   ========================================================================== */

.booking-page-hero {
  padding-block: var(--sp-8) var(--sp-10);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.booking-page {
  padding-block: var(--sp-8) var(--sp-12);
}

.booking-page-layout {
  display: grid;
  gap: var(--sp-6);
  align-items: start;
}

.booking-card {
  padding: var(--sp-5);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.booking-card .booking-block {
  padding: 0;
  border: 0;
  padding-bottom: var(--sp-5);
}

.booking-card .booking-block + .booking-block {
  padding-top: var(--sp-5);
  border-top: 1px solid var(--line);
}

.booking-card .booking-block:last-child {
  padding-bottom: 0;
}

.calendar {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: var(--sp-3);
  background: var(--surface-alt);
}

.calendar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  margin-bottom: var(--sp-3);
}

.calendar-head strong {
  font-size: var(--text-sm);
  color: var(--navy-text);
}

.calendar-head span {
  font-size: var(--text-xs);
  color: var(--muted);
}

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

.calendar-weekdays {
  margin-bottom: 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
}

.calendar-day {
  display: grid;
  place-items: center;
  gap: 1px;
  min-height: 48px;
  padding: 4px 2px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: var(--text-xs);
  color: var(--navy-text);
  transition: border-color var(--dur-fast) var(--ease-out),
    background var(--dur-fast) var(--ease-out);
}

.calendar-day span {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.calendar-day strong {
  font-family: var(--font-display);
  font-size: var(--text-base);
  line-height: 1.1;
}

.calendar-day:hover {
  border-color: var(--line-strong);
}

.calendar-day[aria-pressed="true"] {
  border-color: var(--blue-600);
  background: var(--blue-600);
  color: #fff;
}

.calendar-day[aria-pressed="true"] span {
  color: rgba(255, 255, 255, 0.75);
}

.calendar-day.is-empty {
  background: transparent;
}

.booking-page .booking-summary {
  position: sticky;
  top: calc(var(--header-height) + 18px);
  padding: var(--sp-5);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.booking-page .booking-summary h3 {
  margin-bottom: var(--sp-3);
}

.booking-page .booking-success {
  max-width: 720px;
  margin-inline: auto;
  padding: var(--sp-8);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.booking-contact {
  display: grid;
  gap: var(--sp-4);
}

@media (min-width: 540px) {
  .booking-contact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .booking-contact .field--full {
    grid-column: 1 / -1;
  }
}

@media (min-width: 960px) {
  .booking-page-layout {
    grid-template-columns: minmax(0, 1fr) 360px;
  }

  .booking-card {
    padding: var(--sp-6);
  }
}

/* ==========================================================================
   Authentication page
   ========================================================================== */

.auth-page {
  padding-block: var(--sp-8) var(--sp-12);
  background:
    radial-gradient(60% 60% at 12% 0%, rgba(37, 99, 235, 0.07), transparent 60%),
    radial-gradient(50% 50% at 100% 20%, rgba(22, 184, 166, 0.08), transparent 60%),
    var(--bg);
}

.auth-layout {
  display: grid;
  gap: var(--sp-6);
  max-width: 1040px;
  margin-inline: auto;
}

.auth-aside {
  position: relative;
  overflow: hidden;
  padding: var(--sp-6);
  border-radius: var(--radius-xl);
  background: var(--navy-900);
  color: #fff;
}

.auth-aside::after {
  content: "";
  position: absolute;
  right: -12%;
  bottom: -18%;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(22, 184, 166, 0.3), transparent 70%);
}

.auth-aside .brand-name,
.auth-aside .brand-sub {
  color: #fff;
}

.auth-aside .brand-sub {
  color: #91a2b8;
}

.auth-aside h2 {
  margin-top: var(--sp-6);
  font-size: var(--text-2xl);
  line-height: var(--leading-snug);
}

.auth-aside p {
  margin-top: var(--sp-3);
  color: #c1cede;
  font-size: var(--text-sm);
  line-height: 1.65;
}

.auth-benefits {
  display: grid;
  gap: 10px;
  margin-top: var(--sp-5);
  font-size: var(--text-sm);
  color: #dbe4ef;
}

.auth-benefits li {
  display: flex;
  gap: 9px;
  align-items: flex-start;
}

.auth-benefits .icon {
  flex: none;
  width: 17px;
  height: 17px;
  margin-top: 1px;
  color: var(--teal-500);
}

.auth-card {
  padding: var(--sp-6);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.auth-card h1,
.auth-card h2 {
  font-size: var(--text-2xl);
}

.auth-card > p {
  margin-top: 6px;
  font-size: var(--text-sm);
  color: var(--muted);
}

.auth-tabs {
  display: flex;
  gap: 4px;
  margin-top: var(--sp-5);
  padding: 4px;
  border-radius: var(--radius-pill);
  background: var(--surface-alt);
}

.auth-tab {
  flex: 1;
  min-height: 40px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--muted-strong);
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out),
    color var(--dur-fast) var(--ease-out);
}

.auth-tab:hover {
  color: var(--navy-text);
}

.auth-tab[aria-selected="true"] {
  background: var(--surface);
  color: var(--navy-800);
  box-shadow: var(--shadow-xs);
}

.auth-panel {
  display: grid;
  gap: var(--sp-4);
  padding-top: var(--sp-5);
}

.auth-panel[hidden] {
  display: none;
}

.auth-panel .btn {
  margin-top: 4px;
}

.auth-panel .field-hint {
  margin-top: 4px;
}

.auth-panel .alert {
  margin-top: 2px;
}

.auth-switch {
  margin-top: var(--sp-4);
  font-size: var(--text-sm);
  color: var(--muted);
  text-align: center;
}

.auth-page-note {
  margin-top: var(--sp-4);
  font-size: var(--text-xs);
  color: var(--muted);
  line-height: 1.6;
  text-align: center;
}

@media (min-width: 900px) {
  .auth-layout {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    align-items: stretch;
  }

  .auth-aside {
    padding: var(--sp-10);
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .auth-card {
    padding: var(--sp-8);
  }
}

/* ==========================================================================
   Course learning experience
   ========================================================================== */

.learn-shell .app-sidebar {
  gap: var(--sp-4);
}

.learn-course {
  display: grid;
  gap: 6px;
  padding: var(--sp-3);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
}

.learn-course strong {
  font-size: var(--text-sm);
  color: #fff;
}

.learn-course small {
  font-size: 11px;
  color: #91a2b8;
}

.learn-course .progress {
  background: rgba(255, 255, 255, 0.14);
}

.learn-course .progress > span {
  background: var(--teal-500);
}

.learn-nav {
  display: grid;
  gap: 2px;
}

.learn-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  color: #c1cede;
  font-size: var(--text-sm);
}

.learn-nav a:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.learn-nav a[aria-current="page"] {
  background: rgba(22, 184, 166, 0.16);
  color: #fff;
}

.learn-nav .num {
  display: grid;
  place-items: center;
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  font-size: 10px;
  font-weight: 700;
}

.learn-nav a.is-done .num {
  background: var(--teal-500);
  color: var(--navy-950);
}

.learn-nav a.is-locked {
  opacity: 0.45;
}

.learn-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--sp-3);
}

.learn-head h1 {
  font-size: var(--text-3xl);
}

.learn-head p {
  margin-top: 4px;
  color: var(--muted);
  font-size: var(--text-sm);
}

.learn-progress {
  min-width: 190px;
  display: grid;
  gap: 5px;
}

.learn-progress .progress-meta {
  margin: 0;
}

.learn-layout {
  display: grid;
  gap: var(--sp-5);
  align-items: start;
}

.learn-main {
  display: grid;
  gap: var(--sp-5);
  min-width: 0;
}

.learn-video {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--navy-950);
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
}

.learn-video img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.4;
}

.learn-video .play {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 66px;
  height: 66px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  color: var(--navy-900);
  box-shadow: var(--shadow-md);
  cursor: pointer;
}

.learn-video .play:hover {
  background: #fff;
}

.learn-video .play .icon {
  width: 26px;
  height: 26px;
  margin-left: 3px;
}

.learn-video .video-tag {
  position: absolute;
  z-index: 1;
  left: var(--sp-4);
  bottom: var(--sp-4);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  border-radius: var(--radius-pill);
  background: rgba(11, 27, 49, 0.72);
  color: #fff;
  font-size: 11px;
  font-weight: 500;
  backdrop-filter: blur(6px);
}

.lesson-block {
  display: grid;
  gap: var(--sp-3);
  padding: var(--sp-5);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.lesson-block > h2 {
  font-size: var(--text-xl);
}

.lesson-block p {
  color: var(--muted-strong);
  font-size: var(--text-sm);
  line-height: 1.7;
}

.lesson-objectives {
  display: grid;
  gap: 9px;
  font-size: var(--text-sm);
  color: var(--muted-strong);
}

.lesson-objectives li {
  display: flex;
  gap: 9px;
  align-items: flex-start;
}

.lesson-objectives .icon {
  flex: none;
  width: 17px;
  height: 17px;
  margin-top: 1px;
  color: var(--teal-700);
}

.example-box {
  padding: var(--sp-4);
  border-left: 3px solid var(--blue-600);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--blue-50);
  font-size: var(--text-sm);
  color: var(--navy-700);
  line-height: 1.65;
}

.example-box strong {
  color: var(--navy-800);
}

.learn-side {
  display: grid;
  gap: var(--sp-4);
}

.learn-side .card {
  padding: var(--sp-5);
}

.learn-side h2 {
  font-size: var(--text-base);
}

.outline-list {
  display: grid;
  gap: 2px;
  margin-top: var(--sp-3);
}

.outline-link {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 38px;
  padding: 0 8px;
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  color: var(--muted-strong);
}

.outline-link .icon {
  flex: none;
  width: 15px;
  height: 15px;
}

.outline-link.is-done .icon {
  color: var(--teal-700);
}

.outline-link.is-current {
  background: var(--blue-50);
  color: var(--blue-700);
  font-weight: 600;
}

.outline-link.is-locked {
  opacity: 0.55;
}

.lesson-materials {
  display: grid;
  gap: 8px;
}

.material-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: var(--text-xs);
  color: var(--muted-strong);
}

.material-row .icon {
  flex: none;
  width: 17px;
  height: 17px;
  color: var(--blue-600);
}

.material-row .material-size {
  margin-left: auto;
  font-size: 10px;
  color: var(--muted);
}

.assignment-card {
  display: grid;
  gap: var(--sp-3);
  padding: var(--sp-5);
  border: 1px solid var(--amber-100);
  border-radius: var(--radius-lg);
  background: var(--amber-50);
}

.assignment-card h3 {
  font-size: var(--text-base);
}

.assignment-card p {
  font-size: var(--text-sm);
  color: var(--amber-700);
}

.assignment-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-4);
  font-size: var(--text-xs);
  color: var(--muted-strong);
}

.assignment-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.assignment-meta .icon {
  width: 15px;
  height: 15px;
}

.discussion-form {
  display: grid;
  gap: var(--sp-3);
}

.comment {
  display: flex;
  gap: var(--sp-3);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--line);
}

.comment .avatar {
  flex: none;
  width: 34px;
  height: 34px;
  font-size: 11px;
}

.comment strong {
  font-size: var(--text-sm);
  color: var(--navy-text);
}

.comment small {
  margin-left: 6px;
  font-size: 10px;
  color: var(--muted);
}

.comment p {
  margin-top: 3px;
  font-size: var(--text-sm);
  color: var(--muted-strong);
}

.next-class-card {
  display: grid;
  gap: 10px;
  padding: var(--sp-5);
  border-radius: var(--radius-lg);
  background: var(--navy-900);
  color: #fff;
}

.next-class-card .eyebrow {
  color: var(--teal-500);
}

.next-class-card strong {
  font-family: var(--font-display);
  font-size: var(--text-lg);
}

.next-class-card small {
  font-size: var(--text-xs);
  color: #aab8cc;
}

.next-class-card .btn {
  margin-top: 2px;
}

@media (min-width: 960px) {
  .learn-layout {
    grid-template-columns: minmax(0, 1fr) 320px;
  }

  .learn-side {
    position: sticky;
    top: 84px;
  }
}

.mt-3 { margin-top: var(--sp-3); }
.mt-4 { margin-top: var(--sp-4); }
.pay-grid--stack { grid-template-columns: 1fr; }

.mt-6 { margin-top: var(--sp-6); }
.ml-auto { margin-left: auto; }
.text-xl { font-size: var(--text-xl); }

.course-hero-grid { margin-top: var(--sp-6); }
.booking-card .booking-block h2 { font-size: var(--text-lg); }
[data-complete][aria-pressed="true"] {
  background: var(--green-600);
  border-color: var(--green-600);
  color: #fff;
}
[data-complete][aria-pressed="true"]:hover { background: var(--green-700); }

.booking-page .booking-summary { color: var(--ink); }
.booking-page .booking-summary h3,
.booking-page .booking-teacher strong,
.booking-page .summary-rows dd,
.booking-page .summary-total strong { color: var(--navy-text); }
.booking-page .booking-teacher small,
.booking-page .summary-rows dt,
.booking-page .summary-total span,
.booking-page .summary-note { color: var(--muted); }
.booking-page .summary-rows { border-color: var(--line); }
.booking-page .booking-teacher .avatar { background: var(--blue-50); color: var(--blue-700); }
.booking-page .booking-summary .btn--confirm { background: var(--blue-600); color: #fff; }
.booking-page .booking-summary .btn--confirm:hover { background: var(--blue-700); }

@media (max-width: 359px) {
  .header-actions .lang-switch { display: none; }
}

@media (max-width: 359px) {
  .trust-list { grid-template-columns: 1fr; }
  .attendance-row { flex-wrap: wrap; }
  .attendance-row .segmented { width: 100%; }
}

.booking-success h2:focus,
.booking-success h3:focus { outline: none; }

@media (max-width: 959px) {
  .course-hero-grid { grid-template-columns: minmax(0, 1fr); }
}
.course-hero-media,
.course-hero-body,
.auth-card,
.auth-tab { min-width: 0; }
.course-hero-body .btn { white-space: normal; }
@media (max-width: 899px) {
  .auth-layout { grid-template-columns: minmax(0, 1fr); }
}

.auth-aside h2 { color: #fff; }

@media (max-width: 480px) {
  .auth-tab {
    padding-inline: 6px;
    font-size: var(--text-xs);
  }
}
