/* Confidential Banner */
body {
    overflow-x: hidden;
}

.confidential-banner {
    background: #1e3a8a;
    border-radius: 6px;
    padding: 10px 16px;
    max-width: 900px;
    margin: 50px auto 24px auto;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Guide Header */
.guide-header {
    max-width: 900px;
    margin: 0 auto 40px auto;
}

.guide-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.guide-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.guide-meta {
    display: flex;
    gap: 12px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.guide-tag {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: #dbeafe;
    color: #1e40af;
}

.guide-tag.version {
    background: #f1f5f9;
    color: #475569;
}

/* Content Sections */
.guide-content {
    max-width: 900px;
    margin: 0 auto;
    line-height: 1.7;
}

.guide-content p {
    margin-bottom: 12px;
    color: var(--text-primary);
}

.guide-content h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 40px 0 16px 0;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.guide-content h2:first-of-type {
    border-top: none;
    padding-top: 0;
    margin-top: 0;
}

.guide-content h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 24px 0 8px 0;
}

.guide-content h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 16px 0 8px 0;
}

.guide-content ul, .guide-content ol {
    margin: 8px 0;
    padding-left: 24px;
}

.guide-content li {
    margin-bottom: 4px;
}

.auth-copy {
    margin: 20px 0;
}

.auth-copy-muted,
.source-note,
.footer-note,
.comments-empty-help {
    color: var(--text-secondary);
}

.executive-summary,
.access-summary,
.source-freshness {
    border-bottom: 1px solid var(--border-color);
    border-top: 1px solid var(--border-color);
    margin: 24px 0;
    padding: 20px 0;
}

.executive-summary h2 {
    border-top: none;
    margin-top: 0;
    padding-top: 0;
}

.access-summary,
.decision-path {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.access-label,
.source-label {
    color: var(--transcend-blue);
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.decision-path {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: 24px 0;
}

.decision-step {
    border-top: 3px solid var(--transcend-blue);
    padding-top: 12px;
}

.decision-step strong {
    display: block;
    margin-bottom: 6px;
}

.source-note,
.footer-note,
.comments-empty-help {
    margin-top: 8px;
}

.source-note {
    font-size: 0.85rem;
    margin-top: 24px;
}

.comments-empty-help {
    font-size: 12px;
}

/* Code blocks */
.guide-content code {
    background: var(--bg-primary);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'SF Mono', Monaco, monospace;
    font-size: 0.9em;
}

.guide-content pre {
    background: #1a1a2e;
    color: #e0e0e0;
    padding: 16px;
    border-radius: 8px;
    overflow-x: auto;
    max-width: 100%;
    margin: 12px 0;
    font-family: 'SF Mono', Monaco, monospace;
    font-size: 0.85rem;
    line-height: 1.6;
}

.guide-content pre code {
    background: none;
    display: block;
    padding: 0;
    color: inherit;
}

/* Key Concept Box */
.key-concept {
    background: var(--bg-secondary);
    border-left: 4px solid var(--transcend-blue);
    border-radius: 6px;
    padding: 16px 20px;
    margin: 16px 0;
}

.key-concept h3 {
    margin: 0 0 8px 0;
    color: var(--text-primary);
}

.key-concept p {
    margin: 0;
    color: var(--text-secondary);
}

.key-concept p + p {
    margin-top: 8px;
}

/* Callout boxes */
.callout {
    padding: 16px 20px;
    border-radius: 6px;
    margin: 16px 0;
}

.callout p {
    margin: 0;
}

.callout p + p {
    margin-top: 8px;
}

.callout-info {
    background: #eff6ff;
    border-left: 4px solid var(--transcend-blue);
}

.callout-warning {
    background: #fffbeb;
    border-left: 4px solid #f59e0b;
}

.callout-success {
    background: #f0fdf4;
    border-left: 4px solid var(--metric-green);
}

/* Warning Box */
.warning-box {
    background: #fff0f0;
    border: 1px solid #ffcccc;
    border-radius: 6px;
    padding: 16px 20px;
    margin: 16px 0;
}

.warning-box h3 {
    color: #8b2d2d;
    margin: 0 0 12px 0;
}

.warning-box p {
    margin: 0 0 8px 0;
}

.warning-box p:last-child {
    margin-bottom: 0;
}

/* Tables — mobile-safe scrolling */
.guide-section {
    overflow-x: auto;
}

.guide-table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    overflow: hidden;
    min-width: 500px;
}

.guide-table th {
    background: var(--bg-secondary);
    padding: 8px 12px;
    text-align: left;
    font-size: 0.85rem;
    font-weight: 600;
}

.guide-table td {
    padding: 8px 12px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
}

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

.guide-table .category {
    color: var(--transcend-blue);
    font-weight: 600;
}

/* Do/Don't */
.do-dont {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 16px 0;
}

.do-box {
    background: #e8f4e8;
    border-radius: 6px;
    padding: 16px 20px;
}

.do-box h4 {
    color: #2d5a2d;
    margin: 0 0 12px 0;
}

.dont-box {
    background: #fff5f5;
    border-radius: 6px;
    padding: 16px 20px;
}

.dont-box h4 {
    color: #8b2d2d;
    margin: 0 0 12px 0;
}

.do-dont ul {
    margin: 0;
    padding-left: 20px;
    font-size: 0.9rem;
}

.do-dont li {
    margin-bottom: 4px;
}

/* Method boxes */
.method-box {
    border-radius: 8px;
    padding: 16px 20px;
    margin: 12px 0;
}

.method-box h3 {
    margin: 0 0 8px 0;
}

.method-box p {
    margin: 0;
}

.method-box.green { background: #e8f4e8; }
.method-box.blue { background: #e8f0f8; }
.method-box.amber { background: #fff8e8; }
.method-box.purple { background: #f5f0ff; }

/* Diagnostic Flow Steps */
.diagnostic-flow {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 16px 0;
}

.diagnostic-step {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: white;
    border: 1px solid var(--border-color);
    position: relative;
    margin-bottom: 0;
}

.diagnostic-step:first-child {
    border-radius: 8px 8px 0 0;
}

.diagnostic-step:last-child {
    border-radius: 0 0 8px 8px;
}

.diagnostic-step:not(:first-child) {
    border-top: none;
}

.step-number {
    width: 32px;
    height: 32px;
    min-width: 32px;
    background: var(--transcend-blue);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    flex-shrink: 0;
    font-size: 14px;
}

.step-content h4 {
    margin: 0 0 4px 0;
    color: var(--text-primary);
}

.step-content p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.diagnostic-step:not(:last-child)::after {
    content: '\2193';
    position: absolute;
    left: 36px;
    transform: translateX(-50%);
    bottom: -14px;
    width: 28px;
    height: 28px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    color: var(--transcend-blue);
    font-weight: bold;
    font-size: 16px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* Action Items */
.action-items {
    background: var(--bg-secondary);
    border-radius: 8px;
    padding: 20px;
    margin: 24px 0;
}

.action-items h2 {
    margin: 0 0 16px 0 !important;
    padding: 0 !important;
    border: none !important;
}

.action-items ol {
    margin: 0;
    padding-left: 24px;
}

.action-items li {
    margin-bottom: 8px;
    line-height: 1.6;
}

/* Case Study */
.case-study {
    background: #fffbeb;
    border: 2px solid #fbbf24;
    border-radius: 8px;
    padding: 20px;
    margin: 16px 0;
}

.case-study h3 {
    color: #92400e;
    margin: 0 0 12px 0;
}

.case-study p {
    margin: 0 0 8px 0;
}

/* Metric Boxes */
.metric-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 16px 0;
}

.metric-box {
    border-radius: 8px;
    padding: 16px 20px;
}

.metric-box h3 {
    margin: 0 0 8px 0;
}

.metric-box p {
    margin: 4px 0 0 0;
    font-size: 0.9rem;
}

.metric-box.leading {
    background: #ecfdf5;
    border: 2px solid #10b981;
}

.metric-box.leading h3 { color: #065f46; }

.metric-box.lagging {
    background: #fef3c7;
    border: 2px solid #f59e0b;
}

.metric-box.lagging h3 { color: #92400e; }

/* Responsive */
@media (max-width: 768px) {
    .guide-header h1 {
        font-size: 1.5rem;
    }

    .access-summary,
    .decision-path,
    .metric-row, .do-dont {
        grid-template-columns: 1fr;
    }

    .diagnostic-step:not(:last-child)::after {
        display: none;
    }

    .diagnostic-step:not(:first-child) {
        border-top: 2px solid var(--border-color);
    }

    .guide-table {
        min-width: 0;
        table-layout: auto;
        width: 100%;
    }

    .guide-table th,
    .guide-table td {
        font-size: 0.76rem;
        overflow-wrap: anywhere;
        padding: 7px 8px;
    }

    .guide-content pre code {
        white-space: pre-wrap;
        overflow-wrap: anywhere;
    }
}
