.guide-page {
    --guide-bg: #f5efe6;
    --guide-paper: #fffdf8;
    --guide-paper-strong: #ffffff;
    --guide-ink: #1f2b25;
    --guide-muted: #5b6a62;
    --guide-border: rgba(31, 43, 37, 0.12);
    --guide-accent: #0f766e;
    --guide-accent-strong: #115e59;
    --guide-warm: #b45309;
    --guide-shadow: 0 24px 60px rgba(30, 41, 59, 0.12);
    background:
        radial-gradient(circle at top right, rgba(15, 118, 110, 0.14), transparent 28%),
        radial-gradient(circle at left 10%, rgba(180, 83, 9, 0.12), transparent 24%),
        linear-gradient(180deg, #f8f4ec 0%, #f4ede3 100%);
    color: var(--guide-ink);
    min-height: calc(100vh - 72px);
}

.guide-page,
.guide-page p,
.guide-page li,
.guide-page a,
.guide-page button,
.guide-page input {
    font-family: "Trebuchet MS", "Segoe UI", sans-serif;
}

.guide-page h1,
.guide-page h2,
.guide-page h3 {
    font-family: Georgia, "Times New Roman", serif;
    letter-spacing: -0.02em;
}

.guide-hero {
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(255, 251, 243, 0.92)),
        linear-gradient(135deg, rgba(15, 118, 110, 0.1), rgba(180, 83, 9, 0.06));
    border: 1px solid rgba(15, 118, 110, 0.14);
    border-radius: 28px;
    box-shadow: var(--guide-shadow);
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.guide-hero::after {
    content: "";
    position: absolute;
    right: -70px;
    top: -70px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(15, 118, 110, 0.16), rgba(15, 118, 110, 0));
    pointer-events: none;
}

.guide-hero-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.95fr);
    align-items: start;
    position: relative;
    z-index: 1;
}

.guide-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(15, 118, 110, 0.1);
    color: var(--guide-accent-strong);
    border-radius: 999px;
    padding: 0.45rem 0.85rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.guide-hero h1 {
    font-size: clamp(2rem, 3vw, 3.25rem);
    line-height: 1.08;
    margin: 1rem 0 0.9rem;
    max-width: 15ch;
}

.guide-hero p {
    color: var(--guide-muted);
    font-size: 1.03rem;
    line-height: 1.75;
    margin-bottom: 0;
    max-width: 70ch;
}

.guide-stat-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.4rem;
}

.guide-stat {
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(15, 118, 110, 0.12);
    border-radius: 18px;
    padding: 0.85rem 1rem;
    min-width: 150px;
}

.guide-stat strong {
    display: block;
    font-size: 1.25rem;
    color: var(--guide-ink);
}

.guide-stat span {
    color: var(--guide-muted);
    font-size: 0.88rem;
}

.guide-search-panel {
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid var(--guide-border);
    border-radius: 24px;
    padding: 1.35rem;
    box-shadow: 0 18px 36px rgba(30, 41, 59, 0.08);
    backdrop-filter: blur(16px);
}

.guide-search-label {
    display: block;
    font-weight: 700;
    font-size: 0.96rem;
    margin-bottom: 0.65rem;
}

.guide-search-field {
    position: relative;
}

.guide-search-field i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--guide-muted);
}

.guide-search-input {
    width: 100%;
    min-height: 56px;
    border-radius: 18px;
    border: 1px solid rgba(15, 118, 110, 0.18);
    background: #fff;
    color: var(--guide-ink);
    padding: 0.95rem 4.9rem 0.95rem 2.85rem;
    font-size: 0.98rem;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.05);
}

.guide-search-input:focus {
    border-color: rgba(15, 118, 110, 0.4);
    box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.12);
    outline: none;
}

.guide-search-clear {
    position: absolute;
    right: 0.6rem;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: rgba(15, 118, 110, 0.1);
    color: var(--guide-accent-strong);
    border-radius: 999px;
    padding: 0.5rem 0.8rem;
    font-size: 0.82rem;
    font-weight: 700;
}

.guide-search-meta {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 0.8rem;
    color: var(--guide-muted);
    font-size: 0.83rem;
}

.guide-quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 1rem;
}

.guide-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 0.85rem;
    border-radius: 999px;
    border: 1px solid rgba(15, 118, 110, 0.14);
    background: rgba(255, 255, 255, 0.95);
    color: var(--guide-ink);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.guide-chip:hover,
.guide-chip:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 10px 18px rgba(15, 23, 42, 0.08);
    border-color: rgba(15, 118, 110, 0.28);
    color: var(--guide-accent-strong);
}

.guide-layout {
    display: grid;
    grid-template-columns: minmax(250px, 285px) minmax(0, 1fr);
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.guide-sidebar {
    position: sticky;
    top: 96px;
    align-self: start;
}

.guide-sidebar-card {
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid var(--guide-border);
    border-radius: 22px;
    box-shadow: 0 18px 34px rgba(15, 23, 42, 0.07);
    padding: 1.2rem;
}

.guide-sidebar-card + .guide-sidebar-card {
    margin-top: 1rem;
}

.guide-sidebar h2,
.guide-sidebar h3 {
    font-size: 1.15rem;
    margin-bottom: 0.75rem;
}

.guide-sidebar p,
.guide-sidebar li {
    color: var(--guide-muted);
    font-size: 0.92rem;
    line-height: 1.65;
}

.guide-sidebar ul {
    margin: 0;
    padding-left: 1.1rem;
}

.guide-toc {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.guide-toc-link {
    display: block;
    padding: 0.65rem 0.8rem;
    border-radius: 14px;
    color: var(--guide-muted);
    font-size: 0.93rem;
    font-weight: 600;
    line-height: 1.35;
    text-decoration: none;
    transition: background-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.guide-toc-link:hover,
.guide-toc-link:focus-visible,
.guide-toc-link.is-active {
    background: rgba(15, 118, 110, 0.1);
    color: var(--guide-accent-strong);
    transform: translateX(2px);
}

.guide-toc-link.is-hidden {
    display: none;
}

.guide-content {
    display: grid;
    gap: 1rem;
}

.guide-section {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 251, 246, 0.97));
    border: 1px solid var(--guide-border);
    border-radius: 26px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.07);
    padding: 1.6rem;
    scroll-margin-top: 110px;
}

.guide-section[hidden] {
    display: none;
}

.guide-section-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: start;
    margin-bottom: 1.15rem;
}

.guide-section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--guide-accent-strong);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.guide-section h2 {
    font-size: clamp(1.55rem, 2vw, 2rem);
    margin: 0.45rem 0 0.6rem;
}

.guide-section-intro {
    color: var(--guide-muted);
    font-size: 0.98rem;
    line-height: 1.8;
    max-width: 75ch;
    margin: 0;
}

.guide-section-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.guide-open-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    border-radius: 999px;
    border: 1px solid rgba(15, 118, 110, 0.18);
    background: rgba(15, 118, 110, 0.08);
    color: var(--guide-accent-strong);
    padding: 0.65rem 0.9rem;
    font-size: 0.86rem;
    font-weight: 700;
    text-decoration: none;
}

.guide-open-link:hover,
.guide-open-link:focus-visible {
    color: #ffffff;
    background: var(--guide-accent);
    border-color: var(--guide-accent);
}

.guide-detail-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(12, minmax(0, 1fr));
}

.guide-card {
    grid-column: span 6;
    background: var(--guide-paper-strong);
    border: 1px solid rgba(15, 118, 110, 0.1);
    border-radius: 22px;
    padding: 1.15rem;
}

.guide-card--wide {
    grid-column: span 12;
}

.guide-card h3 {
    font-size: 1.12rem;
    margin-bottom: 0.7rem;
}

.guide-card p,
.guide-card li {
    color: var(--guide-muted);
    font-size: 0.95rem;
    line-height: 1.75;
}

.guide-card p:last-child,
.guide-card ul:last-child,
.guide-card ol:last-child {
    margin-bottom: 0;
}

.guide-list,
.guide-steps {
    margin: 0.8rem 0 0;
    padding-left: 1.15rem;
}

.guide-list li + li,
.guide-steps li + li {
    margin-top: 0.45rem;
}

.guide-callout {
    margin-top: 1rem;
    border-radius: 18px;
    border: 1px solid rgba(180, 83, 9, 0.16);
    background: rgba(255, 247, 237, 0.9);
    padding: 0.95rem 1rem;
}

.guide-callout strong {
    display: block;
    color: #92400e;
    margin-bottom: 0.3rem;
}

.guide-callout p {
    margin: 0;
    color: #8a5a20;
}

.guide-anchor-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 0.9rem;
}

.guide-anchor-links a {
    color: var(--guide-accent-strong);
    font-weight: 700;
    text-decoration: none;
}

.guide-anchor-links a:hover,
.guide-anchor-links a:focus-visible {
    color: var(--guide-warm);
}

.guide-empty {
    background: rgba(255, 255, 255, 0.92);
    border: 1px dashed rgba(15, 118, 110, 0.22);
    border-radius: 24px;
    padding: 2.5rem 1.5rem;
    text-align: center;
    color: var(--guide-muted);
}

.guide-empty i {
    color: var(--guide-accent);
    font-size: 2rem;
    margin-bottom: 0.9rem;
}

@media (max-width: 1199.98px) {
    .guide-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .guide-sidebar {
        position: static;
    }
}

@media (max-width: 991.98px) {
    .guide-hero-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .guide-section-header {
        flex-direction: column;
    }

    .guide-card {
        grid-column: span 12;
    }
}

@media (max-width: 767.98px) {
    .guide-page {
        min-height: auto;
    }

    .guide-hero,
    .guide-section,
    .guide-sidebar-card {
        border-radius: 22px;
    }

    .guide-hero {
        padding: 1.4rem;
    }

    .guide-section {
        padding: 1.2rem;
    }

    .guide-search-meta {
        flex-direction: column;
    }

    .guide-stat-row {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .guide-stat {
        min-width: 0;
    }
}

@media (max-width: 575.98px) {
    .guide-stat-row {
        grid-template-columns: minmax(0, 1fr);
    }

    .guide-open-link {
        width: 100%;
        justify-content: center;
    }
}

body.page-guide {
    background: #08090b;
}

.guide-page {
    --guide-bg: #08090b;
    --guide-paper: rgba(18, 20, 24, 0.92);
    --guide-paper-strong: rgba(23, 26, 31, 0.96);
    --guide-ink: #f8fafc;
    --guide-muted: #aeb4bd;
    --guide-border: rgba(255, 255, 255, 0.1);
    --guide-accent: #d8dde4;
    --guide-accent-strong: #f8fafc;
    --guide-warm: #aeb4bd;
    --guide-shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
    background:
        linear-gradient(180deg, rgba(8, 9, 11, 0.98), rgba(14, 17, 22, 0.98)),
        #08090b;
    color: var(--guide-ink);
}

.guide-page,
.guide-page p,
.guide-page li,
.guide-page a,
.guide-page button,
.guide-page input,
.guide-page h1,
.guide-page h2,
.guide-page h3 {
    font-family: "Inter", "Segoe UI", sans-serif;
    letter-spacing: 0;
}

.guide-hero,
.guide-search-panel,
.guide-sidebar-card,
.guide-section,
.guide-card,
.guide-empty {
    background: linear-gradient(180deg, rgba(24, 27, 32, 0.96), rgba(14, 16, 20, 0.96));
    border-color: var(--guide-border);
    box-shadow: var(--guide-shadow);
}

.guide-hero {
    border-radius: 22px;
}

.guide-hero::after {
    display: none;
}

.guide-eyebrow,
.guide-section-kicker {
    background: rgba(255, 255, 255, 0.08);
    color: #f8fafc;
}

.guide-hero h1,
.guide-section h2,
.guide-card h3,
.guide-sidebar h2,
.guide-sidebar h3,
.guide-search-label,
.guide-stat strong {
    color: #ffffff;
}

.guide-hero p,
.guide-section-intro,
.guide-card p,
.guide-card li,
.guide-sidebar p,
.guide-sidebar li,
.guide-stat span,
.guide-search-meta,
.guide-empty {
    color: var(--guide-muted);
}

.guide-stat,
.guide-search-input,
.guide-chip {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
    color: #f8fafc !important;
}

.guide-search-input::placeholder {
    color: rgba(248, 250, 252, 0.48);
}

.guide-search-input:focus {
    border-color: rgba(248, 250, 252, 0.32);
    box-shadow: 0 0 0 4px rgba(248, 250, 252, 0.08);
}

.guide-search-clear,
.guide-open-link {
    background: rgba(248, 250, 252, 0.1);
    border-color: rgba(248, 250, 252, 0.14);
    color: #f8fafc !important;
}

.guide-open-link:hover,
.guide-open-link:focus-visible,
.guide-chip:hover,
.guide-chip:focus-visible {
    background: rgba(248, 250, 252, 0.16);
    border-color: rgba(248, 250, 252, 0.28);
    color: #ffffff !important;
}

.guide-toc-link,
.guide-anchor-links a {
    color: var(--guide-muted) !important;
}

.guide-toc-link:hover,
.guide-toc-link:focus-visible,
.guide-toc-link.is-active,
.guide-anchor-links a:hover,
.guide-anchor-links a:focus-visible {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff !important;
}

.guide-card {
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.guide-card:hover,
.guide-section:target {
    border-color: rgba(248, 250, 252, 0.22);
    box-shadow: 0 24px 52px rgba(0, 0, 0, 0.42);
}

.guide-card:hover {
    transform: translateY(-2px);
}

.guide-callout {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.14);
}

.guide-callout strong,
.guide-callout p {
    color: #e8edf3;
}

.guide-xblivian-mark {
    width: 1rem !important;
    height: 1rem !important;
    flex-shrink: 0;
    color: currentColor !important;
}

body.page-guide .site-footer {
    margin-top: 0 !important;
}
