@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Instrument+Sans:wght@600;700&display=swap');

:root {
    --primary: #6b6646;
    --gold: #D4AF37;
    --text-primary: #FFFFFF;
    --text-secondary: #a8acb8;
    --bg-primary: #0d1328;
    --bg-secondary: #121a33;
    --bg-tertiary: #1a2340;
    --line: rgba(255, 255, 255, 0.1);
    --green: #22c55e;
    --page-pad: clamp(16px, 3.5vw, 64px);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: "DM Sans", system-ui, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    overflow-x: hidden;
}
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }

/* Top bar (same as Tutorials) */
.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px var(--page-pad);
    background: rgba(13, 19, 40, 0.92);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.topbar img { height: 28px; width: auto; display: block; }
.topbar-links { display: flex; gap: 18px; flex-wrap: wrap; font-size: 14px; font-weight: 600; }
.topbar-links a { color: var(--text-secondary); text-decoration: none; }
.topbar-links a:hover, .topbar-links a[aria-current="page"] { color: #fff; }

.page {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px var(--page-pad) 80px;
}
.kicker {
    color: var(--gold);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 10px;
}
h1, h2, h3 { font-family: "Instrument Sans", "DM Sans", sans-serif; letter-spacing: -0.02em; line-height: 1.25; }
h1 { font-size: clamp(28px, 4vw, 40px); font-weight: 700; margin-bottom: 12px; }
.lede { color: var(--text-secondary); font-size: 16px; max-width: 60ch; }

/* ---------- Hub ---------- */
.hub-head { margin-bottom: 36px; }
.guide-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 22px;
}
.guide-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-secondary);
    border: 1px solid var(--line);
    border-radius: 16px;
    overflow: hidden;
    color: inherit;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.guide-card:hover {
    text-decoration: none;
    transform: translateY(-3px);
    border-color: rgba(212, 175, 55, 0.45);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.35);
}
.guide-card-cover { aspect-ratio: 16 / 9; background: #0a0f1c; overflow: hidden; }
.guide-card-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.guide-card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.guide-card-cat { font-size: 12px; font-weight: 700; color: var(--gold); text-transform: uppercase; letter-spacing: 0.06em; }
.guide-card h2 { font-size: 19px; }
.guide-card p { color: var(--text-secondary); font-size: 14px; }
.guide-card-meta { margin-top: auto; padding-top: 6px; display: flex; gap: 14px; font-size: 13px; color: var(--text-secondary); }
.guide-card-meta i { color: var(--gold); margin-right: 4px; }
.hub-search { display: flex; gap: 10px; margin-bottom: 16px; }
.hub-search-box {
    position: relative; flex: 1; max-width: 640px;
    display: flex; align-items: center;
}
.hub-search-box > i {
    position: absolute; left: 18px; color: var(--text-secondary); font-size: 16px; pointer-events: none;
}
.hub-search-box input {
    width: 100%;
    padding: 15px 84px 15px 48px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: var(--bg-secondary);
    color: #fff;
    font: inherit; font-size: 16px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.hub-search-box input::placeholder { color: rgba(255,255,255,0.4); }
.hub-search-box input:focus { border-color: rgba(212, 175, 55, 0.6); box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.12); }
.hub-search-box input::-webkit-search-cancel-button { display: none; }
.hub-search-kbd {
    position: absolute; right: 16px;
    font: 600 12px "DM Sans", sans-serif; color: var(--text-secondary);
    border: 1px solid var(--line); border-radius: 6px; padding: 1px 7px;
    pointer-events: none;
}
.hub-search-box input:focus ~ .hub-search-kbd, .hub-search-clear:not([hidden]) ~ .hub-search-kbd { display: none; }
.hub-search-clear {
    position: absolute; right: 10px;
    width: 32px; height: 32px; border-radius: 50%;
    border: 0; background: rgba(255,255,255,0.08); color: #fff; cursor: pointer;
}
.hub-search-clear:hover { background: rgba(255,255,255,0.16); }
.hub-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.hub-chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 14px; border-radius: 999px;
    border: 1px solid var(--line); background: var(--bg-secondary);
    color: var(--text-secondary); font-size: 14px; font-weight: 600;
}
.hub-chip span { font-size: 12px; opacity: 0.7; }
.hub-chip:hover { text-decoration: none; color: #fff; }
.hub-chip.is-active { background: var(--gold); border-color: var(--gold); color: #0d1328; }
.hub-count { color: var(--text-secondary); font-size: 14px; margin-bottom: 18px; }
.hub-empty {
    text-align: center; padding: 48px 24px;
    border: 1px dashed var(--line); border-radius: 16px; color: var(--text-secondary);
}
.hub-empty i { font-size: 28px; color: rgba(212, 175, 55, 0.6); }
.hub-empty h2 { color: #fff; font-size: 20px; margin: 10px 0 6px; }
[hidden] { display: none !important; }

.guide-search { margin-left: auto; position: relative; }
.guide-search input {
    width: 220px; padding: 8px 12px 8px 34px;
    border-radius: 999px; border: 1px solid var(--line);
    background: var(--bg-secondary); color: #fff; font: inherit; font-size: 13px; outline: none;
}
.guide-search input:focus { border-color: rgba(212, 175, 55, 0.6); }
.guide-search i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-secondary); font-size: 13px; }
.crumbs-row { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.crumbs-row .crumbs { margin-bottom: 0; }

.coming-soon {
    border: 1px dashed var(--line);
    border-radius: 16px;
    display: grid;
    place-items: center;
    text-align: center;
    padding: 32px 24px;
    color: var(--text-secondary);
    font-size: 14px;
    min-height: 220px;
}
.coming-soon i { display: block; font-size: 26px; color: rgba(212, 175, 55, 0.6); margin-bottom: 10px; }

/* ---------- Guide ---------- */
.crumbs { font-size: 13px; color: var(--text-secondary); margin-bottom: 18px; }
.crumbs a { color: var(--text-secondary); }
.crumbs a:hover { color: #fff; }
.guide-head { margin-bottom: 28px; }
.guide-facts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.fact {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 7px 14px; border-radius: 999px;
    background: var(--bg-secondary); border: 1px solid var(--line);
    font-size: 13px; color: var(--text-secondary);
}
.fact i { color: var(--gold); }

.guide-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 48px; align-items: start; }
.toc {
    position: sticky; top: 84px;
    background: var(--bg-secondary); border: 1px solid var(--line); border-radius: 14px;
    padding: 16px 14px;
}
.toc-title { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-secondary); margin: 0 6px 8px; }
.toc-part { font-size: 12px; color: var(--gold); font-weight: 700; margin: 12px 6px 4px; }
.toc ol { list-style: none; }
.toc a {
    display: flex; gap: 10px; align-items: baseline;
    padding: 6px 8px; border-radius: 8px;
    color: var(--text-secondary); font-size: 14px; line-height: 1.35;
}
.toc a span { color: rgba(255,255,255,0.35); font-variant-numeric: tabular-nums; font-weight: 700; font-size: 12px; }
.toc a:hover, .toc a.active { background: rgba(255,255,255,0.06); color: #fff; text-decoration: none; }
.toc a.active span { color: var(--gold); }

.callout {
    display: flex; gap: 14px;
    padding: 16px 18px; border-radius: 14px;
    background: rgba(212, 175, 55, 0.08); border: 1px solid rgba(212, 175, 55, 0.28);
    font-size: 15px; margin-bottom: 28px;
}
.callout i { color: var(--gold); font-size: 18px; margin-top: 3px; flex-shrink: 0; }
.callout strong { color: #fff; }
.callout p + p { margin-top: 6px; }
.callout--info { background: rgba(59, 130, 246, 0.08); border-color: rgba(59, 130, 246, 0.3); }
.callout--info i { color: #60a5fa; }
.callout--ok { background: rgba(34, 197, 94, 0.08); border-color: rgba(34, 197, 94, 0.3); }
.callout--ok i { color: var(--green); }

.part-title {
    display: flex; align-items: center; gap: 12px;
    font-size: 22px; margin: 8px 0 22px; scroll-margin-top: 90px;
}
.part-title .part-badge {
    font-family: "DM Sans", sans-serif; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
    color: #0d1328; background: var(--gold); border-radius: 999px; padding: 3px 10px;
}
.part-gap { height: 26px; }

.step {
    background: var(--bg-secondary);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 22px;
    margin-bottom: 22px;
    scroll-margin-top: 90px;
}
.step-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 14px; }
.step-num {
    flex-shrink: 0;
    width: 38px; height: 38px; border-radius: 50%;
    display: grid; place-items: center;
    background: var(--gold); color: #0d1328;
    font-weight: 700; font-size: 16px;
}
.step-head h3 { font-size: 19px; margin-top: 6px; }
.step-text { color: var(--text-secondary); font-size: 15px; margin: 0 0 16px 52px; }
.step-text strong { color: #fff; font-weight: 600; }
.step-text ul { margin: 8px 0 0 18px; }
.step-text li { margin-bottom: 4px; }
.step-text .key {
    display: inline-block; padding: 1px 8px; border-radius: 6px;
    background: rgba(255,255,255,0.08); border: 1px solid var(--line);
    color: #fff; font-weight: 600; font-size: 13px; white-space: nowrap;
}

/* Screenshot with numbered markers */
.shot {
    position: relative;
    display: block;
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--line);
    background: #0a0f1c;
    cursor: zoom-in;
    padding: 0;
    font: inherit;
    color: inherit;
}
.shot img { display: block; width: 100%; height: auto; }
.shot--narrow { max-width: 560px; margin: 0 auto; }
.lightbox-inner .shot--narrow { max-width: 760px; }
.shot--phone { max-width: 360px; margin: 0 auto; }
.lightbox-inner .shot--phone { max-width: min(480px, 100%); }
.shot:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.shot-zoom {
    position: absolute; right: 10px; bottom: 10px;
    padding: 5px 10px; border-radius: 999px;
    background: rgba(0,0,0,0.6); color: #fff; font-size: 12px;
    opacity: 0; transition: opacity 0.2s ease;
}
.shot:hover .shot-zoom, .shot:focus-visible .shot-zoom { opacity: 1; }
.mark {
    position: absolute;
    width: 30px; height: 30px; margin: -15px 0 0 -15px;
    border-radius: 50%;
    background: var(--gold); color: #0d1328;
    font-size: 14px; font-weight: 700;
    display: grid; place-items: center;
    box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.35), 0 6px 16px rgba(0,0,0,0.45);
    pointer-events: none;
}
.mark::after {
    content: ''; position: absolute; inset: -4px; border-radius: 50%;
    border: 2px solid rgba(212, 175, 55, 0.8);
    animation: markPulse 1.8s ease-out infinite;
}
@keyframes markPulse { from { transform: scale(1); opacity: 1; } to { transform: scale(1.9); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .mark::after { animation: none; } }

.legend { list-style: none; margin: 14px 0 0 52px; display: grid; gap: 8px; }
.legend li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--text-secondary); }
.legend b {
    flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%;
    background: var(--gold); color: #0d1328; font-size: 12px;
    display: grid; place-items: center; margin-top: 1px;
}
.legend strong { color: #fff; font-weight: 600; }

.done {
    text-align: center;
    padding: 34px 24px;
    border-radius: 18px;
    background: linear-gradient(160deg, rgba(34,197,94,0.12), rgba(34,197,94,0.02));
    border: 1px solid rgba(34,197,94,0.3);
    margin: 30px 0;
}
.done i { font-size: 34px; color: var(--green); }
.done h2 { font-size: 22px; margin: 10px 0 6px; }
.done p { color: var(--text-secondary); max-width: 52ch; margin: 0 auto; }

.faq h2 { font-size: 22px; margin: 34px 0 14px; }
.faq details {
    background: var(--bg-secondary); border: 1px solid var(--line); border-radius: 12px;
    padding: 14px 18px; margin-bottom: 10px;
}
.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--gold); font-size: 20px; line-height: 1; }
.faq details[open] summary::after { content: '\2212'; }
.faq details p { color: var(--text-secondary); font-size: 15px; margin-top: 10px; }

.step-tip { margin: 16px 0 0 52px; font-size: 14px; padding: 12px 16px; }

.more-guides h2 { font-size: 22px; margin: 34px 0 14px; }
.more-guide {
    display: flex; align-items: center; gap: 14px;
    padding: 14px 18px; margin-bottom: 10px;
    background: var(--bg-secondary); border: 1px solid var(--line); border-radius: 12px;
    color: #fff;
}
.more-guide:hover { text-decoration: none; border-color: rgba(212, 175, 55, 0.45); }
.more-guide > i:first-child { color: var(--gold); font-size: 18px; width: 22px; text-align: center; }
.more-guide span { flex: 1; display: flex; flex-direction: column; }
.more-guide small { color: var(--text-secondary); font-size: 13px; }
.more-guide > i:last-child { color: var(--text-secondary); }

.guide-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 34px; flex-wrap: wrap; }
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 11px 20px; border-radius: 999px;
    border: 1px solid var(--line); background: rgba(255,255,255,0.04);
    color: #fff; font-weight: 600; font-size: 14px;
}
.btn:hover { text-decoration: none; background: rgba(255,255,255,0.09); }
.btn-gold { background: var(--primary); border-color: transparent; }
.btn-gold:hover { background: #7d7752; }

.footer-mini {
    margin-top: 56px; padding-top: 24px;
    border-top: 1px solid var(--line);
    color: var(--text-secondary); font-size: 13px;
}

/* Lightbox */
.lightbox {
    position: fixed; inset: 0; z-index: 100;
    display: none; align-items: center; justify-content: center;
    padding: 24px; background: rgba(5, 8, 18, 0.92);
    backdrop-filter: blur(6px);
}
.lightbox.is-open { display: flex; }
.lightbox-inner { position: relative; width: min(1400px, 100%); }
.lightbox-inner .shot { cursor: zoom-out; }
.lightbox-close {
    position: absolute; top: -48px; right: 0;
    width: 40px; height: 40px; border-radius: 50%;
    border: 1px solid var(--line); background: rgba(255,255,255,0.08);
    color: #fff; font-size: 20px; cursor: pointer;
}
.lightbox-caption { color: var(--text-secondary); font-size: 14px; margin-top: 10px; text-align: center; }
body.lightbox-open { overflow: hidden; }

@media (max-width: 900px) {
    .guide-layout { grid-template-columns: 1fr; gap: 0; }
    .toc { display: none; }
}
@media (max-width: 560px) {
    .topbar-links { gap: 12px; font-size: 13px; }
    .topbar-links .hide-sm { display: none; }
    .step { padding: 16px; border-radius: 14px; }
    .step-text, .legend, .step-tip { margin-left: 0; }
    .mark { width: 22px; height: 22px; margin: -11px 0 0 -11px; font-size: 11px; box-shadow: 0 0 0 3px rgba(212,175,55,0.35); }
    .guide-grid { grid-template-columns: 1fr; }
    .hub-search-kbd { display: none; }
    .guide-search { margin-left: 0; width: 100%; }
    .guide-search input { width: 100%; }
}
