:root {
    --guide-bg: #f5f7fb;
    --guide-surface: #ffffff;
    --guide-ink: #172033;
    --guide-muted: #617086;
    --guide-line: #dce2eb;
    --guide-purple: #6246ea;
    --guide-purple-soft: #eeeaff;
    --guide-green: #16856a;
    --guide-green-soft: #e4f6f0;
    --guide-amber: #a85f00;
    --guide-amber-soft: #fff3da;
    --guide-navy: #16213a;
    --guide-header: 68px;
    --guide-sidebar: 284px;
}

* {
    box-sizing: border-box;
}

html {
    max-width: 100%;
    overflow-x: hidden;
    scroll-behavior: smooth;
    scroll-padding-top: 92px;
}

body {
    max-width: 100%;
    margin: 0;
    overflow-x: hidden;
    color: var(--guide-ink);
    background: var(--guide-bg);
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.65;
}

body.guide-menu-open {
    overflow: hidden;
}

a {
    color: inherit;
}

button,
input {
    font: inherit;
}

.guide-header {
    position: sticky;
    z-index: 100;
    top: 0;
    display: grid;
    grid-template-columns: var(--guide-sidebar) minmax(260px, 720px) auto;
    align-items: center;
    min-height: var(--guide-header);
    padding: 10px 24px;
    border-bottom: 1px solid var(--guide-line);
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(12px);
}

.guide-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    width: fit-content;
    text-decoration: none;
}

.guide-brand img {
    width: 126px;
    height: 38px;
    object-fit: contain;
    object-position: left center;
}

.guide-brand span {
    padding-left: 12px;
    border-left: 1px solid var(--guide-line);
    color: var(--guide-muted);
    font-size: 13px;
    font-weight: 700;
}

.guide-search {
    position: relative;
    width: 100%;
}

.guide-search svg {
    position: absolute;
    top: 50%;
    left: 15px;
    width: 18px;
    height: 18px;
    color: var(--guide-muted);
    transform: translateY(-50%);
}

.guide-search input {
    width: 100%;
    height: 44px;
    padding: 0 48px 0 44px;
    color: var(--guide-ink);
    border: 1px solid var(--guide-line);
    border-radius: 7px;
    outline: none;
    background: #f8f9fc;
}

.guide-search input:focus {
    border-color: var(--guide-purple);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(98, 70, 234, .12);
}

.guide-search kbd {
    position: absolute;
    top: 50%;
    right: 11px;
    padding: 2px 7px;
    color: var(--guide-muted);
    border: 1px solid var(--guide-line);
    border-bottom-width: 2px;
    border-radius: 4px;
    background: #fff;
    font-size: 11px;
    transform: translateY(-50%);
}

.guide-header-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.guide-button,
.guide-icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 14px;
    color: var(--guide-ink);
    border: 1px solid var(--guide-line);
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
}

.guide-button:hover,
.guide-icon-button:hover {
    border-color: #aab5c5;
    background: #f7f8fb;
}

.guide-button svg,
.guide-icon-button svg {
    width: 18px;
    height: 18px;
}

.guide-icon-button {
    display: none;
    width: 42px;
    padding: 0;
}

.guide-layout {
    display: grid;
    grid-template-columns: var(--guide-sidebar) minmax(0, 1fr);
    min-height: calc(100vh - var(--guide-header));
}

.guide-sidebar {
    position: sticky;
    top: var(--guide-header);
    align-self: start;
    height: calc(100vh - var(--guide-header));
    padding: 22px 14px 34px;
    overflow-y: auto;
    border-right: 1px solid var(--guide-line);
    background: #fff;
}

.guide-sidebar-label {
    margin: 0 10px 8px;
    color: #7b8798;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

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

.guide-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 39px;
    padding: 8px 10px;
    color: #4e5b70;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}

.guide-nav a:hover {
    color: var(--guide-ink);
    background: #f4f6fa;
}

.guide-nav a.is-active {
    color: #4d35cb;
    background: var(--guide-purple-soft);
}

.guide-nav svg {
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
}

.guide-sidebar-note {
    margin: 22px 8px 0;
    padding: 14px;
    color: #365148;
    border: 1px solid #bfe3d7;
    border-radius: 7px;
    background: var(--guide-green-soft);
    font-size: 12px;
}

.guide-main {
    min-width: 0;
    padding: 42px clamp(24px, 5vw, 78px) 100px;
}

.guide-content {
    width: min(100%, 1060px);
    margin: 0 auto;
}

.guide-intro {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 270px;
    gap: 38px;
    align-items: end;
    margin-bottom: 34px;
    padding-bottom: 34px;
    border-bottom: 1px solid var(--guide-line);
}

.guide-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: var(--guide-green);
    font-size: 13px;
    font-weight: 800;
}

.guide-eyebrow::before {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--guide-green);
    content: "";
}

.guide-intro h1 {
    max-width: 780px;
    margin: 0 0 14px;
    color: var(--guide-navy);
    font-size: clamp(32px, 5vw, 48px);
    line-height: 1.12;
    letter-spacing: 0;
}

.guide-intro p {
    max-width: 760px;
    margin: 0;
    color: var(--guide-muted);
    font-size: 17px;
}

.guide-version {
    padding: 16px;
    border: 1px solid var(--guide-line);
    border-radius: 7px;
    background: #fff;
}

.guide-version strong,
.guide-version span {
    display: block;
}

.guide-version strong {
    margin-bottom: 4px;
    font-size: 14px;
}

.guide-version span {
    color: var(--guide-muted);
    font-size: 12px;
}

.guide-role-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin: 0 0 40px;
}

.guide-role-filter button {
    min-height: 36px;
    padding: 0 13px;
    color: #526075;
    border: 1px solid var(--guide-line);
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
}

.guide-role-filter button:hover,
.guide-role-filter button.is-active {
    color: #fff;
    border-color: var(--guide-purple);
    background: var(--guide-purple);
}

.guide-section {
    margin: 0 0 68px;
}

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

.guide-section-heading {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
    margin-bottom: 22px;
}

.guide-section-number {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    color: #4d35cb;
    border: 1px solid #d7d0ff;
    border-radius: 7px;
    background: var(--guide-purple-soft);
    font-size: 14px;
    font-weight: 800;
}

.guide-section h2 {
    margin: 0;
    color: var(--guide-navy);
    font-size: 28px;
    line-height: 1.25;
    letter-spacing: 0;
}

.guide-section-lead {
    margin: 5px 0 0;
    color: var(--guide-muted);
}

.guide-section h3 {
    margin: 34px 0 12px;
    color: var(--guide-navy);
    font-size: 20px;
    line-height: 1.35;
    letter-spacing: 0;
}

.guide-section h4 {
    margin: 24px 0 8px;
    font-size: 16px;
    letter-spacing: 0;
}

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

.guide-path {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    margin: 10px 0 18px;
    color: #4d35cb;
    font-size: 13px;
    font-weight: 800;
}

.guide-path span:not(:last-child)::after {
    margin-left: 6px;
    color: #9aa5b5;
    content: "/";
}

.guide-steps {
    margin: 16px 0 22px;
    padding: 0;
    counter-reset: guide-step;
    list-style: none;
}

.guide-steps li {
    position: relative;
    min-height: 38px;
    margin: 0 0 12px;
    padding: 4px 0 0 46px;
    counter-increment: guide-step;
}

.guide-steps li::before {
    position: absolute;
    top: 0;
    left: 0;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    color: #fff;
    border-radius: 50%;
    background: var(--guide-navy);
    content: counter(guide-step);
    font-size: 12px;
    font-weight: 800;
}

.guide-checklist {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 24px;
    margin: 14px 0 24px;
    padding: 0;
    list-style: none;
}

.guide-checklist li {
    position: relative;
    padding-left: 26px;
}

.guide-checklist li::before {
    position: absolute;
    top: 4px;
    left: 0;
    display: grid;
    place-items: center;
    width: 18px;
    height: 18px;
    color: var(--guide-green);
    border: 1px solid #8dcebb;
    border-radius: 50%;
    background: var(--guide-green-soft);
    content: "✓";
    font-size: 11px;
    font-weight: 900;
}

.guide-note {
    margin: 18px 0 24px;
    padding: 15px 17px;
    border-left: 4px solid var(--guide-purple);
    border-radius: 0 6px 6px 0;
    background: var(--guide-purple-soft);
}

.guide-note.is-warning {
    border-left-color: var(--guide-amber);
    background: var(--guide-amber-soft);
}

.guide-note strong {
    display: block;
    margin-bottom: 3px;
}

.guide-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin: 18px 0 26px;
}

.guide-task {
    padding: 17px;
    border: 1px solid var(--guide-line);
    border-radius: 7px;
    background: #fff;
}

.guide-task strong {
    display: block;
    margin-bottom: 5px;
    color: var(--guide-navy);
}

.guide-task p {
    margin: 0;
    color: var(--guide-muted);
    font-size: 14px;
}

.guide-role-map {
    width: 100%;
    margin: 16px 0 28px;
    border-collapse: collapse;
    border: 1px solid var(--guide-line);
    background: #fff;
    font-size: 14px;
}

.guide-role-map th,
.guide-role-map td {
    padding: 13px 15px;
    border-bottom: 1px solid var(--guide-line);
    text-align: left;
    vertical-align: top;
}

.guide-role-map th {
    color: #435067;
    background: #f1f4f8;
    font-size: 12px;
    text-transform: uppercase;
}

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

.guide-shot {
    margin: 24px 0 30px;
}

.guide-shot-button {
    display: block;
    width: 100%;
    padding: 0;
    overflow: hidden;
    border: 1px solid #cfd6e1;
    border-radius: 7px;
    background: #e9edf3;
    cursor: zoom-in;
    box-shadow: 0 12px 28px rgba(22, 33, 58, .08);
}

.guide-shot img {
    display: block;
    width: 100%;
    max-height: 660px;
    object-fit: cover;
    object-position: top;
}

.guide-shot figcaption {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 9px;
    color: var(--guide-muted);
    font-size: 12px;
}

.guide-shot figcaption strong {
    color: #3f4c61;
}

.guide-scenario {
    margin: 18px 0;
    border: 1px solid var(--guide-line);
    border-radius: 7px;
    background: #fff;
}

.guide-scenario summary {
    position: relative;
    padding: 17px 52px 17px 18px;
    cursor: pointer;
    list-style: none;
    font-weight: 800;
}

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

.guide-scenario summary::after {
    position: absolute;
    top: 50%;
    right: 18px;
    width: 9px;
    height: 9px;
    border-right: 2px solid #65738a;
    border-bottom: 2px solid #65738a;
    content: "";
    transform: translateY(-65%) rotate(45deg);
    transition: transform .2s ease;
}

.guide-scenario[open] summary::after {
    transform: translateY(-25%) rotate(225deg);
}

.guide-scenario-content {
    padding: 0 18px 18px;
    border-top: 1px solid var(--guide-line);
}

.guide-scenario-content .guide-steps {
    margin-bottom: 0;
}

.guide-empty-search {
    display: none;
    padding: 34px;
    text-align: center;
    border: 1px solid var(--guide-line);
    border-radius: 7px;
    background: #fff;
}

.guide-empty-search.is-visible {
    display: block;
}

.guide-lightbox {
    position: fixed;
    z-index: 300;
    inset: 0;
    display: none;
    place-items: center;
    padding: 28px;
    background: rgba(11, 16, 28, .92);
}

.guide-lightbox.is-open {
    display: grid;
}

.guide-lightbox img {
    max-width: min(1500px, 96vw);
    max-height: 88vh;
    border-radius: 6px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .45);
}

.guide-lightbox button {
    position: absolute;
    top: 18px;
    right: 18px;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .35);
    border-radius: 50%;
    background: rgba(0, 0, 0, .25);
    cursor: pointer;
    font-size: 24px;
}

.guide-backdrop {
    display: none;
}

.guide-footer {
    margin-top: 80px;
    padding-top: 26px;
    color: var(--guide-muted);
    border-top: 1px solid var(--guide-line);
    font-size: 13px;
}

mark {
    color: inherit;
    background: #fff0a8;
}

@media (max-width: 1040px) {
    .guide-header {
        grid-template-columns: auto minmax(220px, 1fr) auto;
        gap: 14px;
    }

    .guide-brand span,
    .guide-button span {
        display: none;
    }

    .guide-layout {
        grid-template-columns: 248px minmax(0, 1fr);
    }

    .guide-sidebar {
        width: 248px;
    }

    .guide-intro {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .guide-version {
        width: min(100%, 340px);
    }
}

@media (max-width: 760px) {
    :root {
        --guide-header: 122px;
    }

    .guide-header {
        grid-template-columns: 42px 1fr auto;
        gap: 10px;
        padding: 10px 14px;
    }

    .guide-icon-button {
        display: inline-flex;
    }

    .guide-brand {
        justify-self: center;
    }

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

    .guide-search {
        grid-column: 1 / -1;
        grid-row: 2;
    }

    .guide-search kbd {
        display: none;
    }

    .guide-layout {
        display: block;
    }

    .guide-sidebar {
        position: fixed;
        z-index: 210;
        top: 0;
        left: 0;
        width: min(86vw, 320px);
        height: 100vh;
        padding-top: 28px;
        transform: translateX(-105%);
        transition: transform .22s ease;
    }

    body.guide-menu-open .guide-sidebar {
        transform: translateX(0);
    }

    .guide-backdrop {
        position: fixed;
        z-index: 200;
        inset: 0;
        background: rgba(13, 19, 32, .52);
    }

    body.guide-menu-open .guide-backdrop {
        display: block;
    }

    .guide-main {
        width: 100%;
        min-width: 0;
        padding: 28px 17px 72px;
    }

    .guide-content,
    .guide-intro,
    .guide-intro > div {
        min-width: 0;
    }

    .guide-intro {
        margin-bottom: 26px;
        padding-bottom: 26px;
    }

    .guide-intro h1 {
        font-size: 34px;
        overflow-wrap: anywhere;
    }

    .guide-intro p {
        font-size: 15px;
    }

    .guide-role-filter {
        width: 100%;
        flex-wrap: nowrap;
        padding-bottom: 4px;
        overflow-x: auto;
    }

    .guide-role-filter button {
        flex: 0 0 auto;
    }

    .guide-section {
        margin-bottom: 54px;
    }

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

    .guide-grid,
    .guide-checklist {
        grid-template-columns: 1fr;
    }

    .guide-role-map {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .guide-shot figcaption {
        display: block;
    }

    .guide-shot figcaption span {
        display: block;
        margin-top: 4px;
    }
}

@media print {
    .guide-header,
    .guide-sidebar,
    .guide-role-filter,
    .guide-backdrop,
    .guide-lightbox {
        display: none !important;
    }

    .guide-layout {
        display: block;
    }

    .guide-main {
        padding: 0;
    }

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

    .guide-shot-button {
        box-shadow: none;
    }
}
