/* LiveLah tutorial page (tutorial/index.html): the full tutorial video with its chapter menu, then the WhatsApp group.
   Uses the landing page's tokens, nav, buttons and footer (styles.css); only this page's parts are here. */

.nav-links > a[aria-current='page'], .foot-cols a[aria-current='page'] { color: var(--fg); }

/* ── video + chapters */
.tut { padding: calc(var(--nav-h) + 44px) 0 80px; background: radial-gradient(70% 42% at 50% 0%, rgba(124, 92, 255, .22), transparent 70%), var(--bg); }
.tut .wrap { max-width: calc(1280px + var(--gutter) * 2); }
.tut-head { max-width: 960px; margin: 0 auto; text-align: center; }
.tut-title { margin-top: 14px; font-size: clamp(36px, 5.6vw, 64px); font-weight: 700; }
.tut-intro { margin-top: 14px; }
.tut-meta { margin-top: 12px; font-size: 12px; color: var(--fg-3); }

.tut-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; margin-top: 36px; }
.tut-player { min-width: 0; }
/* fixed nav: a chapter picked below the video scrolls it back into view under the bar */
.tut-frame { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 18px; background: #000; box-shadow: 0 0 0 1px var(--line-2), 0 40px 120px rgba(0, 0, 0, .6); scroll-margin-top: calc(var(--nav-h) + 12px); }
.tut-frame video { width: 100%; height: 100%; object-fit: contain; background: #000; }

.tut-note, .tut-error { display: flex; align-items: flex-start; gap: 10px; margin-top: 14px; padding: 12px 16px; border-radius: 14px; font-size: 14px; line-height: 1.5; color: var(--fg-2); }
.tut-note { border: 1px solid rgba(255, 200, 87, .32); background: rgba(255, 200, 87, .07); }
.tut-note svg { flex: none; margin-top: 2px; color: var(--gold); }
.tut-error { display: block; border: 1px solid rgba(255, 59, 48, .35); background: rgba(255, 59, 48, .08); }

/* the chapter menu: beside the video from 1100px (as tall as the video, the list scrolls inside), under it below */
.tut-chapters { position: relative; min-width: 0; }
.tut-ch-box { display: flex; flex-direction: column; border-radius: 18px; background: var(--panel); border: 1px solid var(--line); overflow: hidden; }
.tut-ch-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 16px 18px 13px; border-bottom: 1px solid var(--line); }
.tut-ch-head h2 { font-size: 12px; font-weight: 500; line-height: 1; letter-spacing: .08em; color: var(--fg); }
.tut-ch-count { font-size: 11px; line-height: 1; color: var(--fg-3); }
.tut-list { display: grid; gap: 2px; margin: 0; padding: 6px; list-style: none; }
.tut-ch { position: relative; display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 50px; padding: 9px 12px; border-radius: 12px; overflow: hidden; color: var(--fg-2); font-size: 15px; font-weight: 600; line-height: 1.35; transition: background .15s, color .15s, box-shadow .15s; }
.tut-ch:hover { text-decoration: none; }
@media (hover: hover) { .tut-ch:hover { color: var(--fg); background: rgba(255, 255, 255, .05); } } /* no sticky hover after a tap */
.tut-ch:focus-visible { outline-offset: -2px; border-radius: 12px; }
.tut-ch-n, .tut-ch-at { font: 500 12px/1 var(--mono); letter-spacing: .04em; color: var(--fg-3); font-variant-numeric: tabular-nums; }
.tut-ch-t { min-width: 0; overflow-wrap: anywhere; }
.tut-ch[aria-current='true'] { color: var(--fg); background: rgba(124, 92, 255, .17); box-shadow: inset 0 0 0 1px rgba(164, 140, 255, .5); }
.tut-ch[aria-current='true'] .tut-ch-n { color: var(--violet-hi); }
.tut-ch[aria-current='true'] .tut-ch-at { color: var(--fg-2); }
/* how far into the current chapter the video is (tutorial.js sets --p, 0…1) */
.tut-ch-bar { position: absolute; left: 12px; right: 12px; bottom: 0; height: 2px; border-radius: 2px; background: var(--violet-hi); transform: scaleX(var(--p, 0)); transform-origin: left; opacity: 0; transition: transform .25s linear; }
.tut-ch[aria-current='true'] .tut-ch-bar { opacity: 1; }

@media (min-width: 640px) and (max-width: 1099px) {
  .tut-list { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 6px; }
}
@media (min-width: 1100px) {
  .tut-intro { max-width: 920px; }
  .tut-grid { grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; }
  /* the box is taken out of the flow, so the row is as tall as the video and the box fills it */
  .tut-ch-box { position: absolute; inset: 0; }
  .tut-list { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .2) transparent; padding-bottom: 28px;
    -webkit-mask-image: linear-gradient(#000 calc(100% - 28px), transparent); mask-image: linear-gradient(#000 calc(100% - 28px), transparent); }
  .tut-ch { min-height: 44px; padding: 8px 12px; font-size: 14.5px; }
}
@media (min-width: 1200px) { .tut-grid { grid-template-columns: minmax(0, 1fr) 360px; } }
@media (max-width: 560px) {
  .tut { padding: calc(var(--nav-h) + 40px) 0 64px; }
  .tut-grid { margin-top: 32px; }
  .tut-frame { border-radius: 14px; }
  .tut-ch-head { padding: 15px 16px 12px; }
}

/* ── questions: the WhatsApp group */
.tut-help { padding: 8px 0 110px; }
.tut-help-card { max-width: 880px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 24px; padding: clamp(36px, 5vw, 56px) clamp(20px, 5vw, 56px); text-align: center; border-radius: 28px; border: 1px solid var(--line-2); background: radial-gradient(70% 100% at 50% 0%, rgba(37, 211, 102, .14), transparent 65%), var(--panel); }
.tut-help-ic { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 20px; color: #fff; background: #1FAF56; box-shadow: 0 16px 40px -14px rgba(37, 211, 102, .8), inset 0 1px 0 rgba(255, 255, 255, .25); }
.tut-help-card h2 { max-width: 640px; font-size: clamp(26px, 3.8vw, 42px); font-weight: 700; }
@media (max-width: 560px) {
  .tut-help { padding-bottom: 80px; }
  .tut-help-card { border-radius: 24px; }
  .tut-help-card .btn { align-self: stretch; white-space: normal; }
}
