/* COMPUTATIONAL REALITY - RETRO 2003 THEME (Restored) */

:root {
    --bg-color: #FFFFFF;
    --text-color: #000000;
    --sidebar-bg: #F0F0F0;
    --sidebar-border: #999999;
    --link-blue: #0000EE;
    --link-visited: #551A8B;
    --link-hover: #FF0000;
    --code-bg: #EEEEEE;
    --box-bg: #FFFFE0;
    /* Light Yellow for boxes */

    --font-body: "Times New Roman", Times, serif;
    --font-ui: Verdana, Arial, Helvetica, sans-serif;
    --font-mono: "Courier New", Courier, monospace;

    --sidebar-width: 240px;
}

* {
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.5;
    margin: 0;
    display: flex;
    min-height: 100vh;
}

a {
    color: var(--link-blue);
    text-decoration: underline;
}

a:visited {
    color: var(--link-visited);
}

a:hover {
    color: var(--link-hover);
}

/* SIDEBAR */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--sidebar-border);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    overflow-y: auto;
    padding: 15px;
    font-family: var(--font-ui);
    font-size: 13px;
}

.logo-area {
    margin-bottom: 20px;
    border-bottom: 1px solid #CCC;
    padding-bottom: 10px;
}

.logo-title {
    font-weight: bold;
    font-size: 16px;
    color: #000;
    display: block;
    text-decoration: none;
}

.logo-subtitle {
    font-size: 11px;
    color: #666;
    display: block;
}

.nav-group {
    margin-bottom: 15px;
}

.nav-header {
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
    text-transform: uppercase;
    font-size: 11px;
}

.nav-link {
    display: block;
    padding: 3px 0;
    text-decoration: none;
    color: var(--link-blue);
}

.nav-link.active {
    font-weight: bold;
    color: #000;
    text-decoration: none;
    background: #DDD;
    padding-left: 5px;
}

/* MAIN CONTENT */
.main {
    margin-left: var(--sidebar-width);
    padding: 40px 60px;
    max-width: 800px;
}

h1 {
    font-family: var(--font-ui);
    font-size: 28px;
    border-bottom: 1px solid #CCC;
    padding-bottom: 10px;
    margin-bottom: 20px;
    font-weight: normal;
}

h2 {
    font-family: var(--font-ui);
    font-size: 20px;
    margin-top: 30px;
    border-bottom: 1px solid #EEE;
    padding-bottom: 5px;
}

.chapter-subtitle {
    font-family: var(--font-ui);
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    display: block;
    margin-bottom: 10px;
}

p {
    margin-bottom: 15px;
}

code {
    font-family: var(--font-mono);
    background-color: var(--code-bg);
    padding: 2px 4px;
    font-size: 14px;
}

/* Hard Ending */
.hard-ending {
    margin-top: 40px;
    margin-bottom: 40px;
    padding: 20px;
    border-left: 5px solid #000;
    background: #FAFAFA;
    font-family: var(--font-ui);
    font-style: italic;
}

/* BOXES (Old School Alert Styles) */
.box {
    background-color: var(--box-bg);
    border: 1px solid #999;
    padding: 15px;
    margin: 20px 0;
    font-family: var(--font-ui);
    font-size: 14px;
}

.box-metric {
    background-color: #F0F8FF;
    /* AliceBlue */
    border: 1px solid #B0C4DE;
    border-left: 5px solid #4682B4;
    padding: 10px;
    font-size: 13px;
    font-family: var(--font-mono);
    color: #333;
    margin-bottom: 20px;
}

.box-metric strong {
    color: #4682B4;
    text-transform: uppercase;
    margin-right: 10px;
}

.box-label {
    font-weight: bold;
    display: block;
    margin-bottom: 5px;
    text-transform: uppercase;
    font-size: 11px;
    color: #333;
    border-bottom: 1px dotted #999;
    padding-bottom: 3px;
}

/* FOOTER NAV */
.footer-nav {
    margin-top: 50px;
    padding-top: 20px;
    border-top: 1px solid #CCC;
    display: flex;
    justify-content: space-between;
    font-family: var(--font-ui);
    font-size: 14px;
    clear: both;
    width: 100%;
}

.footer-link {
    font-weight: bold;
}

#go-up-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 2px;
    /* Square */
    background: #CCC;
    color: #000;
    border: 1px solid #999;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

#go-up-btn:hover {
    background: #AAA;
}

/* INTERACTIVE TERMS (Tooltips) */
.term {
    border-bottom: 1px dotted #555;
    cursor: help;
    position: relative;
    color: #222;
}

.term:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%);
    background: #FFFFCC;
    /* Yellow tooltip */
    color: #000;
    border: 1px solid #000;
    padding: 5px;
    font-size: 12px;
    width: 250px;
    z-index: 1000;
    font-family: var(--font-ui);
    pointer-events: none;
    line-height: 1.2;
    text-align: center;
}

/* FAQ / HYPOTHESIS SECTION */
.faq-section {
    margin-top: 40px;
    border-top: 2px solid #EEE;
    padding-top: 20px;
}

.faq-title {
    font-family: var(--font-ui);
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 20px;
    color: #444;
}

details.faq-item {
    margin-bottom: 15px;
    border: 1px solid #CCC;
    background: #FAFAFA;
}

details.faq-item summary {
    padding: 8px 12px;
    cursor: pointer;
    font-weight: bold;
    font-family: var(--font-mono);
    font-size: 13px;
    background: #E0E0E0;
    border-bottom: 1px solid #CCC;
    list-style: none;
}

details.faq-item[open] summary {
    border-bottom: 1px solid #999;
    background: #D0D0D0;
}

details.faq-item summary::-webkit-details-marker {
    display: none;
}

details.faq-item summary::before {
    content: "[+]";
    display: inline-block;
    width: 30px;
    text-align: center;
    margin-right: 10px;
}

details.faq-item[open] summary::before {
    content: "[-]";
}

details.faq-item .faq-content {
    padding: 15px;
    font-family: var(--font-body);
    font-size: 15px;
    border-top: 1px solid #DDD;
    background: #FFF;
}

/* MOBILE */
@media (max-width: 700px) {
    body {
        flex-direction: column;
    }

    .sidebar {
        position: relative;
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid #999;
    }

    .main {
        margin-left: 0;
        padding: 20px;
    }
}