/* Perm Serial Changer — extends /tutorial/assets/style.css.
   Dashboard-style cards, clean step indicators, float pager. */

.doc-content {
    max-width: 860px;
    padding: 48px 40px 140px;
}

/* ---------- Hero ---------- */
.step-hero { text-align: center; margin-bottom: 40px; }
.step-hero .badge-tag {
    display: inline-block; padding: 4px 14px; margin-bottom: 16px;
    background: rgba(147, 51, 234, 0.08); border: 1px solid rgba(168, 85, 247, 0.25);
    border-radius: 100px; font-size: 10px; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent-3);
}
.step-hero h1 {
    font-size: 44px; font-weight: 400; letter-spacing: -0.045em;
    margin: 0; text-align: center;
}
.step-hero h1 span {
    display: inline-flex; align-items: center; padding: 0.04em 0.28em; border-radius: 0.3em; background: rgba(168, 85, 247, 0.1); box-shadow: inset 0 0 0 1px rgba(168, 85, 247, 0.3); color: #a855f7; line-height: 1.1;
}
@keyframes heroGradientShift { 0% { background-position: 0% 50%; } 100% { background-position: 200% 50%; } }
.step-hero .lede { text-align: center; margin: 10px auto 0; max-width: 520px; }

/* ---------- Step cards — dashboard .card style ---------- */
.step-card {
    background: var(--surface); border: 0;
    border-radius: 24px; padding: 28px 32px; margin-bottom: 20px;
    box-shadow: inset 0 0 0 1px var(--border-subtle);
}
.step-card .step-tag {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 10px; font-weight: 600; color: var(--subtle);
    text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 12px;
}
.step-card .step-tag .dot {
    width: 6px; height: 6px; border-radius: 50%; background: var(--accent-2);
}
.step-card h2 {
    font-size: 20px; font-weight: 500; letter-spacing: -0.02em; color: #ffffff;
    margin: 0 0 14px; padding: 0; border: none;
    background: linear-gradient(180deg, #fff 0%, #fff 10%, #d4d4d8 60%, #a1a1aa 100%);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
    padding-bottom: 0.18em; margin-bottom: calc(14px - 0.18em);
}
.step-card h2:not(:first-of-type) { margin-top: 28px; }
.step-card > p:first-of-type,
.step-card .step-tag + p { margin-top: 0; }
.step-card .media,
.step-card .dl-card,
.step-card .vplayer,
.step-card .video-embed { margin: 16px 0; }
.step-card .media:last-child,
.step-card .dl-card:last-child,
.step-card .step-list:last-child { margin-bottom: 0; }

/* ---------- Alert box overrides inside step-card context ---------- */
.alert-box .step-tag { margin-bottom: 8px; }

/* ---------- Inline tabs ---------- */
.doc-tabs { display: flex; gap: 4px; flex-wrap: wrap; margin: 14px 0 12px; padding: 3px; border-radius: 9px; background: var(--input); border: 1px solid var(--border); }
.doc-tab-btn {
    flex: 1; padding: 7px 14px; border: 0; border-radius: 6px;
    background: none; color: var(--muted); cursor: pointer;
    font-weight: 500; font-size: 12px; font-family: 'Poppins', sans-serif;
    transition: background 0.15s, color 0.15s; white-space: nowrap;
}
.doc-tab-btn:hover { color: var(--text); }
.doc-tab-btn.active {
    background: rgba(168, 85, 247, 0.16); color: #fff;
    box-shadow: inset 0 0 0 1px rgba(168, 85, 247, 0.35);
}
.doc-tab-panel { display: none; animation: tabFadeIn 0.3s ease; }
.doc-tab-panel.active { display: block; }
@keyframes tabFadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- Floating pager ---------- */
.float-pager {
    position: fixed; left: 0; right: 0; bottom: 20px; z-index: 15;
    display: flex; justify-content: space-between; padding: 0 40px;
    pointer-events: none;
}
.float-pager a, .float-pager span {
    pointer-events: auto; display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 18px; border-radius: 10px; font-size: 12px; font-weight: 500;
    text-decoration: none; font-family: 'Poppins', sans-serif;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.float-pager .fp-back {
    background: rgba(17, 17, 21, 0.85); border: 0; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
    color: var(--muted); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.float-pager a.fp-back:hover { border-color: rgba(255, 255, 255, 0.16); color: var(--text); transform: translateX(-2px); }
.float-pager span.fp-back { opacity: 0.35; }
.float-pager .fp-next {
    background: linear-gradient(180deg, #a855f7 0%, #7e22ce 100%); color: #fff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 0 0 1px #581c87;
}
.float-pager a.fp-next:hover { transform: translateX(2px); filter: brightness(1.08); }
.float-pager span.fp-next { opacity: 0.35; background: var(--surface); box-shadow: none; }

/* ---------- Chip grid ---------- */
.chip-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; margin: 14px 0; }
.chip-grid .chip {
    background: rgba(255, 255, 255, 0.03); border: 1px solid var(--border); border-radius: 10px;
    padding: 10px; text-align: center; font-size: 11px; font-weight: 600; color: var(--subtle);
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
    min-height: 66px;
}
.chip-grid .chip i { font-size: 14px; color: var(--muted); }

/* ---------- Key grid ---------- */
.key-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 14px 0; }
.key-box { background: rgba(255, 255, 255, 0.03); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; }
.key-box .key-label { display: block; font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--subtle); margin-bottom: 5px; }
.key-box code { display: block; word-break: break-all; }
@media (max-width: 560px) { .key-grid { grid-template-columns: 1fr; } }

/* ---------- Mobile ---------- */
@media (max-width: 900px) {
    .float-pager { padding: 0 14px; bottom: 14px; }
    .float-pager a, .float-pager span { padding: 9px 14px; font-size: 11px; }
    .step-card { padding: 22px 20px; border-radius: 14px; }
    .step-hero h1 { font-size: 28px; }
    .doc-content { padding: 36px 16px 140px; }
}
