:root {
    --color-accent: #6378F0;
    --color-accent-hover: #4f64d6;
    --color-text-primary: rgba(0, 0, 0, 0.92);
    --color-text-secondary: #615d59;
    --color-text-muted: #a39e98;
    --color-surface: #ffffff;
    --color-warm-bg: #f6f5f4;
    --color-border: rgba(0, 0, 0, 0.1);
    --shadow-card:
        rgba(0,0,0,0.04) 0px 4px 18px,
        rgba(0,0,0,0.027) 0px 2px 7.85px,
        rgba(0,0,0,0.02) 0px 0.8px 2.93px,
        rgba(0,0,0,0.01) 0px 0.175px 1.04px;
    --shadow-card-hover:
        rgba(0,0,0,0.05) 0px 8px 28px,
        rgba(0,0,0,0.035) 0px 4px 12px,
        rgba(0,0,0,0.02) 0px 1.5px 4px;
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: Inter, -apple-system, BlinkMacSystemFont, 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', system-ui, sans-serif;
    color: var(--color-text-primary);
    background: var(--color-surface);
    min-height: 100vh;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ─── Header ─── */
header {
    border-bottom: 1px solid var(--color-border);
    padding: 56px 24px 48px;
    text-align: center;
}

header .back-link {
    display: inline-block;
    color: var(--color-text-secondary);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    margin-bottom: 20px;
    transition: color 0.2s ease;
}

header .back-link:hover {
    color: var(--color-accent);
}

header .breadcrumb {
    font-size: 0.78rem;
    color: var(--color-text-muted);
    margin-bottom: 14px;
    letter-spacing: 0.125px;
}

header .breadcrumb a {
    color: var(--color-text-secondary);
    text-decoration: none;
}

header .breadcrumb a:hover {
    color: var(--color-accent);
}

header h1 {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -1px;
    line-height: 1.25;
    max-width: 720px;
    margin: 0 auto;
}

header .lede {
    font-size: 0.95rem;
    color: var(--color-text-secondary);
    margin-top: 18px;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.8;
}

/* ─── Content ─── */
.container {
    max-width: 720px;
    margin: 0 auto;
    padding: 48px 28px 80px;
}

.meta-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 32px;
}

.badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-accent);
    background: rgba(99, 120, 240, 0.08);
    padding: 4px 12px;
    border-radius: 9999px;
    letter-spacing: 0.125px;
}

.badge.muted {
    color: var(--color-text-secondary);
    background: var(--color-warm-bg);
}

h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 56px 0 18px;
    color: var(--color-text-primary);
    padding-bottom: 10px;
    border-bottom: 1px solid var(--color-border);
    letter-spacing: -0.25px;
    scroll-margin-top: 24px;
}

h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 32px 0 12px;
    color: var(--color-text-primary);
    letter-spacing: -0.125px;
}

p, li {
    font-size: 0.94rem;
    color: var(--color-text-secondary);
    margin-bottom: 12px;
    line-height: 1.85;
}

ul, ol {
    padding-left: 22px;
    margin: 8px 0 16px;
}

li { margin-bottom: 8px; }

li strong, p strong {
    color: var(--color-text-primary);
    font-weight: 600;
}

a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--color-accent-hover);
    text-decoration: underline;
}

/* ─── Step list (HowTo) ─── */
ol.steps {
    list-style: none;
    padding-left: 0;
    counter-reset: step;
    margin: 20px 0 28px;
}

ol.steps > li {
    counter-increment: step;
    position: relative;
    padding: 16px 18px 16px 54px;
    background: var(--color-warm-bg);
    border-radius: 12px;
    margin-bottom: 10px;
    font-size: 0.94rem;
    color: var(--color-text-primary);
    line-height: 1.75;
}

ol.steps > li::before {
    content: counter(step);
    position: absolute;
    left: 16px;
    top: 15px;
    width: 28px;
    height: 28px;
    background: var(--color-accent);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
}

ol.steps > li strong {
    display: block;
    font-weight: 700;
    margin-bottom: 2px;
}

/* ─── FAQ ─── */
details.faq {
    border: 1px solid var(--color-border);
    border-radius: 10px;
    padding: 14px 18px;
    margin-bottom: 10px;
    background: #fff;
    transition: box-shadow 0.2s ease;
}

details.faq[open] {
    box-shadow: var(--shadow-card);
}

details.faq summary {
    font-weight: 600;
    color: var(--color-text-primary);
    cursor: pointer;
    font-size: 0.95rem;
    list-style: none;
    position: relative;
    padding-right: 28px;
}

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

details.faq summary::after {
    content: "+";
    position: absolute;
    right: 0;
    top: -2px;
    font-size: 1.3rem;
    color: var(--color-accent);
    font-weight: 400;
    transition: transform 0.2s ease;
}

details.faq[open] summary::after {
    content: "−";
}

details.faq p {
    margin-top: 12px;
    margin-bottom: 0;
}

/* ─── CTA ─── */
.cta-card {
    background: linear-gradient(135deg, rgba(99, 120, 240, 0.08), rgba(99, 120, 240, 0.02));
    border: 1px solid rgba(99, 120, 240, 0.18);
    border-radius: 18px;
    padding: 32px 28px;
    text-align: center;
    margin: 48px 0 20px;
}

.cta-card h3 {
    font-size: 1.2rem;
    margin: 0 0 10px;
}

.cta-card p {
    color: var(--color-text-secondary);
    margin-bottom: 20px;
}

.cta-button {
    display: inline-block;
    background: var(--color-accent);
    color: #fff !important;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 12px 28px;
    border-radius: 9999px;
    text-decoration: none;
    transition: all 0.2s var(--ease-out);
    box-shadow: var(--shadow-card);
}

.cta-button:hover {
    background: var(--color-accent-hover);
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: var(--shadow-card-hover);
}

/* ─── Related guides ─── */
.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
    margin-top: 20px;
}

.related-card {
    display: block;
    padding: 20px 22px;
    border: 1px solid var(--color-border);
    border-radius: 14px;
    text-decoration: none;
    background: #fff;
    transition: all 0.25s var(--ease-out);
}

.related-card:hover {
    border-color: rgba(99, 120, 240, 0.3);
    box-shadow: var(--shadow-card);
    transform: translateY(-2px);
    text-decoration: none;
}

.related-card .title {
    display: block;
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--color-text-primary);
    margin-bottom: 6px;
    letter-spacing: -0.125px;
}

.related-card .desc {
    display: block;
    font-size: 0.82rem;
    color: var(--color-text-secondary);
    line-height: 1.6;
}

/* ─── Hub grid (guides/index.html) ─── */
.hub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 12px;
}

/* ─── Annotated screenshots ─── */
figure.annotated {
    position: relative;
    display: block;
    margin: 24px auto 8px;
    max-width: 320px;
    line-height: 0;
}

figure.annotated img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 18px;
    box-shadow: var(--shadow-card);
}

.marker {
    position: absolute;
    width: 32px;
    height: 32px;
    border: 3px solid #ff5858;
    background: rgba(255, 88, 88, 0.18);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.88rem;
    line-height: 1;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.9), 0 2px 6px rgba(0,0,0,0.15);
    pointer-events: none;
    z-index: 2;
}

.marker-outline {
    position: absolute;
    border: 3px solid #ff5858;
    background: rgba(255, 88, 88, 0.08);
    border-radius: 18px;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.7);
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 1;
}

figure.annotated figcaption {
    font-size: 0.82rem;
    color: var(--color-text-secondary);
    text-align: center;
    margin: 14px auto 28px;
    line-height: 1.7;
    max-width: 320px;
}

figure.annotated figcaption .key {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border: 2px solid #ff5858;
    background: rgba(255, 88, 88, 0.15);
    color: #ff5858;
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.72rem;
    margin-right: 4px;
    margin-left: 2px;
    vertical-align: middle;
    line-height: 1;
}

/* ─── Footer ─── */
footer {
    text-align: center;
    padding: 40px 24px;
    border-top: 1px solid var(--color-border);
}

footer a {
    color: var(--color-text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: color 0.2s ease;
    margin: 0 10px;
}

footer a:hover {
    color: var(--color-accent);
}

/* ─── Responsive ─── */
@media (max-width: 600px) {
    header { padding: 40px 20px 36px; }
    header h1 { font-size: 1.5rem; letter-spacing: -0.5px; }
    header .lede { font-size: 0.9rem; }
    .container { padding: 36px 20px 60px; }
    h2 { margin: 44px 0 14px; font-size: 1.15rem; }
    ol.steps > li { padding: 14px 16px 14px 48px; font-size: 0.9rem; }
    ol.steps > li::before { left: 12px; top: 13px; width: 26px; height: 26px; font-size: 0.8rem; }
    .cta-card { padding: 26px 20px; }
}
