/* Basic Reset & Font Setup */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: #eee; /* Light text */
    background-color: #1a1a2e; /* Dark blue background */
    font-size: 16px;
}

.container {
    width: 90%;
    max-width: 960px;
    margin: auto;
    overflow: hidden;
    padding: 0 20px;
}

/* Header & Navigation */
header {
    background: #0f0f1a; /* Very dark blue */
    color: #fff;
    padding-top: 30px;
    min-height: 70px;
    border-bottom: #e94560 3px solid; /* Accent color */
    text-align: center;
}

header h1 {
    font-family: 'Titillium Web', sans-serif;
    font-size: 2.5rem;
    margin-bottom: 5px;
    color: #e94560; /* Accent color */
    text-transform: uppercase;
    letter-spacing: 1px;
}

header .subtitle {
    font-size: 1.1rem;
    color: #bbb;
    margin-bottom: 20px;
}

nav {
    background: #16213e; /* Slightly lighter dark blue */
    padding: 10px 0;
    margin-bottom: 30px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

nav ul {
    list-style: none;
    text-align: center;
}

nav ul li {
    display: inline-block; /* Changed from inline */
    margin: 0 10px; /* Added spacing */
}

nav a {
    color: #ccc;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 0.9rem;
    padding: 10px 15px; /* Increased padding */
    transition: background-color 0.3s ease, color 0.3s ease;
    border-radius: 4px; /* Added subtle rounding */
    display: block; /* Ensures padding applies correctly */
}

nav a:hover,
nav a.active {
    color: #fff;
    background-color: #e94560; /* Accent color on hover/active */
}

/* Main Content Area */
main {
    padding-bottom: 60px; /* Space for footer */
}

article {
    background: #16213e; /* Same as nav background */
    padding: 30px;
    margin-top: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

article h2 {
    font-family: 'Titillium Web', sans-serif;
    color: #e94560; /* Accent color */
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 2px solid #303956; /* Subtle divider */
    font-size: 2rem;
}

article h3 {
    font-family: 'Titillium Web', sans-serif;
    color: #c5c6c7; /* Lighter grey */
    margin-top: 25px;
    margin-bottom: 15px;
    font-size: 1.6rem;
}

article h4 {
    font-family: 'Titillium Web', sans-serif;
    color: #a9a9a9; /* Medium grey */
    margin-top: 20px;
    margin-bottom: 10px;
    font-size: 1.3rem;
}

article p {
    margin-bottom: 15px;
    color: #dcdcdc; /* Slightly off-white */
}

article strong {
    color: #e94560; /* Accent for important text */
    font-weight: 700;
}

article code {
    background: #2c3e50; /* Dark slate blue */
    color: #ecf0f1; /* Light grey */
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.95em;
}

article ol, article ul {
    margin-left: 30px;
    margin-bottom: 15px;
}

article li {
    margin-bottom: 10px;
}

article hr {
    border: 0;
    height: 1px;
    background: #303956; /* Subtle divider color */
    margin: 30px 0;
}

/* Tables */
table {
    width: 100%;
    margin-top: 20px;
    margin-bottom: 20px;
    border-collapse: collapse;
    box-shadow: 0 2px 3px rgba(0,0,0,0.2);
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #303956; /* Subtle row separator */
}

thead th {
    background-color: #2a364f; /* Darker header background */
    color: #e94560; /* Accent color */
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9em;
}

tbody tr:nth-child(even) {
    background-color: #1f2a40; /* Slightly different row color for striping */
}

tbody tr:hover {
    background-color: #2c3955; /* Hover effect */
}

/* Links */
a {
    color: #5fa8d3; /* Light blue link */
    text-decoration: none;
}

a:hover {
    color: #8ac9e6; /* Lighter blue on hover */
    text-decoration: underline;
}

article a { /* Specific styling for links within the article */
    color: #6bb7e4;
    font-weight: bold;
}

article a:hover {
    color: #95d8f1;
}

/* References List Specifics */
#references-list {
    list-style-type: decimal;
    margin-left: 20px;
}

#references-list li {
    margin-bottom: 12px;
    padding-left: 5px;
}

#references-list li a {
    margin-left: 5px;
    font-style: italic;
    font-size: 0.9em;
}


/* Footer */
footer {
    background: #0f0f1a; /* Very dark blue */
    color: #888;
    text-align: center;
    padding: 20px 0;
    margin-top: 40px;
    border-top: 1px solid #303956;
    font-size: 0.9rem;
}

footer a {
    color: #aaa;
}

footer a:hover {
    color: #ccc;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }
    nav ul li {
        display: block;
        margin: 5px 0;
    }
    nav a {
        padding: 8px 10px;
    }
    article h2 {
        font-size: 1.8rem;
    }
    article h3 {
        font-size: 1.4rem;
    }
     article h4 {
        font-size: 1.2rem;
    }
    table, thead, tbody, th, td, tr {
        display: block; /* Force table elements to behave like blocks */
    }
    thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px; /* Hide table headers */
    }
    tr {
        border: 1px solid #303956;
        margin-bottom: 10px;
    }
    td {
        border: none;
        border-bottom: 1px solid #2a364f;
        position: relative;
        padding-left: 50%; /* Make space for label */
        text-align: right;
    }
    td:before { /* Add labels using data attributes or ::before */
        position: absolute;
        left: 10px;
        width: 45%;
        padding-right: 10px;
        white-space: nowrap;
        text-align: left;
        font-weight: bold;
        color: #e94560; /* Accent color for labels */
    }
    /* Manually add content for :before for each column type - requires knowing the table structure */
    /* Example for a 3-column table */
    td:nth-of-type(1):before { content: "Setting"; }
    td:nth-of-type(2):before { content: "Value"; }
    td:nth-of-type(3):before { content: "Rationale"; }
    /* Example for the Driver Table */
    /* Need to be careful if columns change */
    #driver-table td:nth-of-type(1):before { content: "Order"; }
    #driver-table td:nth-of-type(2):before { content: "Type"; }
    #driver-table td:nth-of-type(3):before { content: "Source"; }
    #driver-table td:nth-of-type(4):before { content: "Notes"; }
}