.apple-home {
  --home-bg: #f5f5f7;
  --home-ink: #1d1d1f;
  --home-muted: #6e6e73;
  --home-blue: #0071e3;
  --home-line: rgba(29, 29, 31, .1);
  color: var(--home-ink);
  background: var(--home-bg);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.apple-home .top {
  height: 64px;
  color: rgba(255, 255, 255, .92);
  background: rgba(18, 18, 20, .92);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  padding: 0 max(28px, calc((100vw - 1200px) / 2));
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
}

.apple-home .brand img { width: 150px; height: 40px; }
.apple-home .brand-divider { height: 20px; margin: 0 15px 0 10px; }
.apple-home .brand-product b { font-size: 12px; letter-spacing: .02em; }
.apple-home .brand-product small { font-size: 8px; letter-spacing: .08em; }
.apple-home .top-actions { gap: 22px; font-size: 12px; }
.apple-home .quiet-button { border: 0; padding: 7px 0; }

.home-page {
  width: min(1200px, calc(100% - 48px));
  max-width: none;
  margin: 0 auto;
  padding: 28px 0 104px;
}

.home-hero {
  min-height: 548px;
  color: #f5f5f7;
  background:
    radial-gradient(circle at 76% 12%, rgba(74, 108, 255, .22), transparent 34%),
    radial-gradient(circle at 72% 88%, rgba(0, 194, 255, .12), transparent 38%),
    linear-gradient(145deg, #161618 0%, #09090a 72%);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 34px;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(330px, .65fr);
  align-items: center;
  gap: 72px;
  padding: clamp(54px, 7vw, 88px);
  position: relative;
  overflow: hidden;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .12);
}

.hero-glow {
  width: 420px;
  height: 420px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.08);
  position: absolute;
  top: -260px;
  right: 10%;
  box-shadow: 0 0 100px rgba(72, 112, 255, .12), inset 0 0 80px rgba(255,255,255,.03);
}

.hero-copy, .learning-overview { position: relative; z-index: 1; }
.hero-copy { min-width: 0; }

.hero-kicker {
  color: #a1a1a6;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .08em;
}

.hero-copy h1 {
  max-width: 710px;
  margin: 20px 0 24px;
  font-size: clamp(46px, 5.2vw, 66px);
  font-weight: 650;
  letter-spacing: -.055em;
  line-height: 1.06;
}

.hero-copy p {
  max-width: 590px;
  margin: 0;
  color: #a1a1a6;
  font-size: 16px;
  line-height: 1.75;
}

.hero-actions { display: flex; align-items: center; gap: 24px; margin-top: 38px; }

.primary-action {
  min-height: 48px;
  padding: 0 20px;
  color: #fff;
  background: var(--home-blue);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  transition: transform .22s ease, background .22s ease;
}

.primary-action:hover { background: #0077ed; transform: translateY(-1px); }
.primary-action svg { width: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.text-action { color: #d2d2d7; font-size: 14px; transition: color .2s ease; }
.text-action:hover { color: #fff; }

.learning-overview {
  padding: 24px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 24px;
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

.overview-head { display: flex; justify-content: space-between; align-items: center; color: #d2d2d7; font-size: 12px; }
.live-dot { color: #86868b; display: flex; align-items: center; gap: 6px; }
.live-dot i { width: 5px; height: 5px; border-radius: 50%; background: #30d158; box-shadow: 0 0 0 4px rgba(48,209,88,.1); }

.progress-visual { display: flex; align-items: center; gap: 20px; padding: 30px 0; }
.progress-ring {
  --progress: 0deg;
  width: 104px;
  height: 104px;
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(#2997ff var(--progress), rgba(255,255,255,.12) 0);
  position: relative;
}
.progress-ring::after { content: ""; position: absolute; inset: 7px; border-radius: inherit; background: #202024; }
.progress-ring div { position: relative; z-index: 1; display: flex; align-items: baseline; }
.progress-ring strong { font-size: 30px; font-weight: 620; letter-spacing: -.04em; }
.progress-ring small { color: #a1a1a6; margin-left: 2px; font-size: 12px; }
.progress-copy { display: grid; gap: 7px; }
.progress-copy strong { font-size: 15px; font-weight: 580; }
.progress-copy span { color: #86868b; font-size: 11px; }

.overview-stats { border-top: 1px solid rgba(255,255,255,.1); display: grid; grid-template-columns: 1fr 1fr; padding-top: 20px; }
.overview-stats div { display: grid; gap: 6px; }
.overview-stats div + div { border-left: 1px solid rgba(255,255,255,.1); padding-left: 22px; }
.overview-stats strong { font-size: 22px; font-weight: 560; letter-spacing: -.03em; }
.overview-stats span { color: #86868b; font-size: 10px; }

.courses-section { padding-top: 86px; scroll-margin-top: 28px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin-bottom: 30px; }
.section-heading span { color: #86868b; font-size: 10px; font-weight: 650; letter-spacing: .14em; }
.section-heading h2 { margin: 9px 0 0; font-size: clamp(30px, 3.5vw, 42px); font-weight: 650; letter-spacing: -.04em; }
.section-heading p { color: #86868b; margin: 0 0 5px; font-size: 13px; }

.apple-home .course-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.apple-home .course-card {
  min-height: 332px;
  padding: 26px;
  color: var(--home-ink);
  background: rgba(255,255,255,.88);
  border: 1px solid rgba(29,29,31,.08);
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 8px rgba(0,0,0,.02);
  transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s ease, border-color .35s ease;
}

.apple-home a.course-card:hover { transform: translateY(-5px); border-color: rgba(0,113,227,.2); box-shadow: 0 20px 55px rgba(0,0,0,.08); }
.course-card > header { display: flex; align-items: center; justify-content: space-between; }
.course-number { color: #c7c7cc; font-size: 30px; font-weight: 600; letter-spacing: -.05em; }
.course-status { padding: 7px 10px; color: #6e6e73; background: #f2f2f4; border-radius: 999px; display: flex; align-items: center; gap: 6px; font-size: 10px; font-weight: 600; }
.course-status i { width: 5px; height: 5px; border-radius: 50%; background: #8e8e93; }
.course-card.available .course-status { color: #0066cc; background: #edf6ff; }
.course-card.available .course-status i { background: #0071e3; }
.course-card.completed .course-status { color: #248a3d; background: #edf8ef; }
.course-card.completed .course-status i { background: #30a14e; }

.course-content { margin: auto 0; }
.course-content > span { color: #86868b; font-size: 11px; }
.course-content h3 { margin: 10px 0 12px; font-size: 24px; font-weight: 650; letter-spacing: -.035em; line-height: 1.2; }
.course-content p { display: -webkit-box; overflow: hidden; margin: 0; color: #6e6e73; font-size: 13px; line-height: 1.7; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

.course-card footer { min-height: 38px; padding-top: 18px; border-top: 1px solid var(--home-line); display: flex; align-items: flex-end; justify-content: space-between; color: #6e6e73; font-size: 11px; }
.course-card footer svg { width: 20px; height: 20px; fill: none; stroke: #1d1d1f; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s ease; }
a.course-card:hover footer svg { transform: translateX(3px); }
.course-card.locked { background: rgba(235,235,239,.62); border-color: transparent; box-shadow: none; }
.course-card.locked .course-number, .course-card.locked h3 { color: #98989d; }
.course-card.locked footer svg { stroke: #98989d; }
button.course-card { width: 100%; text-align: left; font: inherit; cursor: pointer; }
button.course-card.locked:hover, button.course-card.locked:focus-visible { border-color: #d85732; box-shadow: 0 0 0 2px #d8573233; }

.empty-course { grid-column: 1 / -1; text-align: center; border: 1px dashed rgba(29,29,31,.14); border-radius: 24px; padding: 72px 24px; }
.empty-course span { font-size: 18px; font-weight: 600; }
.empty-course p { color: #86868b; margin: 8px 0 0; font-size: 13px; }

.apple-home .site-footer { min-height: 76px; color: #86868b; background: #ededf0; border-top: 1px solid rgba(29,29,31,.08); font-size: 10px; }
.apple-home .site-footer a { color: #6e6e73; }
.apple-home .site-footer a:hover { color: var(--home-blue); }
.home-error { width: min(560px, calc(100% - 40px)); margin: 18vh auto; text-align: center; padding: 50px; background: #fff; border-radius: 24px; }
.home-error strong { font-size: 22px; }
.home-error p { color: #86868b; }

@media (max-width: 980px) {
  .home-hero { min-height: 620px; grid-template-columns: 1fr; gap: 48px; }
  .learning-overview { max-width: 460px; }
  .apple-home .course-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  .apple-home .top { height: 58px; padding: 0 16px; }
  .apple-home .brand img { width: 132px; height: 36px; }
  .home-page { width: min(100% - 24px, 1200px); padding-top: 12px; }
  .home-hero { min-height: 650px; padding: 36px 24px; border-radius: 24px; }
  .hero-copy h1 { font-size: clamp(38px, 10.6vw, 42px); margin-top: 16px; }
  .hero-copy p { font-size: 14px; }
  .hero-actions { align-items: flex-start; flex-direction: column; gap: 18px; margin-top: 30px; }
  .learning-overview { width: 100%; padding: 20px; }
  .progress-ring { width: 88px; height: 88px; }
  .progress-ring strong { font-size: 26px; }
  .courses-section { padding-top: 62px; }
  .section-heading { align-items: flex-start; flex-direction: column; gap: 12px; }
  .section-heading p { display: none; }
  .apple-home .course-grid { grid-template-columns: 1fr; }
  .apple-home .course-card { min-height: 300px; }
  .apple-home .site-footer { align-items: flex-start; flex-direction: column; gap: 8px; padding: 22px 20px; }
  .apple-home .site-footer-links { align-items: flex-start; flex-direction: column; gap: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  .apple-home *, .apple-home *::before, .apple-home *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
