/* === Connecting Requirements: interactive wizard === */
.rq-wizard {
    margin: 2em 0 1em;
    font-family: inherit;
}

.rq-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 24px;
}
.rq-progress-step {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8em;
    font-weight: 700;
    background: #e9ecef;
    color: #868e96;
    border: 2px solid #e9ecef;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    flex-shrink: 0;
}
.rq-progress-step.is-active {
    background: #2596be;
    border-color: #2596be;
    color: #fff;
}
.rq-progress-step.is-done {
    background: #bde6ee;
    border-color: #32b1ca;
    color: #0c626f;
}
.rq-progress-line {
    width: 28px;
    height: 2px;
    background: #e9ecef;
    flex-shrink: 0;
}
.rq-progress-line.is-done { background: #32b1ca; }

.rq-card {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-top: 4px solid #2596be;
    border-radius: 10px;
    padding: 24px 26px;
    max-width: 640px;
    margin: 0 auto;
    animation: rq-fade-in 0.25s ease;
}
@keyframes rq-fade-in {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.rq-card-eyebrow {
    font-size: 0.78em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #2596be;
    margin: 0 0 8px;
}
.rq-card-question {
    font-size: 1.2em;
    font-weight: 700;
    color: #0c626f;
    margin: 0 0 8px;
}

.rq-card-description {
    font-size: 0.88em;
    color: #6c757d;
    line-height: 1.45;
    margin: 0 0 20px;
}

.rq-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.rq-option {
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
    background: #fff;
    border: 1.5px solid #dee2e6;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 0.95em;
    color: #333;
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease;
    font-family: inherit;
}
.rq-option:hover { border-color: #58b4cc; background: #f1fbfd; }
.rq-option.is-blocked {
    opacity: 0.5;
    cursor: not-allowed;
}
.rq-option.is-blocked:hover {
    border-color: #dee2e6;
    background: #fff;
}
.rq-option.is-selected {
    border-color: #2596be;
    background: #eaf6fb;
    color: #0c626f;
    font-weight: 600;
}
.rq-option-bullet {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid #ced4da;
    flex-shrink: 0;
    position: relative;
}
.rq-option.is-selected .rq-option-bullet {
    border-color: #2596be;
}
.rq-option.is-selected .rq-option-bullet::after {
    content: '';
    position: absolute;
    inset: 3px;
    border-radius: 50%;
    background: #2596be;
}

.rq-card-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
}
.rq-btn {
    font-family: inherit;
    font-size: 0.9em;
    font-weight: 600;
    border-radius: 20px;
    padding: 9px 20px;
    cursor: pointer;
    border: 1.5px solid transparent;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}
.rq-btn-primary { background: #2596be; color: #fff; }
.rq-btn-primary:hover { background: #1a7fa3; }
.rq-btn-primary:disabled { opacity: 0.45; cursor: not-allowed; }
.rq-btn-ghost { background: transparent; color: #6c757d; border-color: #dee2e6; }
.rq-btn-ghost:hover { border-color: #adb5bd; color: #495057; }
.rq-btn-ghost:disabled { opacity: 0; pointer-events: none; }

/* === Results: tree diagram === */
.rq-results {
    margin-top: 8px;
    animation: rq-fade-in 0.3s ease;
}
.rq-results-heading {
    text-align: center;
    margin-bottom: 6px !important;
}
.rq-results-subheading {
    text-align: center;
    color: #6c757d;
    font-size: 0.92em;
    margin-bottom: 28px !important;
}

.rq-tree { display: flex; flex-direction: column; align-items: center; }

.rq-tree-node {
    background: #fff;
    border: 1.5px solid #dee2e6;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 0.85em;
    text-align: center;
    max-width: 420px;
}
.rq-tree-node-q { color: #868e96; font-size: 0.85em; }
.rq-tree-node-a { color: #0c626f; font-weight: 700; }
.rq-tree-connector {
    width: 2px;
    height: 20px;
    background: #ced4da;
}

.rq-branch-wrap {
    position: relative;
    width: 100%;
    margin-top: 4px;
}
.rq-branch-svg {
    position: absolute;
    top: 0;
    left: 0;
    overflow: visible;
    pointer-events: none;
}
.rq-branch-stem {
    width: 2px;
    height: 20px;
    background: #ced4da;
    margin: 0 auto;
}
.rq-leaves {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 18px;
    padding-top: 22px;
}
.rq-leaf {
    background: #eaf6fb;
    border: 1.5px solid #58b4cc;
    border-radius: 10px;
    padding: 14px 18px;
    width: 220px;
    text-align: center;
}
.rq-leaf i {
    width: 24px;
    height: 24px;
    color: #2596be;
    margin-bottom: 6px;
}
.rq-leaf-title {
    font-weight: 700;
    color: #0c626f;
    font-size: 0.92em;
    line-height: 1.3;
}

@media (max-width: 640px) {
    .rq-branch-svg { display: none; }
    .rq-branch-stem { display: none; }
    .rq-leaves {
        flex-direction: column;
        align-items: stretch;
        padding-top: 8px;
        border-left: 2px solid #ced4da;
        margin-left: 14px;
        padding-left: 18px;
    }
    .rq-leaf { width: auto; }
}

/* === Results: checklist heading + download row === */
.rq-req-toolbar-label {
    font-weight: 700;
    color: #0c626f;
    font-size: 1em;
    margin: 34px 0 10px;
}
.rq-download-row { text-align: center; margin-top: 20px; }
.rq-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 26px;
    font-size: 0.95em;
}
.rq-download-btn i { width: 16px; height: 16px; }

/* === Results: requirements table (uses the site's default .markdown-container table style) === */
.rq-requirements {
    margin-top: 10px;
    overflow-x: auto;
}
.rq-requirements table td:first-child {
    white-space: normal;
}
/* Overrides the site's default "bold, nowrap first column" rule, which otherwise
   also matches the requirement cell in rowspan-merged rows (it becomes td:first-child
   there once the category cell is gone from the row). */
.rq-requirements td.rq-req-cell {
    font-weight: 400 !important;
    white-space: normal !important;
}
.rq-req-th-docs { width: 150px; }
.rq-req-docs { text-align: center !important; }
.rq-docs-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.88em;
    font-weight: 600;
    color: #2596be;
    text-decoration: none;
    white-space: nowrap;
}
.rq-docs-link:hover { color: #1a6d8f; text-decoration: underline; }
.rq-docs-link i { width: 14px; height: 14px; flex-shrink: 0; }

.rq-restart-row { text-align: center; margin-top: 28px; }

/* === Dark mode === */
body.dark-mode .rq-progress-step { background: #2a2a2a; border-color: #2a2a2a; color: #777; }
body.dark-mode .rq-progress-step.is-active { background: #2596be; border-color: #2596be; color: #fff; }
body.dark-mode .rq-progress-step.is-done { background: #1e4a5c; border-color: #32b1ca; color: #bde6ee; }
body.dark-mode .rq-progress-line { background: #2a2a2a; }
body.dark-mode .rq-progress-line.is-done { background: #32b1ca; }

body.dark-mode .rq-card { background: #2a2a2a; border-color: #444; border-top-color: #58b4cc; }
body.dark-mode .rq-card-question { color: #58b4cc; }
body.dark-mode .rq-card-description { color: #9aa4ab; }
body.dark-mode .rq-option { background: #1e1e1e; border-color: #444; color: #d4d4d4; }
body.dark-mode .rq-option:hover { border-color: #58b4cc; background: #22343a; }
body.dark-mode .rq-option.is-selected { background: #1e4a5c; border-color: #58b4cc; color: #bde6ee; }
body.dark-mode .rq-option.is-blocked:hover { border-color: #444; background: #1e1e1e; }
body.dark-mode .rq-option-bullet { border-color: #555; }

body.dark-mode .rq-btn-ghost { color: #adb5bd; border-color: #444; }
body.dark-mode .rq-btn-ghost:hover { border-color: #666; color: #d4d4d4; }

body.dark-mode .rq-results-subheading { color: #9aa4ab; }
body.dark-mode .rq-docs-link { color: #58b4cc; }
body.dark-mode .rq-docs-link:hover { color: #7dc8da; }
body.dark-mode .rq-req-toolbar-label { color: #58b4cc; }
body.dark-mode .rq-tree-node { background: #1e1e1e; border-color: #444; }
body.dark-mode .rq-tree-node-q { color: #868e96; }
body.dark-mode .rq-tree-node-a { color: #58b4cc; }
body.dark-mode .rq-tree-connector,
body.dark-mode .rq-branch-stem { background: #444; }
body.dark-mode .rq-leaves { border-left-color: #444; }
body.dark-mode .rq-leaf { background: #1e4a5c; border-color: #32b1ca; }
body.dark-mode .rq-leaf-title { color: #bde6ee; }

body.dark-mode .rq-warning { background: #3a2f10; border-color: #6b5216; color: #f0c36d; }
