/* ===================================================================
   RiskLab — Unified Light Theme
   A warm, soft light palette with muted teal accents.
   =================================================================== */

/* ----- CSS Variables ------------------------------------------------ */
:root {
    --rl-bg:            #fafbfc;   /* page background                  */
    --rl-surface:       #ffffff;   /* card / content surface            */
    --rl-sidebar-bg:    #f2f4f7;   /* sidebar background               */
    --rl-sidebar-hover: #e8ecf1;   /* sidebar hover                    */
    --rl-sidebar-active:#dfe4eb;   /* sidebar active item               */
    --rl-text:          #2c3e50;   /* primary text                     */
    --rl-text-light:    #5a6a7e;   /* secondary / muted text           */
    --rl-accent:        #2a9d8f;   /* primary accent — muted teal      */
    --rl-accent-hover:  #21867a;   /* accent hover — slightly darker   */
    --rl-accent-pale:   #e8f5f3;   /* accent tint backgrounds          */
    --rl-border:        #e2e6ec;   /* borders                          */
    --rl-border-light:  #eef0f4;   /* very subtle borders              */
    --rl-code-bg:       #f5f6f8;   /* inline code background           */
    --rl-code-block-bg: #f8f9fb;   /* code block background            */
    --rl-shadow:        0 1px 4px rgba(0,0,0,.06);
    --rl-shadow-md:     0 2px 8px rgba(0,0,0,.07);
    --rl-note-bg:       #eef7f6;
    --rl-tip-bg:        #edf7ee;
    --rl-warn-bg:       #fdf6e3;
    --rl-table-head:    #f0f3f7;
    --rl-caption:       #7c879a;
    --rl-radius:        6px;
}


/* ----- Global resets ------------------------------------------------ */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
                 "Helvetica Neue", Arial, sans-serif;
}


/* ----- Navigation sidebar ------------------------------------------ */
.wy-nav-side {
    background: var(--rl-sidebar-bg) !important;
    border-right: 1px solid var(--rl-border);
}

.wy-side-nav-search {
    background: var(--rl-sidebar-bg) !important;
    border-bottom: 1px solid var(--rl-border);
    padding: 18px 12px 14px;
}

.wy-side-nav-search a,
.wy-side-nav-search .wy-dropdown > a {
    color: var(--rl-text) !important;
    font-weight: 700;
    font-size: 1.05em;
}

.wy-side-nav-search input[type="text"] {
    border: 1px solid var(--rl-border);
    border-radius: var(--rl-radius);
    background: var(--rl-surface);
    color: var(--rl-text);
    padding: 6px 10px;
}
.wy-side-nav-search input[type="text"]::placeholder {
    color: var(--rl-text-light);
}

/* menu links */
.wy-menu-vertical {
    color: var(--rl-text-light);
}

.wy-menu-vertical a {
    color: var(--rl-text) !important;
    padding: 6px 16px 6px 20px;
    border-left: 3px solid transparent;
    transition: background .12s, border-color .12s, color .12s;
}

.wy-menu-vertical a:hover {
    background: var(--rl-sidebar-hover) !important;
    color: var(--rl-accent) !important;
}

/* RTD current page highlight */
.wy-menu-vertical li.current > a {
    background: var(--rl-sidebar-active) !important;
    border-left-color: var(--rl-accent) !important;
    color: var(--rl-accent) !important;
    font-weight: 600;
}

/* Sub-items under the current page — normal weight, no highlight */
.wy-menu-vertical li.toctree-l1.current li.toctree-l2 > a,
.wy-menu-vertical li.toctree-l1.current li.toctree-l3 > a {
    background: transparent !important;
    border-left-color: transparent !important;
    font-weight: 400;
    color: var(--rl-text) !important;
}

/* Scroll-spy: highlight the section currently in viewport */
.wy-menu-vertical a.scrollspy-active {
    background: var(--rl-accent-pale) !important;
    border-left-color: var(--rl-accent) !important;
    color: var(--rl-accent-hover) !important;
    font-weight: 600;
}

/* Make sure scroll-spy wins over sub-item reset */
.wy-menu-vertical li.toctree-l1.current li.toctree-l2 > a.scrollspy-active,
.wy-menu-vertical li.toctree-l1.current li.toctree-l3 > a.scrollspy-active {
    background: var(--rl-accent-pale) !important;
    border-left-color: var(--rl-accent) !important;
    color: var(--rl-accent-hover) !important;
    font-weight: 600;
}

.wy-menu-vertical li.toctree-l1.current > a {
    border-bottom: 1px solid var(--rl-border-light);
}

/* captions */
.wy-menu-vertical p.caption {
    color: var(--rl-caption) !important;
    text-transform: uppercase;
    font-size: .7em;
    letter-spacing: 1.2px;
    margin-top: 1.3em;
    padding-left: 20px;
}


/* ----- Content area ------------------------------------------------- */
.wy-nav-content-wrap {
    background: var(--rl-bg);
}

.wy-nav-content {
    max-width: 900px;
    background: var(--rl-surface);
    border-radius: 8px;
    box-shadow: var(--rl-shadow-md);
    margin: 20px auto;
    padding: 32px 40px 48px;
}


/* ----- Typography --------------------------------------------------- */
.rst-content h1,
.rst-content h2,
.rst-content h3,
.rst-content h4 {
    color: var(--rl-text);
    font-weight: 700;
}

.rst-content h1 {
    border-bottom: 2px solid var(--rl-accent);
    padding-bottom: .3em;
    margin-bottom: .6em;
}

.rst-content h2 {
    border-bottom: 1px solid var(--rl-border);
    padding-bottom: .2em;
    margin-top: 1.8em;
}

.rst-content p,
.rst-content li,
.rst-content dd,
.rst-content td {
    color: var(--rl-text);
    line-height: 1.72;
}


/* ----- Links -------------------------------------------------------- */
.rst-content a,
.rst-content a:visited {
    color: var(--rl-accent);
}

.rst-content a:hover {
    color: var(--rl-accent-hover);
    text-decoration: underline;
}

.wy-breadcrumbs a {
    color: var(--rl-accent) !important;
}


/* ----- Inline code -------------------------------------------------- */
.rst-content code,
.rst-content tt {
    background: var(--rl-code-bg);
    color: #476582;
    border: 1px solid var(--rl-border-light);
    border-radius: 4px;
    padding: 1px 5px;
    font-size: .87em;
}


/* ----- Code blocks (light) ------------------------------------------ */
.rst-content .highlight {
    background: var(--rl-code-block-bg) !important;
    border: 1px solid var(--rl-border);
    border-radius: var(--rl-radius);
    box-shadow: none;
}

.rst-content .highlight pre {
    background: transparent !important;
    color: var(--rl-text);
    padding: 14px 18px;
    line-height: 1.55;
    font-size: .87em;
}

/* Light-theme syntax highlighting (One Light inspired) */
.rst-content .highlight .k,
.rst-content .highlight .kn,
.rst-content .highlight .kd  { color: #8959a8; }   /* keywords — purple  */
.rst-content .highlight .s,
.rst-content .highlight .s1,
.rst-content .highlight .s2  { color: #50a14f; }   /* strings — green    */
.rst-content .highlight .nb,
.rst-content .highlight .bp  { color: #b76e00; }   /* builtins — amber   */
.rst-content .highlight .nn,
.rst-content .highlight .nc  { color: #c18401; }   /* names / classes    */
.rst-content .highlight .nf  { color: #4078f2; }   /* functions — blue   */
.rst-content .highlight .mi,
.rst-content .highlight .mf  { color: #986801; }   /* numbers            */
.rst-content .highlight .c,
.rst-content .highlight .c1,
.rst-content .highlight .cm  { color: #a0a1a7; font-style: italic; }
.rst-content .highlight .o,
.rst-content .highlight .p   { color: #383a42; }   /* operators          */
.rst-content .highlight .nt  { color: #e45649; }   /* YAML keys — red    */
.rst-content .highlight .l,
.rst-content .highlight .l-Scalar { color: #50a14f; } /* YAML values     */
.rst-content .highlight .na  { color: #986801; }   /* attributes         */
.rst-content .highlight .gp  { color: #2a9d8f; }   /* shell prompt       */


/* ----- Admonitions -------------------------------------------------- */
.rst-content .admonition {
    border-radius: var(--rl-radius);
    border: 1px solid var(--rl-border);
    box-shadow: none;
    margin: 1.4em 0;
}

.rst-content .admonition-title {
    font-weight: 700;
    border-radius: var(--rl-radius) var(--rl-radius) 0 0;
}

.rst-content .note {
    background: var(--rl-note-bg);
    border-color: #b2d8d4;
}
.rst-content .note .admonition-title {
    background: #2a9d8f;
    color: #fff;
}

.rst-content .tip,
.rst-content .hint {
    background: var(--rl-tip-bg);
    border-color: #b5d9b7;
}
.rst-content .tip .admonition-title,
.rst-content .hint .admonition-title {
    background: #3a9e4a;
    color: #fff;
}

.rst-content .warning,
.rst-content .caution {
    background: var(--rl-warn-bg);
    border-color: #e8d9aa;
}
.rst-content .warning .admonition-title,
.rst-content .caution .admonition-title {
    background: #e6a817;
    color: #fff;
}

.rst-content .seealso {
    background: var(--rl-accent-pale);
    border-color: #b2d8d4;
    border-left: 4px solid var(--rl-accent);
}
.rst-content .seealso .admonition-title {
    background: var(--rl-accent);
    color: #fff;
}


/* ----- Tables ------------------------------------------------------- */
.rst-content table.docutils {
    border-collapse: separate;
    border-spacing: 0;
    border-radius: var(--rl-radius);
    overflow: hidden;
    border: 1px solid var(--rl-border);
    box-shadow: none;
}

.rst-content table.docutils th {
    background: var(--rl-table-head);
    color: var(--rl-text);
    font-weight: 600;
    text-align: left;
    padding: 10px 14px;
    border: none;
    border-bottom: 2px solid var(--rl-border);
}

.rst-content table.docutils td {
    padding: 10px 14px;
    border-top: 1px solid var(--rl-border-light);
    border-left: none;
    border-right: none;
}

.rst-content table.docutils tr:nth-child(even) td {
    background: var(--rl-bg);
}


/* ----- Top nav bar (mobile) ----------------------------------------- */
.wy-nav-top {
    background: var(--rl-sidebar-bg) !important;
    border-bottom: 1px solid var(--rl-border);
}

.wy-nav-top a {
    color: var(--rl-text) !important;
}

.wy-nav-top i {
    color: var(--rl-accent);
}


/* ----- Footer ------------------------------------------------------- */
footer {
    color: var(--rl-text-light);
}

footer a {
    color: var(--rl-accent) !important;
}


/* ----- Scrollbar ---------------------------------------------------- */
.wy-side-scroll::-webkit-scrollbar {
    width: 5px;
}
.wy-side-scroll::-webkit-scrollbar-track {
    background: var(--rl-sidebar-bg);
}
.wy-side-scroll::-webkit-scrollbar-thumb {
    background: var(--rl-border);
    border-radius: 3px;
}
.wy-side-scroll::-webkit-scrollbar-thumb:hover {
    background: #c0c6d0;
}


/* ----- Badges ------------------------------------------------------- */
.rst-content img[alt="Python 3.9+"],
.rst-content img[alt="License"],
.rst-content img[alt="Version 0.1.0"] {
    margin-right: 4px;
}


/* ----- Responsive --------------------------------------------------- */
@media (max-width: 768px) {
    .wy-nav-content {
        padding: 18px 16px 30px;
        margin: 8px;
        border-radius: 0;
        box-shadow: none;
    }
}
