/* Tutorials page (/tutorials). Builds on style.css (Look v2): the opening band is the dark
 * hero band, the rest uses the page palette. Only this page loads it. */

.tut-hero.hero { padding-top: 64px; padding-bottom: 72px; }
.tut-hero .eyebrow { margin-bottom: 16px; }
.tut-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.tut-head h1 { max-width: none; margin: 0; }
.tut-sub { margin: 10px 0 0; color: var(--ink-2); font-size: 17px; }
.tut-sub .tut-dot { color: var(--ink-4); margin: 0 4px; }
#tut-duration { font-family: var(--mono); font-size: 14px; color: var(--ink-3); }
.tut-signin { flex: none; }

/* ---------- stage: video + chapter rail ---------- */
.tut-stage { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.tut-screen {
    border-radius: 14px; overflow: hidden; background: #000;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 24px 60px -20px rgba(0, 0, 0, 0.8);
}
.tut-screen video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #000; }

/* chapter strip under the picture: one segment per chapter, filled as it plays */
.tut-track { display: flex; gap: 3px; padding: 8px 8px 9px; background: #14161c; }
.tut-seg {
    position: relative; height: 6px; flex: 1 1 0; border: 0; padding: 0; border-radius: 3px;
    background: rgba(255, 255, 255, 0.14); cursor: pointer; overflow: hidden;
}
.tut-seg:hover { background: rgba(255, 255, 255, 0.28); }
.tut-seg i { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--gold); border-radius: 3px; }

.tut-chapters {
    background: #14161c; border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 14px;
    padding: 14px 8px 8px; max-height: 100%; overflow: auto;
}
.tut-ch-label {
    margin: 0 10px 8px; font-size: 11.5px; font-weight: 600; letter-spacing: 0.12em;
    text-transform: uppercase; color: var(--ink-3);
}
.tut-chapters ol { list-style: none; margin: 0; padding: 0; }
.tut-chapters button {
    display: grid; grid-template-columns: 44px 1fr; gap: 8px; width: 100%; text-align: left;
    background: transparent; border: 0; border-radius: 8px; padding: 9px 10px; cursor: pointer;
    font: 500 14.5px/1.35 var(--sans); color: var(--ink-2); position: relative;
}
.tut-chapters button:hover { background: rgba(255, 255, 255, 0.05); color: var(--ink); }
.tut-chapters button:focus-visible { outline: 2px solid #59b0ff; outline-offset: -2px; }
.tut-chapters .t { font: 500 12.5px/1.6 var(--mono); color: var(--ink-4); }
.tut-chapters li.done button { color: var(--ink-3); }
.tut-chapters li.on button { background: rgba(245, 165, 36, 0.12); color: var(--ink); }
.tut-chapters li.on button::before {
    content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 2px; background: var(--gold);
}
.tut-chapters li.on .t { color: var(--gold); }

/* ---------- follow along ---------- */
.tut-about { padding-top: 64px; padding-bottom: 48px; }
.tut-about .lede { max-width: 60ch; margin-bottom: 40px; }
.tut-follow { background: #ffffff; border: 1px solid var(--rule); border-radius: 14px; padding: 22px 8px 10px; }
.tut-follow-label {
    margin: 0 16px 10px; font-size: 11.5px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3);
}
.tut-follow-label span { text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--ink-4); margin-left: 8px; font-size: 13px; }
.tut-follow ol { list-style: none; margin: 0; padding: 0; }
.tut-follow button {
    display: grid; grid-template-columns: 52px 1fr; gap: 10px; width: 100%; text-align: left; cursor: pointer;
    background: transparent; border: 0; border-radius: 10px; padding: 12px 16px;
    font: 400 16.5px/1.6 var(--sans); color: var(--ink-2);
}
.tut-follow button:hover { background: var(--bg); }
.tut-follow button:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
.tut-follow .t { font: 500 13px/1.9 var(--mono); color: var(--ink-4); }
.tut-follow li.on button { background: #fff7e8; color: var(--ink); }
.tut-follow li.on .t { color: #a86a00; }

/* ---------- library ---------- */
.tut-library { padding-top: 48px; padding-bottom: 48px; }
.tut-library h2 { margin-bottom: 24px; }
.tut-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.tut-card {
    display: block; text-decoration: none; color: inherit; background: #ffffff;
    border: 1px solid var(--rule); border-radius: 14px; overflow: hidden; transition: border-color .15s, transform .15s;
}
.tut-card:hover { border-color: var(--rule-strong); transform: translateY(-2px); }
.tut-card .thumb { position: relative; aspect-ratio: 16 / 9; background: #ebebe7 center / cover no-repeat; }
.tut-card .thumb .len {
    position: absolute; right: 8px; bottom: 8px; padding: 2px 7px; border-radius: 6px;
    background: rgba(11, 12, 16, 0.8); color: #fff; font: 500 12px/1.5 var(--mono);
}
.tut-card .thumb .now {
    position: absolute; left: 8px; top: 8px; padding: 3px 8px; border-radius: 6px;
    background: var(--gold); color: var(--on-gold); font: 600 11px/1.4 var(--sans); letter-spacing: 0.08em; text-transform: uppercase;
}
.tut-card .body { padding: 14px 16px 16px; }
.tut-card .name { font-weight: 700; font-size: 17px; color: var(--ink); }
.tut-card .sub { color: var(--ink-3); font-size: 14.5px; margin-top: 2px; }
.tut-soon { margin-top: 20px; color: var(--ink-3); font-size: 15px; }

/* ---------- next ---------- */
.tut-next { padding-top: 48px; padding-bottom: 112px; }
.tut-next-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.tut-next-card {
    display: flex; flex-direction: column; gap: 6px; text-decoration: none; padding: 20px 22px;
    background: #ffffff; border: 1px solid var(--rule); border-radius: 14px; transition: border-color .15s;
}
.tut-next-card:hover { border-color: var(--blue); }
.tut-next-k { font-weight: 700; font-size: 17px; color: var(--blue); }
.tut-next-t { color: var(--ink-2); font-size: 15px; line-height: 1.5; }

/* ---------- smaller screens ---------- */
@media (max-width: 1000px) {
    .tut-stage { grid-template-columns: 1fr; }
    .tut-chapters { max-height: none; }
}
@media (max-width: 720px) {
    .tut-hero.hero { padding-top: 36px; padding-bottom: 40px; }
    .tut-head { flex-direction: column; align-items: flex-start; gap: 16px; margin-bottom: 20px; }
    .tut-screen { border-radius: 10px; margin: 0 -8px; }
    .tut-next-grid { grid-template-columns: 1fr; }
    .tut-follow button { grid-template-columns: 1fr; gap: 2px; font-size: 16px; }
    .tut-about { padding-top: 40px; }
}
@media (prefers-reduced-motion: reduce) {
    .tut-card, .tut-card:hover { transition: none; transform: none; }
}
