/* ==========================================================================
   GUIDE VIEW SPECIFIC STRUCTURAL OVERRIDES
   ========================================================================== */
.content {
    margin-left: 240px;    /* Hardcoded alignment position setting backup */
    padding: 40px;
    max-width: 80ch;
}

p {
    margin-top: 0;
    margin-bottom: 1.5rem;
    text-align: left;       /* Enforces a structured, flush left margin text layout */
}

li { 
    margin: 0 0 4px 0; 
}

/* ==========================================================================
   TYPOGRAPHY HIERARCHY
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Libre Baskerville', 'Baskerville', serif;
    color: #1a1a1a;
    line-height: 1.3;
    margin-top: 2.2rem;
    margin-bottom: 0.8rem;
    font-weight: 700;
}

h1 { font-size: 2.0rem; }
h2 { font-size: 1.6rem; border-bottom: 1px solid #e3dec9; padding-bottom: 0.3rem; }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.1rem; font-weight: 400; font-style: italic; color: #495057; }

/* --- Micro-Typography Styles --- */
sup {
    font-size: 75%;
    line-height: 0;
    position: relative;
    vertical-align: baseline;
    top: -0.5em;
}

.title-style { font-style: italic; }
.author-cite { font-variant: small-caps; letter-spacing: 0.05em; }

/* --- Footnotes & Citations --- */
footer.footnotes li {
    font-size: 14px;
    line-height: 1.5;
    color: #6c757d;
    margin-bottom: 0.5rem;
}

/* ==========================================================================
   INTERACTIVE ANCHOR LINK MECHANICS
   ========================================================================== */
.content a[href^="http"] {
    text-decoration: underline;
    color: #212529;
}

.content a[href^="http"]::after {
    content: " \2197";
    font-size: 0.75em;
    color: #868e96;
    margin-left: 3px;
    display: inline-block;
}

.content a[href^="http"]:hover { color: #000000; }
.content a[href^="http"]:hover::after { color: #1a1a1a; }

.content a[href^="#"] {
    text-decoration: underline dotted #495057 1px; 
    text-underline-offset: 3px;
    color: #495057;
    transition: all 0.15s ease;
}

.content a:hover {
    color: #000000;
    text-decoration: underline solid #000000 2px; 
}

.content a[href^="#"]:hover {
    text-decoration: underline dotted #000000 2px;
}

/* ==========================================================================
   GUIDE SPECIFIC DATA TABLES
   ========================================================================== */
th, td {
    word-wrap: break-word;
    white-space: normal;
    text-align: left;
}

th { font-weight: bold; }
th:nth-child(1) { width: 300px; }
th:nth-child(2) { width: 225px; }

/* ==========================================================================
   SIDEBAR MENU TREE SYSTEM
   ========================================================================== */
.sidebar {
    width: 220px;
    height: 100vh;
    position: fixed;
    top: 0; bottom: 0; left: 0;
    background-color: #f7f4eb;
    border-right: 1px solid #e3dec9;
    padding: 40px 0;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar .sidebar-title {
    font-family: 'Libre Baskerville', 'Baskerville', serif;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #7c7460;
    margin: 0 0 12px 0;
    padding: 0 12px 16px 12px;
    border-bottom: 1px solid #e3dec9;
}

.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar li { display: block; margin: 0; padding: 0; }
.sidebar a {
    display: block;
    font-size: 13px;
    line-height: 1.3;
    padding: 6px 12px;
    color: #495057;
    text-decoration: none;
    transition: all 0.15s ease-in-out;
}
.sidebar a:hover { background-color: #eee9d7; color: #1a1a1a; }

/* Nesting Indentation Mechanics */
.sidebar ul ul a       { padding-left: 24px; }
.sidebar ul ul ul a    { padding-left: 36px; font-style: italic; font-size: 12.5px; }
.sidebar ul ul ul ul a { padding-left: 48px; }

.sidebar ul ul {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    border-left: 2px solid #cbd0b3;
    margin-left: 12px;
    transition: max-height 0.3s ease-out, opacity 0.2s ease-out;
}

.sidebar li.open > ul {
    max-height: 1000px;
    opacity: 1;
    margin-bottom: 4px;
}

/* Interactive Dropdown Carets */
.sidebar li:has(ul) > a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-right: 16px;
}

.sidebar li:has(ul) > a::after {
    content: "▾";
    font-size: 12px;
    color: #868e96;
    margin-left: 8px;
    transition: transform 0.2s ease-in-out, color 0.15s ease-in-out;
}

.sidebar li.open > a::after { transform: rotate(180deg); color: #212529; }
.sidebar li:has(ul):hover > a::after { color: #212529; }