/* ══════════════════════════════════════════════
   GARELA v2 — Guide d'utilisation
   Module styles — follows Garela design system
   ══════════════════════════════════════════════ */

/* ─── Module layout ─── */
.guide-module {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 0 40px;
    animation: fade-in .3s ease;
}

.guide-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}
.guide-header-left { flex: 1; min-width: 200px; }
.guide-header-right { flex-shrink: 0; }

.guide-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--ink);
    display: flex;
    align-items: center;
    gap: 10px;
}
.guide-title i {
    font-size: 24px;
    color: var(--g);
}

/* ─── PDF button ─── */
.guide-pdf-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 18px;
    border-radius: var(--r);
    border: 1.5px solid var(--line);
    background: var(--surface);
    color: var(--ink-2);
    cursor: pointer;
    transition: all .2s ease;
}
.guide-pdf-btn:hover {
    border-color: var(--g-border);
    color: var(--g);
    background: var(--g-pale);
}
.guide-pdf-btn i { font-size: 16px; color: #e53935; }
.guide-pdf-btn:disabled {
    opacity: .6;
    cursor: wait;
}

/* ─── Search ─── */
.guide-search-wrap {
    position: relative;
    margin-bottom: 28px;
}
.guide-search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--surface);
    border: 1.5px solid var(--line);
    border-radius: var(--r);
    padding: 0 16px;
    transition: none; /* survol et focus nets, sans fondu */
}
.guide-search-box { background: var(--surface); border: 1.5px solid var(--line-soft); box-shadow: none; } /* posé sur le fond gris de la page : blanc, bordure fine */
.guide-search-box:hover:not(:focus-within) { border-color: var(--line); }
.guide-search-box:focus-within { background: var(--surface); border-color: var(--g); box-shadow: 0 0 0 4px rgba(10,138,66,.12); }
.guide-search-box i {
    font-size: 18px;
    color: var(--muted);
    flex-shrink: 0;
}
.guide-search-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 14px;
    color: var(--ink);
    padding: 12px 0;
    outline: none;
    font-family: inherit;
}
.guide-search-input::placeholder { color: var(--subtle); }
.guide-search-kbd {
    font-size: 11px;
    font-family: inherit;
    background: var(--bg);
    color: var(--muted);
    padding: 2px 7px;
    border-radius: 5px;
    border: 1px solid var(--line);
    flex-shrink: 0;
}

/* Search results dropdown */
.guide-search-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--surface);
    border: 1.5px solid var(--line);
    border-radius: var(--r);
    box-shadow: 0 12px 36px rgba(0,0,0,.12), 0 2px 8px rgba(0,0,0,.06);
    max-height: 340px;
    overflow-y: auto;
    z-index: 50;
    padding: 6px;
}
.guide-search-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px 12px;
    border: none;
    background: none;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    transition: background .15s ease, border-radius .15s ease;
    border-radius: 8px;
}
.guide-search-item:hover { background: var(--g-pale); }
.guide-search-item i {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: var(--g-pale);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: var(--g);
    flex-shrink: 0;
}
.guide-search-item > div { flex: 1; min-width: 0; }
.guide-search-item strong {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.guide-search-item span {
    font-size: 11px;
    color: var(--muted);
    margin-top: 1px;
    display: block;
}
.guide-search-empty {
    padding: 24px 20px;
    text-align: center;
    font-size: 13px;
    color: var(--muted);
}

/* FAQ items in search results */
.gsi-faq { cursor: pointer; flex-wrap: wrap; }
.gsi-faq-icon { background: rgba(217,119,6,.1) !important; color: #d97706 !important; }
.gsi-faq-content { flex: 1; min-width: 0; }
.gsi-faq-content strong { display: block; font-size: 13px; font-weight: 600; color: var(--ink); }
.gsi-faq-tag {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .4px;
    color: #d97706;
    background: rgba(217,119,6,.1);
    padding: 1px 6px;
    border-radius: 4px;
    margin-top: 2px;
}
.gsi-faq-answer {
    display: none !important;
    font-size: 13px;
    color: var(--ink-3);
    line-height: 1.6;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--line-soft);
    width: 100%;
}
.gsi-faq.is-open .gsi-faq-answer { display: block !important; }
.gsi-faq-caret {
    font-size: 14px;
    color: var(--muted);
    flex-shrink: 0;
    transition: transform .2s;
}
.gsi-faq.is-open .gsi-faq-caret { transform: rotate(180deg); }

/* ─── Sections ─── */
.guide-section {
    margin-bottom: 32px;
}
.guide-section-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--ink-2);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.guide-section-title i {
    font-size: 17px;
    color: var(--g);
}

/* ─── Categories grid ───
   Un seul cadre, les catégories séparées par un filet (même construction que les
   actions rapides de la vue d'ensemble) : filets droit + bas sur chaque cellule,
   poussés d'1 px hors du cadre et rognés ; une cellule orpheline s'étire. */
.guide-categories-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    border: 1px solid var(--line-soft);
    border-radius: var(--r-lg, 16px);
    background: var(--surface);
    overflow: hidden;
}
.guide-category-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    margin: 0 -1px -1px 0;
    width: calc(100% + 1px);
    background: transparent;
    border: 0;
    border-right: 1px solid var(--line-soft);
    border-bottom: 1px solid var(--line-soft);
    border-radius: 0;
    cursor: pointer;
    transition: none;
    text-decoration: none;
    color: inherit;
    font-family: inherit;
    text-align: left;
}
.guide-category-card:last-child:nth-child(3n + 1) { grid-column: span 3; }
.guide-category-card:last-child:nth-child(3n + 2) { grid-column: span 2; }
.guide-category-card:hover .guide-category-info strong { text-decoration: underline; text-underline-offset: 3px; }
.guide-category-card:focus-visible { outline: 2px solid var(--g); outline-offset: -3px; }
.guide-category-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--g-pale);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.guide-category-icon i {
    font-size: 20px;
    color: var(--g);
}
.guide-category-info strong {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
    line-height: 1.3;
}
.guide-category-info span {
    font-size: 11px;
    color: var(--muted);
}

/* ─── Walkthroughs list ─── */
.guide-walkthroughs-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.guide-wt-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--surface);
    border: 1px solid var(--line-soft);
    border-radius: var(--r);
    transition: background .15s ease;
}
.guide-wt-item:hover { background: var(--bg); }
.guide-wt-item.is-done { opacity: .7; }
.guide-wt-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: var(--g-pale);
}
.guide-wt-icon i {
    font-size: 16px;
    color: var(--g);
}
.guide-wt-item.is-done .guide-wt-icon {
    background: var(--g-mist);
}
.guide-wt-info {
    flex: 1;
    min-width: 0;
}
.guide-wt-info strong {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
}
.guide-wt-info span {
    font-size: 11px;
    color: var(--muted);
}

/* ─── FAQ ─── */
.guide-faq-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.guide-faq-item {
    background: var(--surface);
    border: 1px solid var(--line-soft);
    border-radius: var(--r);
    overflow: hidden;
}
.guide-faq-item.is-open {
    border-color: var(--g-border);
}
.guide-faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 14px 16px;
    border: none;
    background: none;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
    cursor: pointer;
    text-align: left;
    gap: 12px;
}
.guide-faq-item:not(.is-open) .guide-faq-question:hover span { text-decoration: underline; text-underline-offset: 3px; } /* survol : soulignement, pas de fond */
.guide-faq-question i {
    font-size: 14px;
    color: var(--muted);
    flex-shrink: 0;
}
.guide-faq-item.is-open .guide-faq-question i {
    transform: rotate(180deg);
}
.guide-faq-answer { /* ouverture immédiate, sans animation */
    max-height: 0;
    overflow: hidden;
    padding: 0 16px;
}
.guide-faq-item.is-open .guide-faq-answer {
    max-height: 500px;
    padding: 0 16px 16px;
}
.guide-faq-answer p {
    font-size: 13px;
    color: var(--ink-3);
    line-height: 1.6;
    margin: 0;
}
.guide-faq-helpful {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--line-soft);
    font-size: 12px;
    color: var(--muted);
}
.guide-helpful-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: none;
    font-family: inherit;
    font-size: 12px;
    color: var(--muted);
    cursor: pointer;
    transition: all .15s ease;
}
.guide-helpful-btn:hover {
    border-color: var(--g);
    color: var(--g);
    background: var(--g-pale);
}
.guide-faq-thanks {
    color: var(--g);
    font-weight: 600;
    font-size: 12px;
}

/* ─── Changelog ─── */
.guide-changelog-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.guide-changelog-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 16px;
    background: var(--surface);
    border: 1px solid var(--line-soft);
    border-radius: var(--r);
}
.guide-changelog-item.is-major {
    border-color: var(--g-border);
    background: var(--g-pale);
}
.guide-changelog-badge {
    flex-shrink: 0;
    padding: 3px 10px;
    border-radius: 8px;
    background: var(--bg-2);
    font-size: 12px;
    font-weight: 700;
    color: var(--ink-3);
}
.guide-changelog-item.is-major .guide-changelog-badge {
    background: var(--g);
    color: #fff;
}
.guide-changelog-content strong {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 2px;
}
.guide-changelog-content p {
    font-size: 12px;
    color: var(--ink-3);
    margin: 0 0 4px;
    line-height: 1.5;
}
.guide-changelog-content time {
    font-size: 11px;
    color: var(--muted);
}

/* ─── Article view ─── */
.guide-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    font-size: 13px;
    color: var(--muted);
}
.guide-breadcrumb button {
    background: none;
    border: none;
    font-family: inherit;
    font-size: 13px;
    color: var(--g);
    cursor: pointer;
    padding: 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.guide-breadcrumb button:hover { text-decoration: underline; }
.guide-breadcrumb i.ph-caret-right {
    font-size: 10px;
    color: var(--line);
}

.guide-articles-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.guide-article-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: var(--surface);
    border: 1px solid var(--line-soft);
    border-radius: var(--r);
    cursor: pointer;
    transition: all .2s ease;
    width: 100%;
    font-family: inherit;
    text-align: left;
    color: inherit;
    text-decoration: none;
}
.guide-article-card:hover {
    border-color: var(--g-border);
    background: var(--g-pale);
}
.guide-article-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.guide-article-icon i { font-size: 18px; color: var(--g); }
.guide-article-info { flex: 1; min-width: 0; }
.guide-article-info strong {
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
}
.guide-article-card > i.ph-caret-right {
    font-size: 14px;
    color: var(--line);
    flex-shrink: 0;
}

/* ─── Article layout ─── */
.guide-article-layout {
    display: grid;
    grid-template-columns: 1fr 200px;
    gap: 32px;
    align-items: start;
    animation: fade-in .3s ease;
}

/* Article header */
.guide-article-header {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1.5px solid var(--line-soft);
}
.guide-article-header h2 {
    font-size: 22px;
    font-weight: 800;
    color: var(--ink);
    margin: 0 0 10px;
    letter-spacing: -.01em;
    line-height: 1.3;
}
.guide-article-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 12px;
    color: var(--muted);
}
.guide-article-meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.guide-article-meta i { font-size: 14px; }

/* Mini table of contents — sidebar */
.guide-article-toc {
    position: sticky;
    top: 20px;
    padding: 16px;
    background: var(--bg);
    border: 1px solid var(--line-soft);
    border-radius: var(--r);
}
.guide-article-toc-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--muted);
    margin-bottom: 10px;
}
.guide-article-toc a {
    display: block;
    font-size: 12px;
    color: var(--ink-3);
    text-decoration: none;
    padding: 5px 0 5px 12px;
    border-left: 2px solid var(--line-soft);
    transition: all .15s ease;
    line-height: 1.4;
}
.guide-article-toc a:hover,
.guide-article-toc a.is-active {
    color: var(--g);
    border-left-color: var(--g);
}

/* Fallback: article view without TOC sidebar */
.guide-article-view {
    animation: fade-in .3s ease;
}
.guide-article-view h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 16px;
}

/* ─── Article body — rich content typography ─── */
.guide-article-body {
    font-size: 14px;
    color: var(--ink-2);
    line-height: 1.75;
}

/* Paragraphs */
.guide-article-body p {
    margin: 0 0 16px;
}
.guide-article-body p:last-child { margin-bottom: 0; }

/* Headings inside article */
.guide-article-body h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--ink);
    margin: 28px 0 12px;
    padding-left: 12px;
    border-left: 3px solid var(--g);
    line-height: 1.4;
}
.guide-article-body h3:first-child { margin-top: 0; }

.guide-article-body h4 {
    font-size: 14px;
    font-weight: 700;
    color: var(--ink);
    margin: 20px 0 8px;
}

/* Unordered lists */
.guide-article-body ul {
    margin: 0 0 16px;
    padding: 0;
    list-style: none;
}
.guide-article-body ul li {
    position: relative;
    padding: 4px 0 4px 24px;
    line-height: 1.65;
}
.guide-article-body ul li::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 13px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--g);
}

/* Ordered lists — numbered steps */
.guide-article-body ol {
    margin: 0 0 16px;
    padding: 0;
    list-style: none;
    counter-reset: guide-step;
}
.guide-article-body ol li {
    position: relative;
    padding: 8px 0 8px 40px;
    counter-increment: guide-step;
    line-height: 1.65;
}
.guide-article-body ol li::before {
    content: counter(guide-step);
    position: absolute;
    left: 0;
    top: 6px;
    width: 26px;
    height: 26px;
    border-radius: 8px;
    background: var(--g-pale);
    color: var(--g);
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}
.guide-article-body ol li + li {
    border-top: 1px dashed var(--line-soft);
}

/* Bold & emphasis */
.guide-article-body strong {
    font-weight: 700;
    color: var(--ink);
}
.guide-article-body em {
    font-style: italic;
    color: var(--ink-2);
}

/* Inline code */
.guide-article-body code {
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 12px;
    padding: 2px 6px;
    background: var(--bg-2);
    border-radius: 4px;
    color: var(--g-dark, var(--g));
}

/* Callout tips & warnings inside articles */
.guide-article-body .guide-callout,
.guide-article-body p:has(> strong:first-child:only-child),
.guide-article-body p:last-child:has(strong:first-child) {
    /* auto-detect tip paragraphs starting with bold */
}
.guide-callout {
    display: flex;
    gap: 12px;
    padding: 14px 16px;
    border-radius: var(--r);
    margin: 16px 0;
    font-size: 13px;
    line-height: 1.6;
}
.guide-callout-tip {
    background: var(--g-pale);
    border: 1px solid var(--g-border);
}
.guide-callout-tip::before {
    content: '\e44e'; /* ph lightbulb */
    font-family: 'Phosphor';
    font-size: 18px;
    color: var(--g);
    flex-shrink: 0;
}
.guide-callout-warning {
    background: #fffbeb;
    border: 1px solid #fde68a;
}
.guide-callout-warning::before {
    content: '\e660'; /* ph warning */
    font-family: 'Phosphor';
    font-size: 18px;
    color: #d97706;
    flex-shrink: 0;
}

/* Status badges inline */
.guide-article-body span[style*="color:green"],
.guide-article-body span[style*="color: green"] {
    background: #ecfdf5;
    color: #059669 !important;
    padding: 2px 8px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 13px;
}
.guide-article-body span[style*="color:orange"],
.guide-article-body span[style*="color: orange"] {
    background: #fffbeb;
    color: #d97706 !important;
    padding: 2px 8px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 13px;
}
.guide-article-body span[style*="color:red"],
.guide-article-body span[style*="color: red"] {
    background: #fef2f2;
    color: #dc2626 !important;
    padding: 2px 8px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 13px;
}

/* Navigation footer between articles */
.guide-article-nav {
    display: flex;
    gap: 12px;
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1.5px solid var(--line-soft);
}
.guide-article-nav button {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    background: var(--surface);
    border: 1.5px solid var(--line-soft);
    border-radius: var(--r);
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    transition: all .2s ease;
    color: inherit;
}
.guide-article-nav button:hover {
    border-color: var(--g-border);
    background: var(--g-pale);
}
.guide-article-nav button.is-next { text-align: right; flex-direction: row-reverse; }
.guide-article-nav-label {
    font-size: 11px;
    color: var(--muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .3px;
    display: block;
}
.guide-article-nav-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
    display: block;
    margin-top: 2px;
}
.guide-article-nav button i {
    font-size: 18px;
    color: var(--g);
    flex-shrink: 0;
}

/* Visuel inséré dans le fil de l'article (jeton {{media:N}}) : il illustre
   l'étape qu'il accompagne, d'où la marge respirante avant et après. */
.guide-article-body .guide-media-figure {
    margin: 20px 0 24px;
}
.guide-article-body .guide-media-figure img {
    display: block;
    width: 100%;
}

/* Media gallery */
.guide-article-media {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.guide-article-media img,
.guide-media-img {
    max-width: 100%;
    border-radius: var(--r);
    border: 1px solid var(--line);
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
}

/* Video embed */
.guide-article-video {
    margin-top: 20px;
    border-radius: var(--r);
    overflow: hidden;
    border: 1px solid var(--line);
    aspect-ratio: 16/9;
}
.guide-article-video iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* ─── Content area (category / article detail) ─── */
#guidePublicContent {
    background: var(--surface);
    border: 1.5px solid var(--line);
    border-radius: 16px;
    padding: 24px 28px;
    margin-top: 8px;
    margin-bottom: 48px;
    box-shadow: 0 2px 12px rgba(0,0,0,.04);
    animation: fade-in .25s ease;
}

/* ─── Header row (back + title) ─── */
.guide-header-row {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1.5px solid var(--line-soft);
}
.guide-header-row .guide-section-title,
.guide-header-row .guide-article-title {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    color: var(--ink);
}

/* Nested cards inside content area — remove double border */
#guidePublicContent .guide-article-card {
    border-color: var(--line-soft);
}
#guidePublicContent .guide-articles-list {
    gap: 8px;
}

/* ─── Back button ─── */
.guide-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    cursor: pointer;
    flex-shrink: 0;
    transition: all .15s ease;
}
.guide-back-btn:hover {
    border-color: var(--g-border);
    color: var(--g);
    background: var(--g-pale);
}

/* ─── Empty state ─── */
.db-empty-subtle,
.guide-public-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--muted);
    grid-column: 1 / -1;
}
.db-empty-subtle i,
.guide-public-empty i {
    font-size: 36px;
    display: block;
    margin-bottom: 10px;
    opacity: .4;
}
.db-empty-subtle p,
.guide-public-empty p {
    font-size: 14px;
    margin: 0;
}

/* ─── Public guide page — redesign ─── */
.guide-public { min-height: 60vh; padding-bottom: 60px; }

/* Hero band */
.gp-hero {
    background: linear-gradient(135deg, var(--g) 0%, #065f2e 100%);
    padding: 160px 0 40px;
    margin-bottom: 40px;
}
.gp-hero-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}
.gp-hero-content { flex: 1; max-width: 560px; }
.gp-hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: rgba(255,255,255,.7);
    margin-bottom: 10px;
}
.gp-hero-tag i { font-size: 14px; }
.gp-hero h1 {
    font-size: clamp(24px, 3vw, 32px);
    font-weight: 800;
    color: #fff;
    margin: 0 0 8px;
    letter-spacing: -.02em;
}
.gp-hero p {
    font-size: 15px;
    color: rgba(255,255,255,.75);
    margin: 0 0 20px;
    line-height: 1.5;
}
.gp-hero-search { position: relative; }
.gp-hero-search .guide-search-box {
    background: rgba(255,255,255,.12);
    border-color: rgba(255,255,255,.2);
    backdrop-filter: blur(8px);
}
.gp-hero-search .guide-search-box:focus-within {
    background: rgba(255,255,255,.18);
    border-color: rgba(255,255,255,.4);
    box-shadow: 0 0 0 3px rgba(255,255,255,.1);
}
.gp-hero-search .guide-search-input {
    color: #fff;
}
.gp-hero-search .guide-search-input::placeholder { color: rgba(255,255,255,.5); }
.gp-hero-search .guide-search-box i { color: rgba(255,255,255,.5); }
.gp-kbd {
    font-size: 11px;
    font-family: inherit;
    background: rgba(255,255,255,.15);
    color: rgba(255,255,255,.6);
    padding: 2px 7px;
    border-radius: 5px;
    border: 1px solid rgba(255,255,255,.15);
    flex-shrink: 0;
}

/* Stats */
.gp-hero-stats {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-shrink: 0;
}
.gp-stat { text-align: center; }
.gp-stat strong {
    display: block;
    font-size: 28px;
    font-weight: 800;
    color: #fff;
    line-height: 1;
}
.gp-stat span {
    font-size: 12px;
    color: rgba(255,255,255,.6);
    font-weight: 500;
}
.gp-stat-sep {
    width: 1px;
    height: 32px;
    background: rgba(255,255,255,.15);
}

/* Sections */
.gp-section { margin-bottom: 48px; }
.gp-section-head {
    margin-bottom: 18px;
}
.gp-section-head h2 {
    font-size: 18px;
    font-weight: 700;
    color: var(--ink);
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}
.gp-section-head h2 i {
    font-size: 20px;
    color: var(--g);
}

/* Categories — 3-column grid */
.gp-categories {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}
.gp-cat-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 16px;
    background: var(--surface);
    border: 1.5px solid var(--line-soft);
    border-radius: var(--r);
    cursor: pointer;
    transition: all .2s ease;
    text-decoration: none;
    color: inherit;
}
.gp-cat-card:hover {
    border-color: var(--g-border);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,.06);
}
.gp-cat-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: color-mix(in srgb, var(--cat-color) 12%, transparent);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.gp-cat-icon i {
    font-size: 22px;
    color: var(--cat-color);
}
.gp-cat-body { flex: 1; min-width: 0; }
.gp-cat-body strong {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--ink);
    line-height: 1.3;
}
.gp-cat-body span {
    font-size: 12px;
    color: var(--muted);
}
.gp-cat-arrow {
    font-size: 16px;
    color: var(--line);
    flex-shrink: 0;
    transition: transform .2s, color .2s;
}
.gp-cat-card:hover .gp-cat-arrow {
    color: var(--g);
    transform: translateX(3px);
}

/* FAQ — 2-column grid with numbered cards */
.gp-faq-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}
.gp-faq-card {
    background: var(--surface);
    border: 1.5px solid var(--line-soft);
    border-radius: var(--r);
    overflow: hidden;
    transition: border-color .2s;
}
.gp-faq-card.is-open { border-color: var(--g-border); }
.gp-faq-q {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 14px 16px;
    border: none;
    background: none;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
    cursor: pointer;
    text-align: left;
    transition: background .15s;
}
.gp-faq-q:hover { background: var(--bg); }
.gp-faq-num {
    width: 26px;
    height: 26px;
    border-radius: 8px;
    background: var(--g-pale);
    color: var(--g);
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.gp-faq-q span { flex: 1; }
.gp-faq-q > i {
    font-size: 14px;
    color: var(--muted);
    flex-shrink: 0;
    transition: transform .2s;
}
.gp-faq-card.is-open .gp-faq-q > i { transform: rotate(180deg); }
.gp-faq-a {
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s, padding .3s;
    padding: 0 16px 0 54px;
}
.gp-faq-card.is-open .gp-faq-a {
    max-height: 500px;
    padding: 0 16px 16px 54px;
}
.gp-faq-a p {
    font-size: 13px;
    color: var(--ink-3);
    line-height: 1.6;
    margin: 0;
}

/* CTA bar */
.gp-cta {
    margin-top: 8px;
    margin-bottom: 20px;
}
.gp-cta-inner {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    background: var(--g-pale);
    border: 1.5px solid var(--g-border);
    border-radius: var(--r-xl);
}
.gp-cta-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--g-mist);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.gp-cta-icon i { font-size: 22px; color: var(--g); }
.gp-cta-text { flex: 1; }
.gp-cta-text strong {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 2px;
}
.gp-cta-text p {
    font-size: 13px;
    color: var(--muted);
    margin: 0;
}
.gp-dash-link {
    text-align: center;
    margin-top: 16px;
}

/* ─── Dark mode ─── */
.is-dark .guide-category-card,
.is-dark .guide-wt-item,
.is-dark .guide-faq-item,
.is-dark .guide-changelog-item,
.is-dark .guide-article-card,
.is-dark .guide-search-box {
    background: var(--surface);
    border-color: var(--line-soft);
}
.is-dark .guide-category-icon {
    background: rgba(10,138,66,.15);
}
.is-dark .guide-search-results {
    background: var(--surface);
    border-color: var(--line);
}
.is-dark .guide-pdf-btn {
    background: var(--surface);
    border-color: var(--line);
}
.is-dark .gp-cat-card,
.is-dark .gp-faq-card {
    background: var(--surface);
    border-color: var(--line-soft);
}
.is-dark #guidePublicContent {
    background: var(--surface);
    border-color: var(--line);
    box-shadow: 0 2px 16px rgba(0,0,0,.2);
}
.is-dark .gp-cta-inner {
    background: rgba(10,138,66,.08);
    border-color: rgba(10,138,66,.2);
}
.is-dark .gp-hero {
    background: linear-gradient(135deg, #064e24 0%, #032b14 100%);
}
.is-dark .guide-article-toc {
    background: var(--surface);
    border-color: var(--line);
}
.is-dark .guide-article-body ol li::before {
    background: rgba(10,138,66,.15);
}
.is-dark .guide-article-body ul li::before {
    background: var(--g);
}
.is-dark .guide-article-body span[style*="color:green"],
.is-dark .guide-article-body span[style*="color: green"] {
    background: rgba(5,150,105,.12);
}
.is-dark .guide-article-body span[style*="color:orange"],
.is-dark .guide-article-body span[style*="color: orange"] {
    background: rgba(217,119,6,.12);
}
.is-dark .guide-article-body span[style*="color:red"],
.is-dark .guide-article-body span[style*="color: red"] {
    background: rgba(220,38,38,.12);
}
.is-dark .guide-callout-tip {
    background: rgba(10,138,66,.08);
    border-color: rgba(10,138,66,.2);
}
.is-dark .guide-callout-warning {
    background: rgba(217,119,6,.08);
    border-color: rgba(217,119,6,.2);
}
.is-dark .guide-article-nav button {
    background: var(--surface);
    border-color: var(--line-soft);
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
    .guide-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .guide-pdf-btn { width: 100%; justify-content: center; }
    .guide-categories-grid { grid-template-columns: repeat(2, 1fr); }
    .guide-category-card:last-child:nth-child(n) { grid-column: auto; }
    .guide-category-card:last-child:nth-child(odd) { grid-column: span 2; }
    .guide-category-card { padding: 12px 14px; }
    .guide-category-icon { width: 36px; height: 36px; border-radius: 10px; }
    .guide-category-icon i { font-size: 17px; }
    .guide-article-layout {
        grid-template-columns: 1fr;
    }
    .guide-article-toc { display: none; }
    .guide-article-nav { flex-direction: column; }
    .guide-article-nav button.is-next { flex-direction: row; text-align: left; }
    .gp-hero { padding: 100px 0 28px; margin-bottom: 28px; }
    .gp-hero-inner { flex-direction: column; text-align: center; }
    .gp-hero-content { max-width: 100%; }
    .gp-hero h1 { font-size: 22px; }
    .gp-hero p { font-size: 14px; }
    .gp-categories { grid-template-columns: 1fr 1fr; }
    .gp-faq-grid { grid-template-columns: 1fr; }
    .gp-cta-inner { flex-direction: column; text-align: center; }
}
@media (max-width: 480px) {
    .gp-categories { grid-template-columns: 1fr; }
    .gp-hero-stats { gap: 16px; }
    .gp-stat strong { font-size: 22px; }
    .guide-wt-item { flex-wrap: wrap; }
    .guide-wt-item .btn { width: 100%; justify-content: center; margin-top: 4px; }
}
