:root {
    --guide-blue: #1769d2;
    --guide-blue-soft: #eaf3ff;
    --guide-green: #1d9a58;
    --guide-green-soft: #eaf8f0;
    --guide-orange: #d96b1b;
    --guide-orange-soft: #fff3e8;
    --guide-ink: #172033;
    --guide-muted: #657087;
    --guide-border: #dce3ec;
    --guide-surface: #f5f7fa;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 92px;
}

body.guide-page {
    margin: 0;
    color: var(--guide-ink);
    background: #fff;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    letter-spacing: 0;
}

.guide-header {
    position: sticky;
    z-index: 1040;
    top: 0;
    min-height: 72px;
    border-bottom: 1px solid var(--guide-border);
    background: rgba(255, 255, 255, .97);
    backdrop-filter: blur(8px);
}

.guide-header-inner,
.guide-hero-inner,
.guide-shell,
.guide-footer-inner {
    width: min(1440px, calc(100% - 48px));
    margin: 0 auto;
}

.guide-header-inner {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.guide-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--guide-ink);
    text-decoration: none;
}

.guide-brand img {
    width: 42px;
    height: 42px;
    object-fit: contain;
}

.guide-brand strong {
    display: block;
    font-size: 18px;
    line-height: 1.2;
}

.guide-brand span {
    display: block;
    margin-top: 2px;
    color: var(--guide-muted);
    font-size: 13px;
}

.guide-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.guide-hero {
    border-bottom: 1px solid var(--guide-border);
    background: var(--guide-surface);
}

.guide-hero-inner {
    padding: 42px 0 38px;
}

.guide-eyebrow {
    margin: 0 0 8px;
    color: var(--guide-blue);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
}

.guide-hero h1 {
    max-width: 820px;
    margin: 0;
    font-size: 34px;
    line-height: 1.2;
}

.guide-lead {
    max-width: 840px;
    margin: 14px 0 0;
    color: var(--guide-muted);
    font-size: 17px;
    line-height: 1.7;
}

.guide-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin-top: 18px;
    color: var(--guide-muted);
    font-size: 14px;
}

.guide-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.guide-search-wrap {
    position: relative;
    max-width: 760px;
    margin-top: 26px;
}

.guide-search-wrap .ti-search {
    position: absolute;
    top: 50%;
    left: 16px;
    color: var(--guide-muted);
    transform: translateY(-50%);
}

.guide-search {
    width: 100%;
    min-height: 48px;
    padding: 10px 88px 10px 44px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #fff;
    color: var(--guide-ink);
}

.guide-search:focus {
    border-color: var(--guide-blue);
    box-shadow: 0 0 0 3px rgba(23, 105, 210, .12);
    outline: none;
}

.guide-search-clear {
    position: absolute;
    top: 50%;
    right: 8px;
    display: none;
    transform: translateY(-50%);
}

.guide-search-status {
    min-height: 20px;
    margin: 8px 0 0;
    color: var(--guide-muted);
    font-size: 13px;
}

.guide-mobile-nav {
    display: none;
    margin-top: 22px;
    border: 1px solid var(--guide-border);
    border-radius: 6px;
    background: #fff;
}

.guide-mobile-nav summary {
    padding: 12px 14px;
    cursor: pointer;
    font-weight: 600;
}

.guide-mobile-nav nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px 12px;
    padding: 0 14px 14px;
}

.guide-mobile-nav a {
    padding: 7px 0;
    color: var(--guide-muted);
    text-decoration: none;
}

.guide-shell {
    display: grid;
    grid-template-columns: 270px minmax(0, 1fr);
    gap: 56px;
    padding: 36px 0 72px;
}

.guide-toc {
    align-self: start;
    position: sticky;
    top: 104px;
    max-height: calc(100vh - 128px);
    overflow-y: auto;
    padding-right: 10px;
}

.guide-toc-label {
    margin: 0 0 10px;
    color: var(--guide-muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.guide-toc nav {
    display: grid;
    gap: 2px;
}

.guide-toc a {
    display: block;
    padding: 7px 10px;
    border-left: 2px solid transparent;
    color: #526077;
    font-size: 14px;
    line-height: 1.35;
    text-decoration: none;
}

.guide-toc a:hover,
.guide-toc a.is-active {
    border-left-color: var(--guide-blue);
    background: var(--guide-blue-soft);
    color: var(--guide-blue);
}

.guide-content {
    min-width: 0;
    max-width: 980px;
}

.guide-section {
    padding: 6px 0 44px;
    border-bottom: 1px solid var(--guide-border);
    margin-bottom: 42px;
}

.guide-section:last-child {
    border-bottom: 0;
    margin-bottom: 0;
}

.guide-section[hidden] {
    display: none;
}

.guide-section h2 {
    margin: 0 0 20px;
    font-size: 27px;
    line-height: 1.3;
}

.guide-section h3 {
    margin: 30px 0 12px;
    font-size: 19px;
    line-height: 1.4;
}

.guide-section p,
.guide-section li,
.guide-section td,
.guide-section th {
    font-size: 15px;
    line-height: 1.72;
}

.guide-section p {
    margin: 0 0 14px;
}

.guide-section ul,
.guide-section ol {
    padding-left: 22px;
    margin: 10px 0 18px;
}

.guide-section li + li {
    margin-top: 6px;
}

.guide-section code {
    padding: 2px 5px;
    border-radius: 4px;
    background: #eef2f6;
    color: #36506d;
}

.guide-flow {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
    margin: 24px 0;
}

.guide-flow-step {
    position: relative;
    min-height: 112px;
    padding: 16px 12px;
    border-top: 3px solid var(--guide-blue);
    background: var(--guide-surface);
}

.guide-flow-step:nth-child(4),
.guide-flow-step:nth-child(5) {
    border-top-color: var(--guide-green);
}

.guide-flow-step:nth-child(6) {
    border-top-color: var(--guide-orange);
}

.guide-flow-step strong {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
}

.guide-flow-step span {
    color: var(--guide-muted);
    font-size: 13px;
    line-height: 1.45;
}

.guide-callout {
    margin: 20px 0;
    padding: 16px 18px;
    border-left: 4px solid var(--guide-blue);
    background: var(--guide-blue-soft);
}

.guide-callout.guide-callout-warning {
    border-left-color: var(--guide-orange);
    background: var(--guide-orange-soft);
}

.guide-callout.guide-callout-success {
    border-left-color: var(--guide-green);
    background: var(--guide-green-soft);
}

.guide-callout strong {
    display: block;
    margin-bottom: 4px;
}

.guide-callout p:last-child {
    margin-bottom: 0;
}

.guide-table-wrap {
    overflow-x: auto;
    margin: 18px 0 24px;
    border: 1px solid var(--guide-border);
    border-radius: 6px;
}

.guide-table {
    width: 100%;
    border-collapse: collapse;
}

.guide-table th,
.guide-table td {
    padding: 11px 14px;
    border-bottom: 1px solid var(--guide-border);
    text-align: left;
    vertical-align: top;
}

.guide-table th {
    background: var(--guide-surface);
    font-weight: 700;
}

.guide-table tr:last-child td {
    border-bottom: 0;
}

.guide-figure {
    margin: 22px 0 30px;
    padding: 12px;
    border: 1px solid var(--guide-border);
    border-radius: 8px;
    background: #fff;
}

.guide-figure img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 4px;
}

.guide-figure figcaption {
    padding: 10px 4px 2px;
    color: var(--guide-muted);
    font-size: 13px;
}

.guide-role-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin: 22px 0;
}

.guide-role {
    padding: 18px;
    border: 1px solid var(--guide-border);
    border-radius: 6px;
}

.guide-role h3 {
    margin-top: 0;
}

.guide-faq {
    border-top: 1px solid var(--guide-border);
}

.guide-faq details {
    border-bottom: 1px solid var(--guide-border);
}

.guide-faq summary {
    position: relative;
    padding: 16px 34px 16px 0;
    cursor: pointer;
    font-weight: 650;
    list-style: none;
}

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

.guide-faq summary::after {
    position: absolute;
    top: 15px;
    right: 4px;
    content: "+";
    color: var(--guide-blue);
    font-size: 22px;
    font-weight: 400;
}

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

.guide-faq-answer {
    padding: 0 28px 14px 0;
    color: #455269;
}

.guide-empty {
    display: none;
    padding: 42px 20px;
    border: 1px dashed #bdc8d6;
    text-align: center;
    color: var(--guide-muted);
}

.guide-footer {
    border-top: 1px solid var(--guide-border);
    background: var(--guide-surface);
}

.guide-footer-inner {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    padding: 24px 0;
    color: var(--guide-muted);
    font-size: 13px;
}

@media (max-width: 991.98px) {
    .guide-header-inner,
    .guide-hero-inner,
    .guide-shell,
    .guide-footer-inner {
        width: min(100% - 32px, 880px);
    }

    .guide-mobile-nav {
        display: block;
    }

    .guide-shell {
        display: block;
        padding-top: 28px;
    }

    .guide-toc {
        display: none;
    }

    .guide-content {
        max-width: none;
    }

    .guide-flow {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    .guide-header {
        position: static;
    }

    .guide-header-inner {
        min-height: 64px;
    }

    .guide-brand span,
    .guide-header-actions .btn-outline-secondary {
        display: none;
    }

    .guide-brand img {
        width: 36px;
        height: 36px;
    }

    .guide-brand strong {
        font-size: 16px;
    }

    .guide-hero-inner {
        padding: 30px 0 28px;
    }

    .guide-hero h1 {
        font-size: 28px;
    }

    .guide-lead {
        font-size: 16px;
    }

    .guide-meta {
        display: grid;
        gap: 8px;
    }

    .guide-mobile-nav nav,
    .guide-flow,
    .guide-role-grid {
        grid-template-columns: 1fr;
    }

    .guide-shell {
        padding-bottom: 48px;
    }

    .guide-section {
        margin-bottom: 30px;
        padding-bottom: 32px;
    }

    .guide-section h2 {
        font-size: 23px;
    }

    .guide-flow-step {
        min-height: 0;
    }

    .guide-footer-inner {
        display: block;
    }
}

@media print {
    html {
        scroll-padding-top: 0;
    }

    body.guide-page {
        color: #000;
        background: #fff;
    }

    .guide-header,
    .guide-search-wrap,
    .guide-search-status,
    .guide-mobile-nav,
    .guide-toc,
    .guide-footer,
    .no-print {
        display: none !important;
    }

    .guide-hero {
        background: #fff;
    }

    .guide-hero-inner,
    .guide-shell {
        width: 100%;
    }

    .guide-hero-inner {
        padding: 0 0 24px;
    }

    .guide-shell {
        display: block;
        padding: 0;
    }

    .guide-content {
        max-width: none;
    }

    .guide-section {
        break-inside: auto;
    }

    .guide-figure,
    .guide-callout,
    .guide-table-wrap,
    .guide-role {
        break-inside: avoid;
    }

    .guide-faq details {
        display: block;
    }

    .guide-faq details > .guide-faq-answer {
        display: block !important;
    }
}
