/* =====================================================================
   Tutorials — additions on top of articles.css
   Only the pieces the blog does not already have: the step list, the
   callouts, the FAQ and the category filter. Everything else (nav, footer,
   cards, banners, typography, buttons) comes from articles.css unchanged.
   ===================================================================== */

/* ---------- listing ---------- */
.tut-catbar {
    display: flex;
    gap: 9px;
    overflow-x: auto;
    padding: 4px 0 2px;
    margin-bottom: 26px;
    scrollbar-width: none;
}

.tut-catbar::-webkit-scrollbar { display: none; }

.tut-cat {
    flex: 0 0 auto;
    font-size: 14px;
    font-weight: 700;
    color: var(--ink-2);
    background: var(--soft);
    border: 1.5px solid var(--line);
    border-radius: 999px;
    padding: 9px 17px;
    white-space: nowrap;
    transition: .15s;
}

.tut-cat:hover { border-color: var(--blue-m); color: var(--ink); }
.tut-cat.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.tut-cat .n { opacity: .55; margin-left: 6px; font-weight: 600; }

.tut-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.tut-featured {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 22px;
    margin-bottom: 30px;
}

.tut-featured .acard .banner { height: 190px; }

.tut-sec-h {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px;
    margin: 34px 0 18px;
}

.tut-sec-h h2 { font-size: 24px; }
.tut-sec-h span { font-size: 13.5px; color: var(--faint); font-weight: 600; }

/* ---------- detail: steps ---------- */
.tut-steps { counter-reset: tut-step; margin: 8px 0 0; }

.tut-step {
    position: relative;
    padding: 0 0 26px 58px;
    border-left: 2px solid var(--line);
    margin-left: 18px;
}

.tut-step:last-child { border-left-color: transparent; padding-bottom: 6px; }

.tut-step::before {
    counter-increment: tut-step;
    content: counter(tut-step);
    position: absolute;
    left: -19px;
    top: -2px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--green-d);
    color: #fff;
    font-family: var(--disp);
    font-weight: 700;
    font-size: 15px;
    display: grid;
    place-items: center;
    box-shadow: 0 0 0 5px #fff;
}

.tut-step h3 {
    font-family: var(--disp);
    font-size: 20px;
    font-weight: 600;
    color: var(--ink);
    margin: 4px 0 8px;
    scroll-margin-top: 96px;
}

.tut-step p { margin: 0 0 12px; color: var(--ink-2); }

.tut-shot {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 14px;
    border: 1px solid var(--line);
    box-shadow: var(--sh-1);
    margin: 12px 0;
    background: var(--soft);
}

.tut-shot-todo {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1.5px dashed var(--line);
    border-radius: 14px;
    background: var(--soft);
    color: var(--muted);
    font-family: var(--sans);
    font-size: 13.5px;
    padding: 14px 16px;
    margin: 12px 0;
}

.tut-tip {
    display: flex;
    gap: 10px;
    font-family: var(--sans);
    font-size: 15px;
    background: var(--green-l);
    border: 1px solid var(--green-m);
    border-radius: 12px;
    padding: 13px 16px;
    margin: 12px 0 0;
    color: var(--ink-2);
}

.tut-tip b { color: var(--green-d); }

/* ---------- detail: video ---------- */
.tut-video {
    position: relative;
    margin: 22px 0 6px;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid var(--line);
    background: #0b1220;
    aspect-ratio: 16 / 9;
}

.tut-video iframe,
.tut-video img,
.tut-video button {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.tut-video img { object-fit: cover; }

.tut-video button {
    display: grid;
    place-items: center;
    background: rgba(11, 18, 32, .35);
    cursor: pointer;
    color: #fff;
    font: 700 15px var(--sans);
    gap: 10px;
}

.tut-video .play {
    width: 66px;
    height: 66px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .92);
    color: var(--ink);
    display: grid;
    place-items: center;
    font-size: 22px;
    box-shadow: var(--sh-2);
}

/* ---------- detail: FAQ ---------- */
.tut-faq { border-top: 1px solid var(--line); }

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

.tut-faq summary {
    cursor: pointer;
    list-style: none;
    font-family: var(--disp);
    font-size: 17px;
    font-weight: 600;
    color: var(--ink);
    padding: 15px 34px 15px 0;
    position: relative;
}

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

.tut-faq summary::after {
    content: "+";
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 22px;
    color: var(--faint);
    font-weight: 400;
}

.tut-faq details[open] summary::after { content: "\2013"; }

.tut-faq .a {
    font-family: var(--sans);
    font-size: 15.5px;
    color: var(--muted);
    line-height: 1.65;
    padding: 0 0 16px;
    margin: 0;
}

/* ---------- detail: CTA + prev/next ---------- */
.tut-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
    background: radial-gradient(120% 150% at 100% 0, #0C2A47, #0A1A33 62%);
    color: #cfe0f4;
    border-radius: 20px;
    padding: 26px 28px;
    margin: 34px auto 0;
}

.tut-cta h3 { color: #fff; font-size: 21px; margin: 0 0 4px; }
.tut-cta p { margin: 0; font-size: 14.5px; color: #9db4d0; }

.tut-pager {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 34px auto 0;
}

.tut-pager a {
    display: block;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 16px 18px;
    background: var(--card);
    box-shadow: var(--sh-1);
    transition: transform .18s, box-shadow .18s;
}

.tut-pager a:hover { transform: translateY(-3px); box-shadow: var(--sh-2); }
.tut-pager .k { display: block; font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); margin-bottom: 5px; }
.tut-pager .t { font-family: var(--disp); font-size: 16px; font-weight: 600; color: var(--ink); line-height: 1.3; }
.tut-pager .next { text-align: right; }

.tut-preview-note {
    background: var(--amber-l);
    border: 1px solid var(--amber-m);
    color: var(--amber);
    font-family: var(--sans);
    font-size: 14px;
    font-weight: 700;
    border-radius: 12px;
    padding: 12px 16px;
    margin: 18px auto 0;
    text-align: center;
}

/* ---------- responsive ---------- */
@media (max-width: 940px) {
    .tut-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 700px) {
    .tut-grid,
    .tut-featured { grid-template-columns: 1fr; }
    .tut-pager { grid-template-columns: 1fr; }
    .tut-pager .next { text-align: left; }
}

@media (max-width: 640px) {
    .tut-sec-h { flex-wrap: wrap; gap: 6px; margin: 26px 0 14px; }
    .tut-sec-h h2 { font-size: 21px; }
    .tut-step { padding-left: 44px; margin-left: 14px; }
    .tut-step::before { width: 32px; height: 32px; left: -17px; font-size: 14px; }
    .tut-step h3 { font-size: 18px; }
    .tut-cta { padding: 22px 20px; }
    .tut-faq summary { font-size: 16px; }
}

@media (max-width: 420px) {
    .tut-cat { font-size: 13px; padding: 8px 14px; }
    .tut-cta h3 { font-size: 19px; }
}
