:root {
    --rq-primary: #2563eb;
    --rq-primary-dark: #1d4ed8;
    --rq-primary-soft: #eef4ff;
    --rq-primary-border: #bfdbfe;

    --rq-bg: #f6f8fb;
    --rq-surface: #ffffff;
    --rq-surface-soft: #fbfcfe;

    --rq-text: #1f2937;
    --rq-text-strong: #161b26;
    --rq-muted: #6b7280;
    --rq-muted-light: #8991a3;

    --rq-border: #e5e7eb;
    --rq-border-strong: #d1d5db;

    --rq-success: #1f9d63;

    /* Compatibility with existing page/SVG references */
    --primary: var(--rq-primary);
    --muted: var(--rq-muted);
    --border: var(--rq-border);
}

/* =========================================================
   Base
   ========================================================= */

body {
    background: var(--rq-bg);
    color: var(--rq-text);
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

code,
pre,
.small-title,
.role,
.summary-label,
.badge-changed-text,
.runtime-meta,
.test-status,
.test-caption,
.exec-meta,
.verdict-label,
.verdict-caption {
    font-family: "JetBrains Mono", monospace;
}

h5 {
    font-weight: 600;
}

ul li {
    margin-bottom: .5rem;
}

/* =========================================================
   Navbar
   ========================================================= */

.navbar {
    background: rgba(255, 255, 255, .96);
    border-bottom: 1px solid var(--rq-border);
}

.navbar .nav-link {
    color: var(--rq-text);
}

.navbar .nav-link.active {
    font-weight: 600;
    color: var(--rq-primary) !important;
    border-bottom: 2px solid var(--rq-primary);
    padding-bottom: 4px;
}

.navbar .nav-link:hover {
    color: var(--rq-primary) !important;
}

/* =========================================================
   Bootstrap Brand Overrides
   ========================================================= */

.btn-primary {
    --bs-btn-bg: var(--rq-primary);
    --bs-btn-border-color: var(--rq-primary);
    --bs-btn-hover-bg: var(--rq-primary-dark);
    --bs-btn-hover-border-color: var(--rq-primary-dark);
    --bs-btn-active-bg: var(--rq-primary-dark);
    --bs-btn-active-border-color: var(--rq-primary-dark);
    --bs-btn-disabled-bg: var(--rq-primary);
    --bs-btn-disabled-border-color: var(--rq-primary);
}

.btn-outline-primary {
    --bs-btn-color: var(--rq-primary);
    --bs-btn-border-color: var(--rq-primary);
    --bs-btn-hover-bg: var(--rq-primary);
    --bs-btn-hover-border-color: var(--rq-primary);
    --bs-btn-active-bg: var(--rq-primary-dark);
    --bs-btn-active-border-color: var(--rq-primary-dark);
}

a {
    color: var(--rq-primary);
}

a:hover {
    color: var(--rq-primary-dark);
}

/* =========================================================
   Layout
   ========================================================= */

.hero {
    padding: 64px 0 40px;
}

.section {
    padding: 64px 0;
}

/* =========================================================
   Common Components
   ========================================================= */

.card-lite {
    background: var(--rq-surface);
    border: 1px solid var(--rq-border);
    border-radius: 12px;
}

.small-title {
    font-size: .8rem;
    font-weight: 600;
    letter-spacing: .04em;
    color: var(--rq-primary);
}

.icon {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: var(--rq-primary-soft);
    color: var(--rq-primary);
    font-weight: 700;
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
}

/* =========================================================
   Homepage Diagram
   ========================================================= */

.diagram {
    border: 1px solid var(--rq-border);
    border-radius: 14px;
    background: var(--rq-surface-soft);
    padding: 20px;
}

.node {
    background: var(--rq-primary-soft);
    border-left: 4px solid var(--rq-primary);
    padding: 12px 15px;
    margin-bottom: 12px;
    border-radius: 8px;
    font-weight: 600;
}

.node:last-child {
    margin-bottom: 0;
}

/* =========================================================
   Use Cases
   ========================================================= */

.role {
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--rq-muted);
}

.question {
    font-size: 1.25rem;
    font-weight: 600;
}

.answer {
    background: var(--rq-primary-soft);
    border-left: 4px solid var(--rq-primary);
    padding: 16px 18px;
    border-radius: 8px;
}

/* =========================================================
   Footer
   ========================================================= */

footer {
    border-top: 1px solid var(--rq-border);
    padding: 32px 0;
    color: var(--rq-muted);
    background: var(--rq-surface);
}

footer a {
    color: var(--rq-muted);
}

footer a:hover,
footer a.active {
    color: var(--rq-primary);
}

/* =========================================================
   Execution Map
   ========================================================= */

#execution-map svg {
    width: 100%;
    height: auto;
    display: block;
}

.col-h {
    font: 600 11px "JetBrains Mono", monospace;
    letter-spacing: .12em;
    fill: var(--rq-muted-light);
}

#execution-map .card {
    fill: var(--rq-surface);
    stroke: #b9c2d0;
    stroke-width: 2;
}

.card-2 {
    fill: var(--rq-surface-soft);
    stroke: #cfd6df;
    stroke-width: 1.4;
}

.commit-card {
    fill: var(--rq-surface);
    stroke: var(--rq-primary);
    stroke-width: 1.8;
}

.card-title {
    font: 600 12px "JetBrains Mono", monospace;
    fill: var(--rq-text-strong);
}

.meta {
    font: 11px Inter, sans-serif;
    fill: var(--rq-muted-light);
}

.sym {
    font: 12px "JetBrains Mono", monospace;
    fill: var(--rq-text-strong);
}

.sym.muted {
    fill: var(--rq-muted-light);
}

.runtime-title {
    font: 700 14px Inter, sans-serif;
    fill: var(--rq-text-strong);
}

.runtime-meta {
    font: 11px "JetBrains Mono", monospace;
    fill: #5b6373;
}

.test-title {
    font: 700 13px Inter, sans-serif;
    fill: var(--rq-text-strong);
}

.test-status {
    font: 600 10px "JetBrains Mono", monospace;
    text-anchor: end;
}

.test-status.risk {
    fill: var(--rq-primary);
}

.test-status.safe {
    fill: var(--rq-muted-light);
}

.test-caption {
    font: 10px "JetBrains Mono", monospace;
    fill: #5b6373;
}

/* =========================================================
   Execution Map Paths & Symbols
   ========================================================= */

.dot-changed {
    fill: var(--rq-primary);
}

.dot-unchanged {
    fill: none;
    stroke: var(--rq-muted-light);
    stroke-width: 1.4;
}

.path-active {
    fill: none;
    stroke: var(--rq-primary);
    stroke-width: 2;
}

.path-hist {
    fill: none;
    stroke: #c3c9d4;
    stroke-width: 1.4;
    stroke-dasharray: 4 4;
}

.badge-changed {
    fill: var(--rq-primary-soft);
    stroke: var(--rq-primary);
    stroke-width: 1;
}

.badge-changed-text {
    font: 600 10.5px "JetBrains Mono", monospace;
    fill: var(--rq-primary);
}

.legend-text {
    font: 11.5px Inter, sans-serif;
    fill: var(--rq-muted);
}

.legend-line-active {
    stroke: var(--rq-primary);
    stroke-width: 2;
}

.legend-line-hist {
    stroke: #c3c9d4;
    stroke-width: 1.3;
    stroke-dasharray: 4 4;
}

/* =========================================================
   Execution Map Interactions
   ========================================================= */

.row-group {
    cursor: pointer;
}

.row-group:hover .sym {
    fill: var(--rq-primary);
}

.row-group:hover .dot-changed {
    fill: var(--rq-primary);
}

.row-group:hover .dot-unchanged {
    stroke: var(--rq-primary);
}

path.dim {
    opacity: .12;
}

path.hl {
    opacity: 1;
    stroke: var(--rq-primary);
    stroke-width: 3;
}

/* =========================================================
   Execution Map Summary
   ========================================================= */

.summary-bg {
    fill: var(--rq-surface);
    stroke: #dfe3ea;
}

.summary-num {
    font: 700 17px Inter, sans-serif;
    fill: var(--rq-text-strong);
}

.summary-num.accent {
    fill: var(--rq-primary);
}

.summary-num.good {
    fill: var(--rq-success);
}

.summary-label {
    font: 10px "JetBrains Mono", monospace;
    fill: var(--rq-muted-light);
}

/* =========================================================
   Execution Metadata & Verdict
   ========================================================= */

.exec-meta {
    font: 10.5px "JetBrains Mono", monospace;
    fill: #5b6373;
    text-anchor: end;
}

.verdict-label {
    font: 600 10px "JetBrains Mono", monospace;
    letter-spacing: .06em;
    fill: var(--rq-muted-light);
}

.verdict-status {
    font: 800 15px Inter, sans-serif;
}

.verdict-status.risk {
    fill: var(--rq-primary);
}

.verdict-status.safe {
    fill: var(--rq-muted-light);
}

.verdict-caption {
    font: 10px "JetBrains Mono", monospace;
    fill: #5b6373;
}

.card-risk {
    fill: var(--rq-primary-soft);
    stroke: #b9c2d0;
    stroke-width: 2;
}

.card-safe {
    fill: var(--rq-surface);
    stroke: #cfd6df;
    stroke-width: 1.4;
}

/* =========================================================
   Product Screenshot Preview
   ========================================================= */

.screenshot-preview {
    position: relative;
    cursor: zoom-in;
    overflow: hidden;
    border-radius: 8px;
}

.screenshot-preview img {
    display: block;
    width: 100%;
    transition: transform .2s ease;
}

.screenshot-preview:hover img {
    transform: scale(1.01);
}

.screenshot-zoom {
    position: absolute;
    right: 12px;
    bottom: 12px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, .95);
    border: 1px solid var(--rq-border);
    border-radius: 50%;
    color: var(--rq-text);
    font-size: 18px;
    pointer-events: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
}

.screenshot-preview:hover .screenshot-zoom {
    color: var(--rq-primary);
}

#screenshotModal .modal-dialog {
    max-width: 95vw;
}

#screenshotModal .modal-content {
    background: transparent;
    border: 0;
}

#screenshotModal .modal-body {
    padding: 0;
    text-align: center;
}

#screenshotModalImage {
    max-width: 100%;
    max-height: 90vh;
    width: auto;
    height: auto;
    object-fit: contain;
}

#screenshotModal .btn-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;
    background-color: #fff;
    padding: 10px;
    opacity: .9;
}