:root {
    --black: var(--ink);
    --white: var(--paper);
    --gray-100: #FAFAFC;
    --gray-200: var(--rule);
    --gray-300: #888894;
    --gray-400: var(--muted);
    --red: #B00020;
    --font-display: var(--font-body);
    --font-body: 'Inter', 'Segoe UI', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', 'SFMono-Regular', Consolas, monospace;
    --accent-highlighter-yellow: #DFFF00;
    --accent-highlighter-green: #39FF14;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font-body);
    color: var(--black);
    background-color: var(--white);
    font-size: 15px;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

button, input, select, textarea {
    font-family: inherit;
    font-size: inherit;
}

/* Header */
.docs-header {
    height: 92px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 29px;
    border-bottom: 1px solid var(--gray-200);
    background: var(--white);
    position: sticky;
    top: 0;
    z-index: 100;
}

.docs-header .left, .docs-header .right {
    display: flex;
    align-items: center;
    gap: 25px;
}

.docs-header .nav-link {
    color: var(--gray-400);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: color 0.2s;
}

.docs-header .nav-link:hover {
    color: var(--black);
}

.brand-mini {
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--black);
    text-decoration: none;
    font-weight: 800;
    letter-spacing: -0.02em;
    font-size: 1.05rem;
    text-transform: uppercase;
    font-family: var(--font-display);
}

.brand-logo {
    height: 28px;
    width: auto;
    display: block;
}

.docs-header .search-form {
    position: relative;
}

.docs-header .search-input {
    width: 240px;
    height: 36px;
    border: 1px solid var(--gray-200);
    border-radius: 0;
    padding: 0 12px 0 34px;
    font-size: 13px;
    background: var(--white);
    outline: none;
    font-family: var(--font-mono);
}

.docs-header .search-input:focus {
    border-color: var(--black);
    outline: 3px solid var(--black);
    outline-offset: -3px;
}

.docs-header .search-icon {
    position: absolute;
    left: 11px;
    top: 10px;
    width: 16px;
    height: 16px;
    color: var(--gray-300);
}

/* Layout */
.docs-shell {
    flex: 1;
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    max-width: 1155px;
    margin: 0 auto;
    width: 100%;
    padding: 0 29px;
    gap: 42px;
}

.docs-sidebar {
    padding: 28px 0 60px;
    position: sticky;
    top: 92px;
    height: calc(100vh - 92px);
    overflow-y: auto;
    border-right: 1px solid var(--gray-200);
}

.sidebar-title {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--gray-300);
    font-weight: 700;
    margin: 24px 0 10px;
    padding-left: 16px;
}

.sidebar-title:first-child {
    margin-top: 0;
}

.sidebar-link {
    display: block;
    color: var(--gray-400);
    text-decoration: none;
    font-size: 0.85rem;
    padding: 8px 16px;
    margin-right: 16px;
    border-left: 3px solid transparent;
    border-radius: 0;
    transition: all 0.2s;
}

.sidebar-link:hover {
    color: var(--black);
    background: var(--gray-100);
}

.sidebar-link.active {
    color: var(--black);
    background: var(--gray-100);
    border-left-color: var(--black);
    font-weight: 700;
}

.sidebar-link .tag {
    font-family: var(--font-mono);
    font-size: 9px;
    background: var(--gray-200);
    color: var(--black);
    padding: 2px 6px;
    margin-left: 6px;
    font-weight: 600;
}

/* Content */
.docs-content {
    padding: 36px 0 80px;
    min-width: 0;
    max-width: 900px;
}

.docs-content h1 {
    font-family: var(--font-pixel);
    font-size: clamp(18px, 2.2vw, 25px);
    letter-spacing: -.035em;
    font-weight: 400;
    text-transform: uppercase;
    margin: 0 0 16px;
    line-height: 1.65;
    color: var(--black);
}

.docs-content h2 {
    font-family: var(--font-display);
    font-size: 1.4rem;
    letter-spacing: -0.5px;
    font-weight: 700;
    margin: 42px 0 14px;
    color: var(--black);
    border-bottom: 2px solid var(--black);
    padding-bottom: 10px;
}

.docs-content h3 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    margin: 28px 0 10px;
    color: var(--black);
}

.docs-content h4 {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    margin: 18px 0 8px;
    color: var(--black);
}

.docs-content p {
    margin: 0 0 14px;
    color: var(--black);
}

.docs-content a {
    color: var(--black);
    text-decoration: underline;
    font-weight: 500;
}

.docs-content a:hover {
    color: var(--gray-400);
}

.docs-content ul, .docs-content ol {
    margin: 0 0 16px;
    padding-left: 22px;
}

.docs-content li {
    margin: 5px 0;
    color: var(--black);
}

.docs-content strong {
    color: var(--black);
    font-weight: 700;
}

.docs-content code {
    font-family: var(--font-mono);
    font-size: 13px;
    background: var(--gray-100);
    color: var(--black);
    padding: 2px 6px;
    border: 1px solid var(--gray-200);
    border-radius: 0;
}

.docs-content pre {
    font-family: var(--font-mono);
    font-size: 13px;
    background: var(--black);
    color: var(--white);
    padding: 16px 18px;
    border: 1px solid var(--gray-200);
    border-radius: 0;
    overflow-x: auto;
    line-height: 1.5;
    margin: 0 0 18px;
}

.docs-content pre code {
    background: transparent;
    color: inherit;
    padding: 0;
    border: none;
}

.docs-content blockquote {
    border-left: 4px solid var(--black);
    margin: 18px 0;
    padding: 10px 18px;
    background: var(--gray-100);
    border-radius: 0;
    color: var(--black);
    font-size: 14px;
}

.docs-content hr {
    border: 0;
    border-top: 1px solid var(--gray-200);
    margin: 32px 0;
}

.docs-content img {
    max-width: 100%;
    border: 1px solid var(--gray-200);
    border-radius: 0;
}

.docs-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0 24px;
    font-size: 13.5px;
    border: 1px solid var(--gray-200);
}

.docs-content th, .docs-content td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--gray-200);
    border-right: 1px solid var(--gray-200);
    text-align: left;
    vertical-align: top;
}

.docs-content th {
    background: var(--gray-100);
    font-weight: 700;
    color: var(--black);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .5px;
    font-family: var(--font-mono);
}

.docs-content tr:hover td {
    background: var(--gray-100);
}

.docs-content td code {
    font-size: 12px;
}

/* Components */
.lead {
    font-size: 18px;
    color: var(--gray-400);
    line-height: 1.6;
    margin-bottom: 24px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    padding: 4px 8px;
    border: 1px solid var(--black);
    white-space: nowrap;
    border-radius: 0;
}

.badge.critical { background: var(--black); color: var(--white); border-color: var(--black); }
.badge.high { background: var(--gray-400); color: var(--white); border-color: var(--gray-400); }
.badge.medium { background: var(--gray-300); color: var(--white); border-color: var(--gray-300); }
.badge.low { background: var(--gray-100); color: var(--black); border-color: var(--gray-200); }
.badge.pass { background: #e8f7ea; color: #1c7c2e; border-color: #b9e3bf; }
.badge.agent { background: var(--black); color: var(--white); border-color: var(--black); }

.callout {
    border: 1px solid var(--gray-200);
    padding: 16px 18px;
    margin: 18px 0;
    background: var(--white);
    border-radius: 0;
}

.callout-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--black);
    margin-bottom: 8px;
    font-size: 14px;
}

.callout.info { border-color: var(--gray-200); border-left: 4px solid var(--black); background: var(--gray-100); }
.callout.warning { border-color: var(--gray-200); border-left: 4px solid var(--gray-300); background: var(--gray-100); }
.callout.tip { border-color: var(--gray-200); border-left: 4px solid var(--accent-highlighter-green); background: var(--gray-100); }
.callout.danger { border-color: var(--gray-200); border-left: 4px solid var(--red); background: var(--gray-100); }

.quick-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    margin: 24px 0;
}

.quick-card {
    display: block;
    border: 1px solid var(--gray-200);
    padding: 18px;
    background: var(--white);
    text-decoration: none;
    color: inherit;
    transition: all .15s ease;
    border-radius: 0;
}

.quick-card:hover {
    border-color: var(--black);
    box-shadow: 4px 4px 0px var(--black);
    transform: translate(-2px, -2px);
}

.quick-card h3 {
    margin: 0 0 6px;
    font-size: 15px;
    color: var(--black);
    font-family: var(--font-display);
}

.quick-card p {
    margin: 0;
    font-size: 13px;
    color: var(--gray-400);
    line-height: 1.5;
}

.quick-card .icon {
    width: 34px;
    height: 34px;
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    display: grid;
    place-items: center;
    color: var(--black);
    margin-bottom: 12px;
    border-radius: 0;
}

.quick-card .icon svg {
    width: 18px;
    height: 18px;
}

.agent-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
    margin: 20px 0;
}

.agent-card {
    border: 1px solid var(--gray-200);
    padding: 18px;
    background: var(--white);
    position: relative;
    border-radius: 0;
}

.agent-card .agent-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.agent-card .agent-icon {
    width: 38px;
    height: 38px;
    background: var(--black);
    display: grid;
    place-items: center;
    color: var(--white);
    font-weight: 700;
    font-size: 16px;
    border-radius: 0;
    font-family: var(--font-display);
}

.agent-card h3 {
    margin: 0;
    font-size: 16px;
    color: var(--black);
    font-family: var(--font-display);
}

.agent-card .domain {
    font-size: 12px;
    color: var(--gray-300);
    font-weight: 500;
    font-family: var(--font-mono);
    text-transform: uppercase;
}

.agent-card p {
    margin: 0;
    font-size: 13.5px;
    color: var(--gray-400);
    line-height: 1.55;
}

.agent-card .checks {
    margin-top: 12px;
    font-size: 12px;
    color: var(--gray-300);
    font-weight: 500;
    font-family: var(--font-mono);
}

.checklist-section {
    margin: 28px 0 40px;
}

.checklist-section h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 17px;
    font-family: var(--font-display);
}

.checklist-section h3 .count {
    font-family: var(--font-mono);
    font-size: 12px;
    background: var(--gray-100);
    color: var(--black);
    border: 1px solid var(--gray-200);
    padding: 3px 8px;
    border-radius: 0;
}

.check-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 16px;
    font-size: 13.5px;
    border: 1px solid var(--gray-200);
}

.check-table th, .check-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--gray-200);
    border-right: 1px solid var(--gray-200);
    text-align: left;
    vertical-align: top;
}

.check-table th {
    background: var(--gray-100);
    color: var(--black);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .5px;
    font-family: var(--font-mono);
}

.check-table td:first-child {
    white-space: nowrap;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--gray-400);
    width: 60px;
}

.check-table td:nth-child(2) {
    font-weight: 600;
    color: var(--black);
}

.sev, .check-table td .sev {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .4px;
    padding: 2px 6px;
    border: 1px solid var(--black);
    border-radius: 0;
}

.sev.critical, .check-table td .sev.critical { background: var(--black); color: var(--white); border-color: var(--black); }
.sev.high, .check-table td .sev.high { background: var(--gray-400); color: var(--white); border-color: var(--gray-400); }
.sev.medium, .check-table td .sev.medium { background: var(--gray-300); color: var(--white); border-color: var(--gray-300); }
.sev.low, .check-table td .sev.low { background: var(--gray-100); color: var(--black); border-color: var(--gray-200); }

/* Check detail cards (checks.html) */
.agent-index {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0 28px;
    font-size: 13.5px;
    border: 1px solid var(--gray-200);
}

.agent-index th, .agent-index td {
    padding: 9px 12px;
    border-bottom: 1px solid var(--gray-200);
    border-right: 1px solid var(--gray-200);
    text-align: left;
}

.agent-index th {
    background: var(--gray-100);
    color: var(--black);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .5px;
    font-family: var(--font-mono);
}

.agent-index td a {
    font-weight: 600;
}

.check-card {
    border: 1px solid var(--gray-200);
    padding: 16px 18px;
    margin: 0 0 14px;
    background: var(--white);
    scroll-margin-top: 84px;
    border-radius: 0;
}

.check-card-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.check-id {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--black);
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    padding: 2px 7px;
    border-radius: 0;
}

.check-card-head h4 {
    margin: 0;
    font-size: 15.5px;
    color: var(--black);
    flex: 1 1 auto;
    font-family: var(--font-display);
}

.cwe-tag {
    font-size: 11px;
    color: var(--gray-300);
    font-family: var(--font-mono);
}

.check-card .field-label {
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--gray-300);
    font-weight: 700;
    margin: 10px 0 4px;
}

.check-card p {
    margin: 0 0 4px;
}

.check-card pre {
    margin: 6px 0 0;
}

.check-states {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 16px 0;
}

.check-state {
    border: 1px solid var(--gray-200);
    padding: 10px 14px;
    background: var(--white);
    font-size: 13px;
    flex: 1 1 160px;
    border-radius: 0;
}

.check-state strong {
    display: block;
    color: var(--black);
    font-size: 13px;
    margin-bottom: 2px;
    font-family: var(--font-display);
}

.score-breakdown {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 14px;
    margin: 20px 0;
}

.score-card {
    border: 1px solid var(--gray-200);
    padding: 16px;
    background: var(--white);
    text-align: center;
    border-radius: 0;
}

.score-card .value {
    font-size: 32px;
    font-weight: 700;
    color: var(--black);
    line-height: 1;
    font-family: var(--font-display);
}

.score-card .label {
    font-size: 12px;
    color: var(--gray-300);
    margin-top: 6px;
    text-transform: uppercase;
    letter-spacing: .5px;
    font-family: var(--font-mono);
}

/* Steps / numbered flow */
.flow {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin: 20px 0;
}

.flow-step {
    border: 1px solid var(--gray-200);
    padding: 16px;
    background: var(--white);
    position: relative;
    border-radius: 0;
}

.flow-step .num {
    width: 28px;
    height: 28px;
    background: var(--black);
    color: var(--white);
    display: grid;
    place-items: center;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 10px;
    border-radius: 0;
    font-family: var(--font-display);
}

.flow-step h4 {
    margin: 0 0 6px;
    font-size: 14px;
    color: var(--black);
    font-family: var(--font-display);
}

.flow-step p {
    margin: 0;
    font-size: 13px;
    color: var(--gray-400);
    line-height: 1.5;
}

/* Footer */
.docs-footer {
    background: transparent;
    border-top: 2px solid var(--ink);
    color: var(--muted);
    padding: 24px 0 26px;
    width: min(1097px, calc(100% - 58px));
    margin-inline: auto;
    margin-top: auto;
}

.docs-footer .inner {
    max-width: 1180px;
    margin: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    font-size: 12px;
    font-family: var(--font-mono);
}

.docs-footer a {
    color: var(--gray-400);
    text-decoration: none;
    transition: color 0.2s;
}

.docs-footer a:hover {
    color: var(--black);
}

/* Mobile */
@media(max-width:900px) {
    .docs-shell {
        grid-template-columns: 1fr;
        padding: 0 20px;
    }
    .docs-sidebar {
        display: none;
        position: fixed;
        left: 0;
        top: 92px;
        width: 280px;
        height: calc(100vh - 92px);
        background: var(--white);
        z-index: 200;
        border-right: 1px solid var(--gray-200);
    }
    .docs-sidebar.open {
        display: block;
    }
    .menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        border: 1px solid var(--gray-200);
        border-radius: 0;
        background: var(--white);
        cursor: pointer;
        color: var(--black);
    }
    .docs-header .search-form {
        display: none;
    }
}

@media(min-width:901px) {
    .menu-toggle {
        display: none;
    }
}

@media(max-width:720px) {
    .docs-header {
        padding: 0 16px;
    }
    .docs-header .left .nav-link {
        display: none;
    }
    .docs-content h1 {
        font-size: clamp(17px, 4.5vw, 23px);
    }
    .docs-content h2 {
        font-size: 21px;
    }
    .docs-footer .inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

/* Editorial documentation: shared Cerberus framing with readable reference text. */
.docs-header {
    width: min(1097px, calc(100% - 58px));
    margin-inline: auto;
    padding: 0;
    border-bottom: 2px solid var(--ink);
}
.docs-header .nav-link {
    font: 700 10.5px/1.5 var(--font-mono);
    letter-spacing: .025em;
    text-transform: uppercase;
}
.docs-header .nav-link:hover {
    text-decoration: underline;
    text-underline-offset: 6px;
}
.docs-header .search-input { border: 1px solid var(--ink); }
.docs-sidebar { padding-top: 36px; }
.sidebar-title { color: var(--muted); font-size: 10px; }
.sidebar-link { font-size: 13px; }
.sidebar-link.active { background: var(--ink); color: var(--paper); }
.docs-content { line-height: 1.8; }
.docs-content :is(h2, h3, h4, [id]) { scroll-margin-top: 112px; }
.docs-content .lead {
    font-size: 16px;
    line-height: 1.85;
    color: var(--muted);
    margin-bottom: 28px;
}
.docs-content a { text-underline-offset: 3px; }
.docs-content a.quick-card { text-decoration: none; font-weight: 400; }
.quick-links { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-bottom: 32px; }
.quick-card {
    border: 2px solid var(--ink);
    box-shadow: 4px 4px 0 var(--ink);
    padding: 22px;
}
.quick-card:hover { box-shadow: 6px 6px 0 var(--ink); }
.quick-card .icon { border-color: var(--ink); background: var(--paper); }
.quick-card h3 { font: 700 13px/1.6 var(--font-mono); }
.quick-card p { line-height: 1.75; }
.agent-card, .check-card, .check-state, .score-card, .flow-step {
    border-color: var(--ink);
}
.agent-card .agent-icon, .flow-step .num { flex-shrink: 0; font-family: var(--font-mono); }
.agent-card h3 { font: 700 14px/1.6 var(--font-mono); }
.agent-card .domain, .agent-card .checks, .check-card .field-label,
.cwe-tag, .score-card .label { color: var(--muted); }
.agent-card p, .flow-step p { line-height: 1.75; }
.callout { border-color: var(--ink); }
.callout.info, .callout.tip, .callout.warning {
    border-color: var(--ink);
    background: var(--gray-100);
}
.callout-title { font-family: var(--font-mono); font-size: 12px; }
.callout p:last-child { margin-bottom: 0; }
.docs-content pre { border: 2px solid var(--ink); padding: 20px; }
.docs-content table { display: block; overflow-x: auto; }
.docs-content th { border-bottom: 2px solid var(--ink); }
.docs-content :not(pre) > code { overflow-wrap: anywhere; }
.badge.medium, .sev.medium, .check-table td .sev.medium { color: var(--ink); }
.docs-footer .inner { font-size: 10.5px; }
@media (max-width: 900px) {
    .docs-content { max-width: none; }
    .docs-sidebar { border-right: 2px solid var(--ink); padding-left: 12px; }
    .menu-toggle { border-color: var(--ink); }
}
@media (max-width: 720px) {
    .docs-header { width: calc(100% - 40px); padding: 0; }
    .docs-header .right { gap: 16px; }
    .docs-content { padding-top: 28px; }
    .docs-footer { width: calc(100% - 40px); }
    .quick-links, .agent-grid { grid-template-columns: minmax(0, 1fr); }
    .flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .flow-step { padding: 12px; }
}
