/* CVEsafe Docs — brand-aligned documentation theme */
:root {
  --bg: #0a0f1c;
  --bg-2: #0d1424;
  --bg-alt: #0b1120;
  --card: rgba(255, 255, 255, 0.035);
  --border: rgba(255, 255, 255, 0.09);
  --border-2: rgba(255, 255, 255, 0.14);
  --text: #e8edf6;
  --muted: #9aa7bd;
  --muted-2: #6b7890;
  --brand: #f68330;
  --brand-2: #fbbf24;
  --crit: #ef4444;
  --high: #f97316;
  --med: #eab308;
  --low: #38bdf8;
  --ok: #22c55e;
  --info: #61afef;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --sidebar: 280px;
  --maxw: 860px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body { margin: 0; font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.65; -webkit-font-smoothing: antialiased; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: var(--mono); font-size: 0.86em; background: rgba(255,255,255,0.07); padding: 0.12em 0.4em; border-radius: 5px; color: #fcd9b6; }
pre { background: linear-gradient(180deg, #0c1322, #06090f); border: 1px solid var(--border-2); border-radius: 12px; padding: 16px 18px; overflow-x: auto; font-family: var(--mono); font-size: 0.82rem; line-height: 1.6; color: var(--muted); }
pre code { background: none; padding: 0; color: inherit; font-size: inherit; }
pre .c { color: var(--ok); }
pre .p { color: var(--info); font-weight: 600; }
pre .k { color: #fca5a5; font-weight: 600; }
pre .d { color: var(--muted-2); }

/* ---------- Top bar ---------- */
.top { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 14px; height: 60px; padding: 0 20px; border-bottom: 1px solid var(--border); background: rgba(10,15,28,0.85); backdrop-filter: blur(10px); }
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 1.12rem; letter-spacing: -0.02em; color: var(--text); }
.brand img { width: 30px; height: 30px; object-fit: contain; }
.brand b { color: var(--brand); }
.top__docs { font-weight: 600; color: var(--muted-2); font-size: 0.8rem; border: 1px solid var(--border); border-radius: 6px; padding: 2px 7px; }
.top__links { margin-left: auto; display: flex; align-items: center; gap: 18px; font-size: 0.9rem; }
.top__links a { color: var(--muted); }
.top__links a:hover { color: var(--text); text-decoration: none; }
.top__cta { background: linear-gradient(100deg, var(--brand), var(--brand-2)); color: #1a1205 !important; font-weight: 700; padding: 7px 14px; border-radius: 9px; }
.burger { display: none; background: none; border: 0; color: var(--text); font-size: 1.4rem; cursor: pointer; }
.lang { display: inline-flex; gap: 2px; border: 1px solid var(--border); border-radius: 8px; padding: 2px; }
.lang a { color: var(--muted); font-size: 0.76rem; font-weight: 700; padding: 3px 8px; border-radius: 6px; letter-spacing: 0.02em; }
.lang a:hover { color: var(--text); text-decoration: none; }
.lang a.is-active { background: rgba(246,131,48,0.14); color: var(--brand); }

/* ---------- Layout ---------- */
.layout { display: grid; grid-template-columns: var(--sidebar) 1fr; align-items: start; }
.sidebar { position: sticky; top: 60px; height: calc(100vh - 60px); overflow-y: auto; border-right: 1px solid var(--border); padding: 26px 16px 60px; }
.sidebar h4 { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted-2); margin: 22px 0 8px; padding-left: 10px; }
.sidebar h4:first-child { margin-top: 0; }
.sidebar a { display: block; padding: 6px 10px; border-radius: 8px; color: var(--muted); font-size: 0.9rem; }
.sidebar a:hover { background: rgba(255,255,255,0.05); color: var(--text); text-decoration: none; }
.sidebar a.active { background: rgba(246,131,48,0.12); color: var(--brand); font-weight: 600; }

.content { padding: 40px 36px 120px; min-width: 0; }
.content__inner { max-width: var(--maxw); margin: 0 auto; }
.content h1 { font-size: 2.2rem; font-weight: 900; margin: 0 0 8px; letter-spacing: -0.02em; }
.content h2 { font-size: 1.55rem; font-weight: 800; margin: 56px 0 14px; padding-top: 12px; border-top: 1px solid var(--border); letter-spacing: -0.01em; }
.content h3 { font-size: 1.15rem; font-weight: 700; margin: 30px 0 10px; }
.content p, .content li { color: #c8d2e2; }
.content .lead { font-size: 1.15rem; color: var(--muted); margin-top: 0; }
.content ul, .content ol { padding-left: 22px; }
.content li { margin: 6px 0; }
.content strong { color: var(--text); }
.eyebrow { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--brand); }

/* Callouts */
.note { border: 1px solid var(--border-2); border-left: 3px solid var(--brand); background: var(--card); border-radius: 10px; padding: 14px 16px; margin: 18px 0; }
.note--warn { border-left-color: var(--high); }
.note--ok { border-left-color: var(--ok); }
.note p { margin: 0; color: var(--muted); }
.note b { color: var(--text); }

/* Step list */
.steps { counter-reset: step; list-style: none; padding: 0; }
.steps > li { counter-increment: step; position: relative; padding: 0 0 4px 44px; margin: 0 0 18px; }
.steps > li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(100deg, var(--brand), var(--brand-2)); color: #1a1205; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.steps > li h3 { margin: 2px 0 6px; }

/* Tables */
table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: 0.92rem; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { color: var(--muted-2); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; }
td code { white-space: nowrap; }

/* Architecture diagram */
.arch { border: 1px solid var(--border-2); border-radius: 14px; padding: 20px; margin: 22px 0; background: linear-gradient(180deg, var(--bg-2), #070b14); display: flex; flex-direction: column; gap: 12px; }
.arch__row { display: flex; gap: 12px; flex-wrap: wrap; }
.arch__box { flex: 1; min-width: 150px; border: 1px solid var(--border-2); border-radius: 10px; padding: 12px 14px; background: rgba(255,255,255,0.03); }
.arch__box b { display: block; color: var(--text); font-size: 0.95rem; }
.arch__box span { color: var(--muted-2); font-size: 0.8rem; }
.arch__box--brand { border-color: rgba(246,131,48,0.4); background: rgba(246,131,48,0.06); }
.arch__arrow { text-align: center; color: var(--muted-2); font-size: 0.8rem; letter-spacing: 0.1em; }

.pill { display: inline-block; font-size: 0.72rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.pill--crit { background: rgba(239,68,68,0.16); color: #fca5a5; }
.pill--high { background: rgba(249,115,22,0.16); color: #fdba74; }
.pill--ok { background: rgba(34,197,94,0.16); color: #6ee7a8; }

.foot { border-top: 1px solid var(--border); margin-top: 60px; padding-top: 22px; color: var(--muted-2); font-size: 0.85rem; }

@media (max-width: 880px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: fixed; top: 60px; left: 0; width: 280px; background: var(--bg-2); z-index: 50; transform: translateX(-100%); transition: transform 0.2s; box-shadow: 0 20px 60px rgba(0,0,0,0.5); }
  .sidebar.open { transform: translateX(0); }
  .burger { display: block; }
  .content { padding: 28px 20px 100px; }
  .top__links a:not(.top__cta) { display: none; }
}
