:root {
    --primary: #004a99;
    --bg-body: #ffffff;
    --text-main: #212121;
    --border-color: #cccccc;
    --focus-outline: #ff9800;
    --font-multiplier: 1;
}

.high-contrast {
    --primary: #00ffff;
    --bg-body: #000000;
    --text-main: #ffffff;
    --border-color: #ffffff;
    --focus-outline: #00ff00;
}

/* Global Reset for Box Model */
* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    /* Ensure no parent container prevents the fixed positioning */
    overflow-x: hidden;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    font-size: calc(16px * var(--font-multiplier));
    transition: background 0.3s, color 0.3s;
}

.skip-link {
    position: fixed;
    top: -100px;
    left: 0;
    background: var(--primary);
    color: var(--bg-body);
    padding: 10px;
    z-index: 9999;
    text-decoration: none;
    font-weight: bold;
}

.skip-link:focus { top: 0; outline: 3px solid var(--focus-outline); }

/* --- PERSISTENT FIXED HEADER WRAPPER --- */
/* We use position: fixed to ensure it stays at the top of the viewport */
.header-wrapper {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 5000; 
    background-color: var(--bg-body);
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}

.high-contrast .header-wrapper {
    border-bottom: 2px solid var(--primary);
    box-shadow: 0 2px 10px rgba(0, 255, 255, 0.3);
}

/* Accessibility Toolbar */
.accessibility-toolbar {
    background: #f4f4f4;
    padding: 8px 20px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 15px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
}

.high-contrast .accessibility-toolbar { background: #1a1a1a; }

.accessibility-toolbar button {
    cursor: pointer;
    padding: 4px 10px;
    font-size: 13px;
    border: 1px solid #333;
    background: white;
    border-radius: 4px;
}

.high-contrast .accessibility-toolbar button { background: #000; color: #fff; border-color: var(--primary); }

/* Main Header */
header {
    padding: 15px 20px;
    text-align: center;
    background-color: var(--bg-body);
}

header h1 {
    font-size: 1.4rem;
    margin: 0;
    color: var(--primary);
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 12px 0 0 0;
    display: flex;
    justify-content: center;
    gap: 25px;
    flex-wrap: wrap;
}

nav a { 
    text-decoration: none; 
    color: var(--primary); 
    font-weight: bold; 
    padding: 5px 10px;
    border-bottom: 2px solid transparent;
}

nav a:hover, nav a:focus {
    border-bottom: 2px solid var(--primary);
}

nav a:focus { outline: 3px solid var(--focus-outline); outline-offset: 4px; }

/* --- MAIN CONTENT --- */
main { 
    max-width: 1000px; 
    margin: 0 auto;
    padding: 20px;
    /* This padding-top ensures content isn't hidden behind the fixed header */
    padding-top: 180px; 
}

section {
    margin-bottom: 40px;
    padding: 30px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-body);
}

h2 { color: var(--primary); border-bottom: 2px solid var(--primary); padding-bottom: 10px; margin-top: 0; }
h3 { color: var(--primary); margin-top: 25px; border-bottom: 1px solid var(--border-color); padding-bottom: 5px; }

.trust-info {
    background: rgba(0, 74, 153, 0.05);
    padding: 20px;
    border-left: 5px solid var(--primary);
    margin: 20px 0;
}

.high-contrast .trust-info { background: rgba(0, 255, 255, 0.1); }

table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 0.95em; }
th, td { border: 1px solid var(--border-color); padding: 12px; text-align: left; vertical-align: top; }
th { background-color: var(--primary); color: var(--bg-body); width: 35%; }

footer { 
    background: #222; 
    color: white; 
    text-align: center; 
    padding: 40px 20px; 
}

.high-contrast footer { background: #000; border-top: 1px solid var(--primary); }
footer a { color: #8ebfff; }

/* --- RESPONSIVE ADJUSTMENTS --- */
@media (max-width: 768px) {
    main { padding-top: 230px; } /* More padding for wrapped mobile header */
    header h1 { font-size: 1.1rem; }
    nav ul { gap: 12px; margin-top: 10px; }
    nav a { font-size: 0.85rem; padding: 5px; }
    th, td { display: block; width: 100%; }
    th { border-bottom: none; }
}