/* --- Modern CSS Reset & Core Variables --- */
:root {
    --primary-color: #1e3a8a;
    --secondary-color: #3b82f6;
    --text-dark: #1f2937;
    --text-light: #4b5563;
    --bg-light: #f8fafc;
    --white: #ffffff;
    --warning-bg: #fef2f2;
    --warning-border: #ef4444;
    --warning-text: #991b1b;
    --border-color: #cbd5e1;
    --radius: 8px;
    --transition: all 0.25s ease;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text-dark);
    background-color: var(--bg-light);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Header Section --- */
.site-header {
    background-color: var(--white);
    border-bottom: 4px solid var(--warning-border);
    padding: 40px 0 30px 0;
    margin-bottom: 40px;
}

.site-header h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    font-weight: 800;
}

.site-header h1 .subtitle {
    font-weight: 300;
    font-size: 1.8rem;
    color: var(--text-light);
    display: inline-block;
}

.version-notice {
    background-color: #f1f5f9;
    border-left: 4px solid var(--secondary-color);
    padding: 15px 20px;
    border-radius: 0 var(--radius) var(--radius) 0;
    font-size: 1rem;
    color: var(--text-dark);
}

/* --- Responsive Two-Column Layout --- */
.main-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    margin-bottom: 60px;
}

@media (min-width: 992px) {
    .main-layout {
        grid-template-columns: 7fr 4fr;
    }
}

/* --- Data & Tables --- */
.specs-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.specs-card h2 {
    color: var(--primary-color);
    margin-bottom: 5px;
}

.specs-source {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 20px;
}

.specs-source a {
    color: var(--secondary-color);
    text-decoration: none;
}

.specs-source a:hover {
    text-decoration: underline;
}

.table-responsive {
    overflow-x: auto;
}

.specs-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.95rem;
}

.specs-table th {
    background-color: #f1f5f9;
    padding: 12px 15px;
    font-weight: 600;
    border-bottom: 2px solid var(--border-color);
}

.specs-table td {
    padding: 14px 15px;
    border-bottom: 1px solid #e2e8f0;
}

.value-high {
    color: #c2410c;
    font-weight: 700;
}

.value-critical {
    color: var(--warning-border);
    font-weight: 700;
}

/* --- Checklist Intro --- */
.intro-box {
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 30px;
    margin-bottom: 40px;
}

.intro-box h3 {
    margin-bottom: 15px;
    color: var(--primary-color);
}

.checklist {
    list-style: none;
    margin: 20px 0;
}

.checklist li {
    position: relative;
    padding-left: 30px;
    margin-bottom: 12px;
}

.checklist li::before {
    content: "⚠️";
    position: absolute;
    left: 0;
    top: 1px;
}

.verdict-text {
    border-top: 1px dashed var(--border-color);
    padding-top: 20px;
    font-weight: 500;
}

/* --- Warning Callouts --- */
.warning-callout {
    background-color: var(--warning-bg);
    border: 1px solid var(--warning-border);
    border-left: 6px solid var(--warning-border);
    border-radius: var(--radius);
    padding: 25px;
    margin: 25px 0;
    color: var(--warning-text);
}

.warning-callout h4 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* --- Navigation Links --- */
.document-nav {
    background: #f1f5f9;
    padding: 20px;
    border-radius: var(--radius);
    margin-bottom: 40px;
}

.document-nav h3 {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-light);
    margin-bottom: 10px;
}

.document-nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 20px;
}

.document-nav a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
}

.document-nav a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* --- Correspondence Cards --- */
.letter-card {
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 30px;
    margin-bottom: 30px;
    position: relative;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
}

.badge {
    position: absolute;
    top: -12px;
    right: 20px;
    padding: 4px 12px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 20px;
    color: var(--white);
}

.badge-incident { background-color: var(--warning-border); }
.badge-reply { background-color: #059669; }
.badge-expert { background-color: #7c3aed; }
.badge-report { background-color: #475569; }

.letter-card h3 {
    margin-bottom: 5px;
    padding-right: 120px;
}

.letter-card .meta {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 20px;
}

.letter-body p {
    margin-bottom: 15px;
}

.letter-body p:last-child {
    margin-bottom: 0;
}

.signature {
    margin-top: 20px;
    border-top: 1px solid #e2e8f0;
    padding-top: 10px;
}

/* --- Quotes & Citations --- */
.closing-quote {
    background: #e2e8f0;
    border-left: 4px solid var(--text-light);
    padding: 20px;
    border-radius: 0 var(--radius) var(--radius) 0;
    font-style: italic;
    margin: 40px 0;
}

.closing-quote cite {
    display: block;
    font-style: normal;
    font-weight: 600;
    margin-top: 10px;
    font-size: 0.9rem;
    color: var(--text-light);
}

/* --- Sidebar Image Gallery --- */
.sticky-sidebar {
    position: sticky;
    top: 20px;
}

.content-sidebar h2 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.gallery-intro {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 25px;
}

.image-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

@media (min-width: 600px) and (max-width: 991px) {
    .image-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.image-item {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.image-item img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: calc(var(--radius) - 4px);
    object-fit: cover;
}

.image-item .caption {
    display: block;
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: 8px;
    padding: 0 4px;
    line-height: 1.3;
}

/* --- Footer --- */
.site-footer {
    background-color: var(--primary-color);
    color: #93c5fd;
    padding: 30px 0;
    font-size: 0.9rem;
    text-align: center;
}