/* FlareInspect Sphinx Book Theme — Cloudflare × IONSEC branding */

:root {
  --cf-orange:     #f6821f;
  --cf-orange-lt:  #ffa040;
  --cf-orange-dim: rgba(246,130,31,0.12);
  --cf-navy:       #0d1117;
  --cf-blue:       #3b82f6;
  --text-color:    #e6edf3;
  --muted:         #7d8590;
  --border-color:  rgba(240,246,252,0.1);
}

body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--cf-navy); }
::-webkit-scrollbar-thumb { background: rgba(246,130,31,0.4); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--cf-orange); }

.navbar-nav .nav-item, .navbar-brand { color: var(--text-color) !important; }
.edit-btn, .headerbtn { color: var(--cf-orange) !important; }

.sidebar-logo img { max-height: 40px; }

.sphinx-sidebar nav > .toctree-l1 > a {
  font-weight: 700; color: var(--cf-orange) !important;
  font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em;
}
.toctree-l2 a, .toctree-l3 a { color: var(--muted) !important; }
.toctree-l2 a:hover, .toctree-l3 a:hover { color: var(--cf-orange-lt) !important; }
.current > a, li.current > a {
  color: var(--cf-orange) !important; font-weight: 600;
  border-left: 2px solid var(--cf-orange); padding-left: 6px;
}

.document { font-size: 1rem; line-height: 1.7; }

.rst-content h1, .rst-content h2, .rst-content h3 {
  color: var(--text-color); font-family: 'Inter', -apple-system, sans-serif; font-weight: 700;
}
.rst-content h1 { font-size: 2rem; margin-bottom: 0.8em; border-bottom: 2px solid var(--cf-orange); padding-bottom: 0.3em; }
.rst-content h2 { font-size: 1.4rem; margin-top: 1.5em; border-bottom: 1px solid var(--border-color); padding-bottom: 0.2em; }
.rst-content h3 { font-size: 1.1rem; }

.rst-content code, div.highlight pre, .highlight pre {
  background: #0a0e14 !important; border: 1px solid rgba(246,130,31,0.15) !important;
  border-radius: 6px !important; color: #ffa040 !important;
  font-family: 'JetBrains Mono', 'Fira Code', monospace !important;
  font-size: 0.85em !important; padding: 2px 6px;
}
.highlight .nf, .highlight .nb { color: #79c0ff; }
.highlight .s  { color: #a5d6ff; }
.highlight .c  { color: var(--muted); font-style: italic; }
.highlight .o  { color: var(--cf-orange); }

.copybutton {
  background: transparent !important; color: rgba(246,130,31,0.6) !important;
  border: none !important; border-radius: 4px !important;
  padding: 2px 6px !important; font-size: 0.75em !important;
}
.copybutton:hover { background: var(--cf-orange-dim) !important; color: var(--cf-orange) !important; }

.rst-content .note    { background: rgba(59,130,246,0.08);  border-color: var(--cf-blue); border-radius: 8px !important; border-left-width: 5px !important; }
.rst-content .tip     { background: rgba(246,130,31,0.08);  border-color: var(--cf-orange); border-radius: 8px !important; border-left-width: 5px !important; }
.rst-content .warning { background: rgba(234,179,8,0.08);   border-color: #eab308; border-radius: 8px !important; border-left-width: 5px !important; }
.rst-content .danger  { background: rgba(239,68,68,0.08);   border-color: #ef4444; border-radius: 8px !important; border-left-width: 5px !important; }
.rst-content .important { background: rgba(34,197,94,0.08); border-color: #22c55e; border-radius: 8px !important; border-left-width: 5px !important; }

.rst-content table.docutils {
  border-radius: 8px !important; overflow: hidden;
  border: 1px solid var(--border-color) !important; box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.rst-content table.docutils thead th {
  background: rgba(246,130,31,0.15) !important; color: var(--cf-orange-lt) !important;
  font-weight: 700; border-bottom: 2px solid rgba(246,130,31,0.4) !important;
}
.rst-content table.docutils td, .rst-content table.docutils th { border-color: rgba(240,246,252,0.06) !important; }
.rst-content table.docutils tbody tr:nth-child(even) td { background: rgba(255,255,255,0.02); }

.footer {
  background: var(--cf-navy) !important;
  border-top: 1px solid rgba(246,130,31,0.2) !important;
  color: var(--muted) !important;
}
.footer-brand a { color: var(--cf-orange) !important; }
.footer-item { color: var(--muted) !important; }

.breadcrumb { font-size: 0.85rem; color: var(--muted); }
.breadcrumb a { color: var(--cf-orange) !important; }

.search-bar-field input {
  background: var(--cf-navy) !important; border: 1px solid var(--border-color) !important;
  color: var(--text-color) !important; border-radius: 6px !important;
}
.search-result-highlight { background: var(--cf-orange-dim) !important; color: var(--cf-orange-lt) !important; }

#github-edit-button { color: var(--cf-orange) !important; }
