.guide-main {
    overflow-y: auto;
    padding: 0;
}

.guide-content {
    max-width: 700px;
    margin: 0 auto;
    padding: 32px 24px 64px;
}

/* OS toggle — small, discrete segmented control (sits in the step header) */
.guide-os-toggle {
    display: inline-flex;
    background: #313244;
    border: 1px solid #45475a;
    border-radius: 5px;
    padding: 1px;
    flex-shrink: 0;
    margin-left: auto;
    align-self: flex-start;
    margin-top: 2px;
}

.guide-os-opt {
    background: transparent;
    border: none;
    color: #6c7086;
    font-family: inherit;
    font-size: 11px;
    font-weight: 500;
    padding: 3px 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.guide-os-opt:hover {
    color: #a6adc8;
}

.guide-os-opt.active {
    background: #45475a;
    color: #cdd6f4;
}

/* OS-scoped content swap — inline spans inside code blocks */
html[data-os="linux"] .os-mac:not(.guide-callout),
html[data-os="mac"] .os-linux:not(.guide-callout) {
    display: none;
}

/* OS-scoped callouts animate instead of snapping */
.guide-callout.os-mac,
.guide-callout.os-linux {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    margin-top: 0;
    padding-top: 0;
    padding-bottom: 0;
    border-left-width: 0;
    transition: max-height 0.32s ease, opacity 0.25s ease 0.05s,
                margin-top 0.32s ease, padding-top 0.32s ease, padding-bottom 0.32s ease,
                border-left-width 0.32s ease;
}

html[data-os="mac"] .guide-callout.os-mac,
html[data-os="linux"] .guide-callout.os-linux {
    max-height: 240px;
    opacity: 1;
    margin-top: 12px;
    padding-top: 10px;
    padding-bottom: 10px;
    border-left-width: 3px;
}

/* Page title */
.guide-title {
    font-size: 24px;
    color: #cdd6f4;
    font-weight: 700;
    margin-bottom: 8px;
}

.guide-subtitle {
    font-size: 14px;
    color: #a6adc8;
    line-height: 1.6;
    margin-bottom: 20px;
}

/* Steps */
.guide-step {
    padding: 28px 0;
}

.guide-step + .guide-step {
    border-top: 1px solid #313244;
}

.guide-step-header {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    margin-bottom: 16px;
}

.guide-step-num {
    background: #89b4fa;
    color: #1e1e2e;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 2px;
}

.guide-step-header h2 {
    font-size: 18px;
    color: #cdd6f4;
    font-weight: 700;
    margin-bottom: 4px;
}

.guide-step-header p {
    font-size: 14px;
    color: #a6adc8;
    line-height: 1.5;
}

.guide-step-header a {
    color: #89b4fa;
}

.guide-step-header code {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 12px;
    color: #a6e3a1;
    background: #313244;
    padding: 1px 5px;
    border-radius: 3px;
}

/* Code cards */
.guide-card {
    background: #181825;
    border: 1px solid #313244;
    border-radius: 8px;
    overflow: hidden;
}

.guide-card-label {
    padding: 6px 14px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #585b70;
    background: #11111b;
    border-bottom: 1px solid #313244;
}

.guide-code {
    padding: 14px;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 12px;
    line-height: 1.7;
    color: #cdd6f4;
    margin: 0;
    overflow-x: auto;
}

.guide-code .c { color: #6c7086; }
.guide-code .k { color: #cba6f7; }
.guide-code .fn { color: #a6e3a1; }
.guide-code .s { color: #f9e2af; }

/* Side-by-side cards */
.guide-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* CLI reference table */
.guide-cli-ref {
    margin-top: 12px;
    background: #181825;
    border: 1px solid #313244;
    border-radius: 8px;
    overflow: hidden;
}

.guide-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.guide-table td {
    padding: 5px 14px;
    color: #a6adc8;
    border-bottom: 1px solid #1e1e2e;
}

.guide-table td:first-child,
.guide-table td:nth-child(2) {
    white-space: nowrap;
}

.guide-table td code {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 11px;
    color: #cba6f7;
}

.guide-table td:first-child code {
    color: #89b4fa;
}

/* Note */
.guide-note {
    font-size: 12px;
    color: #585b70;
    margin-top: 10px;
    font-style: italic;
}

/* What's next cards */
.guide-next {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.guide-next-card {
    display: block;
    background: #181825;
    border: 1px solid #313244;
    border-radius: 8px;
    padding: 16px;
    text-decoration: none;
    transition: border-color 0.15s, background 0.15s;
}

.guide-next-card:hover {
    border-color: #89b4fa;
    background: rgba(137, 180, 250, 0.04);
}

.guide-next-card strong {
    display: block;
    font-size: 14px;
    color: #cdd6f4;
    margin-bottom: 4px;
}

.guide-next-card span {
    font-size: 12px;
    color: #6c7086;
}

/* Layer badge */
.guide-layer {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #89b4fa;
    background: rgba(137, 180, 250, 0.08);
    border: 1px solid rgba(137, 180, 250, 0.15);
    padding: 2px 10px;
    border-radius: 999px;
    margin-bottom: 10px;
}

/* Callout after code blocks */
.guide-callout {
    font-size: 13px;
    color: #a6adc8;
    line-height: 1.6;
    margin-top: 12px;
    padding: 10px 14px;
    background: rgba(137, 180, 250, 0.04);
    border-left: 3px solid #313244;
    border-radius: 0 6px 6px 0;
}

.guide-callout strong {
    color: #cdd6f4;
}

.guide-callout code {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 11px;
    color: #a6e3a1;
}

/* Wrap the table */
.guide-table-wrap {
    overflow-x: auto;
}

/* Architecture overview */
.guide-arch {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

.guide-arch-layer {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    max-width: 400px;
    padding: 12px 16px;
    background: #181825;
    border: 1px solid #313244;
    border-left: 3px solid;
    border-radius: 6px;
}

.guide-arch-num {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: #1e1e2e;
    flex-shrink: 0;
}

.guide-arch-layer strong {
    display: block;
    font-size: 13px;
    margin-bottom: 1px;
}

.guide-arch-layer span {
    font-size: 11px;
    color: #6c7086;
}

.guide-arch-layer code {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 10px;
    color: #a6e3a1;
}

.guide-arch-arrow {
    color: #45475a;
    font-size: 14px;
    padding: 2px 0;
}

/* Copy button on code blocks */
.guide-card-wrap {
    position: relative;
}

.guide-copy-btn {
    position: absolute;
    top: 4px;
    right: 6px;
    background: #313244;
    color: #6c7086;
    border: 1px solid #45475a;
    border-radius: 4px;
    padding: 2px 8px;
    font-size: 10px;
    font-weight: 500;
    line-height: 1.4;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s, color 0.15s;
    z-index: 1;
}

.guide-copy-btn:hover {
    background: #45475a;
    color: #cdd6f4;
}

.guide-copy-btn.copied {
    background: rgba(166, 227, 161, 0.15);
    color: #a6e3a1;
    border-color: rgba(166, 227, 161, 0.3);
}
