:root {
  color-scheme: light;
  --bg: #f4f7ff;
  --bg-soft: #ffffff;
  --surface: rgba(255, 255, 255, 0.92);
  --surface-strong: #ffffff;
  --panel: #f0f2ff;
  --panel-deep: #e9edff;
  --line: rgba(115, 130, 190, 0.22);
  --text: #1b2559;
  --muted: #64708f;
  --soft: #8994b4;
  --brand: #098dfc;
  --brand-2: #c981ef;
  --brand-3: #48baf8;
  --danger: #ff5c8a;
  --shadow: 0 20px 60px rgba(27, 37, 89, 0.14);
  --radius: 20px;
  --radius-sm: 10px;
  --gradient: linear-gradient(135deg, #48baf8 0%, #098dfc 48%, #c981ef 100%);
  --star-bg: radial-gradient(circle at 18% 20%, rgba(72, 186, 248, 0.16), transparent 28%),
    radial-gradient(circle at 78% 75%, rgba(201, 129, 239, 0.14), transparent 26%),
    linear-gradient(180deg, #f6f8ff 0%, #eef3ff 100%);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #101947;
  --bg-soft: #0a102e;
  --surface: rgba(11, 18, 50, 0.72);
  --surface-strong: rgba(18, 29, 78, 0.88);
  --panel: rgba(27, 37, 89, 0.72);
  --panel-deep: rgba(10, 16, 46, 0.78);
  --line: rgba(194, 200, 255, 0.22);
  --text: #f7f9ff;
  --muted: #c2c8ff;
  --soft: #8ea0d5;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  --star-bg: radial-gradient(circle at 14% 22%, rgba(72, 186, 248, 0.32), transparent 25%),
    radial-gradient(circle at 84% 72%, rgba(201, 129, 239, 0.22), transparent 24%),
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.09) 0 1px, transparent 2px),
    linear-gradient(135deg, #060a20 0%, #101947 45%, #071125 100%);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--text);
  background: var(--star-bg);
  letter-spacing: 0;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.55) 0 1px, transparent 1.5px),
    radial-gradient(circle, rgba(72, 186, 248, 0.36) 0 1px, transparent 1.5px);
  background-size: 110px 110px, 170px 170px;
  opacity: 0.22;
}

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

button {
  font: inherit;
}

.app-shell {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  min-height: 100vh;
}

.side-rail {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  height: 100vh;
  padding: 20px 10px;
  background: color-mix(in srgb, var(--surface-strong) 74%, transparent);
  border-right: 1px solid var(--line);
  box-shadow: inset -10px 0 40px rgba(112, 144, 176, 0.08);
  backdrop-filter: blur(12px);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: #fff;
  background: var(--gradient);
  font-weight: 900;
  box-shadow: 0 0 22px rgba(9, 141, 252, 0.32);
}

.user-pill {
  width: 64px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
}

.user-pill span {
  display: inline-block;
  margin-top: 6px;
  padding: 2px 7px;
  color: #fff;
  border-radius: 999px;
  background: var(--gradient);
  font-size: 10px;
}

.rail-nav {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
}

.rail-link,
.rail-action {
  display: grid;
  place-items: center;
  gap: 6px;
  width: 62px;
  min-height: 58px;
  padding: 8px 4px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.rail-link:hover,
.rail-link.active,
.rail-action:hover {
  color: var(--brand);
  border-color: color-mix(in srgb, var(--brand) 48%, transparent);
  background: color-mix(in srgb, var(--panel) 68%, transparent);
}

.rail-icon {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  color: #fff;
  background: var(--gradient);
  font-size: 15px;
}

.rail-bottom {
  display: grid;
  gap: 10px;
}

.point-card {
  display: grid;
  place-items: center;
  width: 62px;
  min-height: 58px;
  padding: 6px;
  border-radius: 8px;
  border: 1px solid color-mix(in srgb, var(--brand) 60%, var(--brand-2));
  color: var(--brand);
  background: color-mix(in srgb, var(--panel) 70%, transparent);
  font-size: 12px;
  font-weight: 800;
}

.main {
  position: relative;
  z-index: 1;
  min-width: 0;
  padding: 22px 24px 64px;
}

.theme-panel,
.content-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 780px;
  margin-bottom: 14px;
  font-size: clamp(36px, 5vw, 68px);
  line-height: 1.04;
  letter-spacing: 0;
}

.gradient-text {
  background: var(--gradient);
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  background: var(--surface-strong);
  font-weight: 900;
  cursor: pointer;
}

.btn.primary {
  color: #fff;
  border-color: transparent;
  background: var(--gradient);
  box-shadow: 0 10px 30px rgba(9, 141, 252, 0.24);
}

.theme-panel {
  display: grid;
  align-content: space-between;
  padding: 24px;
  overflow: hidden;
}

.theme-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 6px;
  border-radius: 14px;
  background: var(--panel);
}

.theme-switch button {
  min-height: 38px;
  border: 0;
  border-radius: 10px;
  color: var(--muted);
  background: transparent;
  font-weight: 900;
  cursor: pointer;
}

:root[data-theme="light"] .theme-switch [data-theme-choice="light"],
:root[data-theme="dark"] .theme-switch [data-theme-choice="dark"] {
  color: #fff;
  background: var(--gradient);
}

.mini-preview {
  margin-top: 20px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel-deep);
}

.preview-card {
  display: grid;
  gap: 12px;
}

.preview-strip {
  height: 72px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(27, 37, 89, 0.86), rgba(72, 186, 248, 0.32)), url("../screenshots/01-workshop-light.png") center / cover;
}

.preview-input {
  min-height: 108px;
  padding: 16px;
  border-radius: 14px;
  color: var(--soft);
  background: var(--surface-strong);
}

.quick-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 20px;
}

.stat {
  padding: 14px;
  border-radius: 12px;
  background: var(--panel);
}

.stat strong {
  display: block;
  font-size: 22px;
}

.stat span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.content-panel {
  max-width: 1480px;
  margin: 0 auto;
  padding: 26px;
}

.tabs {
  position: sticky;
  top: 12px;
  z-index: 10;
  display: flex;
  gap: 10px;
  margin-bottom: 26px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: color-mix(in srgb, var(--surface-strong) 86%, transparent);
  backdrop-filter: blur(14px);
}

.tab-button {
  min-height: 42px;
  padding: 0 18px;
  border: 0;
  border-radius: 10px;
  color: var(--muted);
  background: transparent;
  font-weight: 900;
  cursor: pointer;
}

.tab-button.active {
  color: #fff;
  background: var(--gradient);
}

.section {
  display: none;
}

.section.active {
  display: block;
}

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

.section-head h2 {
  margin-bottom: 8px;
  font-size: clamp(28px, 3vw, 42px);
}

.section-head p {
  max-width: 720px;
  color: var(--muted);
  line-height: 1.8;
}

.steps {
  display: grid;
  gap: 22px;
}

.step-card {
  display: grid;
  grid-template-columns: minmax(280px, 0.86fr) minmax(0, 1.14fr);
  align-items: stretch;
  gap: 20px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: color-mix(in srgb, var(--surface-strong) 78%, transparent);
}

.step-copy {
  padding: 8px;
}

.step-index {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-bottom: 14px;
  border-radius: 10px;
  color: #fff;
  background: var(--gradient);
  font-weight: 900;
}

.step-card h3 {
  margin-bottom: 10px;
  font-size: 24px;
}

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

.do-list {
  display: grid;
  gap: 8px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.do-list li {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  color: var(--text);
  font-weight: 700;
  line-height: 1.55;
}

.do-list li::before {
  content: "";
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  margin-top: 8px;
  border-radius: 50%;
  background: var(--gradient);
}

.shot {
  overflow: hidden;
  margin: 0;
  min-height: 320px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
}

.shot img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: cover;
}

.shot.contain img {
  object-fit: cover;
  background: var(--panel-deep);
}

.prompt-box {
  position: relative;
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel-deep);
  overflow: hidden;
}

.prompt-box pre {
  max-height: 230px;
  margin: 0;
  padding: 18px;
  overflow: auto;
  white-space: pre-wrap;
  color: var(--text);
  font-size: 14px;
  line-height: 1.75;
}

.copy-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--brand);
  background: var(--surface-strong);
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.filter-btn {
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--panel);
  font-weight: 900;
  cursor: pointer;
}

.filter-btn.active {
  color: #fff;
  border-color: transparent;
  background: var(--gradient);
}

.formula-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  margin-bottom: 14px;
}

.formula-item {
  min-height: 112px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
}

.formula-item strong {
  display: block;
  margin-bottom: 8px;
  font-size: 18px;
}

.formula-item span {
  color: var(--muted);
  line-height: 1.65;
}

.writing-guide {
  margin-bottom: 24px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: color-mix(in srgb, var(--surface-strong) 78%, transparent);
}

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

.guide-head span {
  color: var(--brand);
  font-size: 13px;
  font-weight: 900;
}

.guide-head strong {
  color: var(--text);
  font-size: 18px;
  line-height: 1.45;
}

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

.guide-grid div {
  min-height: 92px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}

.guide-grid b,
.guide-grid span {
  display: block;
}

.guide-grid b {
  margin-bottom: 7px;
  color: var(--text);
}

.guide-grid span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.guide-detail {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.guide-block {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--panel) 82%, transparent);
}

.guide-block h3 {
  margin-bottom: 8px;
  font-size: 18px;
}

.guide-block p {
  color: var(--muted);
  line-height: 1.7;
}

.guide-table {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.guide-table div {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-strong);
}

.guide-table b,
.guide-table span {
  display: block;
}

.guide-table b {
  color: var(--text);
}

.guide-table span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.duration-table {
  display: grid;
  gap: 1px;
  margin-top: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--line);
}

.duration-table > div {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  background: var(--surface-strong);
}

.duration-table span {
  padding: 11px 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

.duration-table .duration-head {
  background: color-mix(in srgb, var(--brand) 16%, var(--surface-strong));
}

.duration-table .duration-head span {
  color: var(--text);
}

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

.mode-list p {
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-strong);
  color: var(--muted);
}

.mode-list b {
  color: var(--text);
}

.case-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
}

.case-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: color-mix(in srgb, var(--surface-strong) 78%, transparent);
  overflow: hidden;
}

.case-card.featured {
  border-color: color-mix(in srgb, var(--brand) 28%, var(--line));
  box-shadow: 0 18px 48px color-mix(in srgb, var(--brand) 11%, transparent);
}

.case-card.hidden {
  display: none;
}

.media-frame {
  position: relative;
  aspect-ratio: 16 / 8;
  background: var(--panel-deep);
  overflow: hidden;
}

.media-frame img,
.media-frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.media-frame.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  aspect-ratio: auto;
  padding: 8px;
}

.media-frame.split video,
.media-frame.split img {
  min-width: 0;
  height: auto;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  object-fit: contain;
  background: #050713;
}

.media-frame.triple {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  aspect-ratio: auto;
  padding: 10px;
}

.frame-panel {
  position: relative;
  display: grid;
  grid-template-rows: auto max-content;
  align-content: start;
  gap: 8px;
  min-width: 0;
}

.frame-panel img,
.frame-panel video {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  background: #050713;
  object-fit: contain;
}

.frame-panel video {
  aspect-ratio: 16 / 9;
  align-self: center;
}

.frame-panel figcaption {
  justify-self: start;
  align-self: start;
  width: max-content;
  min-height: 0;
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--brand);
  background: color-mix(in srgb, var(--panel) 82%, transparent);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
}

.case-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 16px;
}

.case-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 12px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  color: var(--brand);
  background: color-mix(in srgb, var(--panel) 82%, transparent);
  font-size: 12px;
  font-weight: 900;
}

.case-card h3 {
  margin-bottom: 8px;
  font-size: 20px;
}

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

.case-points {
  display: grid;
  gap: 8px;
  margin: 14px 0 16px;
  padding: 12px 12px 12px 28px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--panel) 74%, transparent);
  color: var(--text);
  font-size: 13px;
  line-height: 1.55;
}

.case-points li::marker {
  color: var(--brand);
}

.template-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 26px;
}

.template-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
}

.template-card h3 {
  margin-bottom: 10px;
}

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

.footer-note {
  max-width: 1480px;
  margin: 22px auto 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}

@media (max-width: 1080px) {
  .step-card {
    grid-template-columns: 1fr;
  }

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

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

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

@media (max-width: 760px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .side-rail {
    position: sticky;
    top: 0;
    height: auto;
    flex-direction: row;
    justify-content: space-between;
    padding: 10px;
    overflow-x: auto;
  }

  .rail-nav,
  .rail-bottom {
    flex-direction: row;
    display: flex;
  }

  .user-pill,
  .point-card {
    display: none;
  }

  .main {
    padding: 14px;
  }

  .theme-panel,
  .content-panel {
    padding: 18px;
  }

  .tabs {
    top: 72px;
    overflow-x: auto;
  }

  .section-head {
    display: block;
  }

  .case-grid,
  .formula-grid,
  .guide-grid,
  .guide-table,
  .template-row,
  .quick-stats {
    grid-template-columns: 1fr;
  }

  .duration-table > div {
    grid-template-columns: 1fr;
  }

  .media-frame.triple,
  .media-frame.split {
    grid-template-columns: 1fr;
  }

  .step-card {
    padding: 12px;
  }

  .shot {
    min-height: 220px;
  }
}

/* Standalone tutorial layout */
.app-shell {
  display: block;
  min-height: 100vh;
}

.main {
  width: min(1480px, calc(100% - 40px));
  margin: 0 auto;
  padding: 18px 0 64px;
}

.topbar {
  position: sticky;
  top: 12px;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: color-mix(in srgb, var(--surface-strong) 84%, transparent);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: 1 1 380px;
  min-width: 0;
  color: var(--text);
  text-decoration: none;
}

.brand-logo {
  display: block;
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface-strong) 76%, transparent);
  box-shadow: 0 0 0 1px var(--line), 0 10px 26px rgba(9, 141, 252, 0.14);
}

.brand-copy,
.brand-copy strong,
.brand-copy small {
  display: block;
  min-width: 0;
}

.brand-copy strong {
  font-size: 16px;
  line-height: 1.2;
}

.brand-copy small {
  max-width: 620px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--panel) 74%, transparent);
}

.top-nav-btn {
  min-height: 34px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  font-size: 14px;
  font-weight: 900;
  white-space: nowrap;
  cursor: pointer;
}

.top-nav-btn:hover,
.top-nav-btn.active {
  color: #fff;
  background: var(--gradient);
  box-shadow: 0 10px 24px rgba(9, 141, 252, 0.18);
}

.theme-toggle {
  flex: 0 0 auto;
  min-width: 82px;
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--panel);
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.theme-toggle:hover {
  color: #fff;
  border-color: transparent;
  background: var(--gradient);
}

.content-panel {
  max-width: none;
}

.lesson-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 26px;
}

.lesson-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas:
    "icon title"
    "icon desc";
  column-gap: 12px;
  align-items: center;
  min-height: 112px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--text);
  text-align: left;
  background: color-mix(in srgb, var(--surface-strong) 78%, transparent);
  cursor: pointer;
  box-shadow: none;
}

.lesson-card:hover,
.lesson-card.active {
  border-color: color-mix(in srgb, var(--brand) 58%, var(--brand-2));
  background: color-mix(in srgb, var(--panel) 76%, transparent);
}

.lesson-card.active {
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--brand) 30%, transparent), 0 14px 36px rgba(9, 141, 252, 0.16);
}

.lesson-icon {
  grid-area: icon;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  color: #fff;
  background: var(--gradient);
  font-weight: 900;
}

.lesson-card strong {
  grid-area: title;
  align-self: end;
  font-size: 20px;
  line-height: 1.25;
}

.lesson-card small {
  grid-area: desc;
  align-self: start;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.55;
}

.section-cta {
  display: flex;
  justify-content: center;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.start-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 168px;
  min-height: 48px;
  padding: 0 28px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: var(--gradient);
  box-shadow: 0 16px 36px rgba(9, 141, 252, 0.26);
  font-size: 16px;
  font-weight: 900;
  text-decoration: none;
}

.start-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 20px 42px rgba(129, 98, 239, 0.28);
}

.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 40;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid color-mix(in srgb, var(--brand) 46%, var(--line));
  border-radius: 50%;
  color: #fff;
  background: var(--gradient);
  box-shadow: 0 16px 38px rgba(9, 141, 252, 0.28);
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top:hover {
  box-shadow: 0 20px 46px rgba(129, 98, 239, 0.32);
  transform: translateY(-1px);
}

.tabs,
.theme-panel,
.theme-switch,
.mini-preview,
.rail-nav,
.rail-bottom,
.point-card,
.user-pill,
.side-rail {
  display: none;
}

.section {
  scroll-margin-top: 96px;
}

@media (max-width: 1080px) {
  .lesson-cards {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .main {
    width: min(100% - 24px, 1480px);
    padding-top: 12px;
  }

  .topbar {
    top: 8px;
    flex-wrap: wrap;
  }

  .brand-lockup {
    flex: 1 1 auto;
  }

  .brand-copy small {
    display: block;
    max-width: 100%;
    white-space: normal;
  }

  .top-nav {
    order: 3;
    width: 100%;
    justify-content: stretch;
  }

  .top-nav-btn {
    flex: 1;
    padding: 0 8px;
    font-size: 13px;
  }

  .content-panel {
    padding: 18px;
  }

  .lesson-card {
    min-height: 96px;
    padding: 14px;
  }

  .back-to-top {
    right: 14px;
    bottom: 14px;
    width: 42px;
    height: 42px;
  }
}
