:root {
    --navy: #07182d;
    --navy-soft: #102544;
    --sand: #d8bb7c;
    --sand-soft: #efe4c7;
    --white: #f8fafc;
    --ink: #132235;
    --muted: #6a7685;
    --line: rgba(255, 255, 255, 0.12);
    --surface: #0f223c;
    --surface-light: #ffffff;
    --shadow: 0 20px 50px rgba(7, 24, 45, 0.16);
}

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: "IBM Plex Sans", sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at top right, rgba(216, 187, 124, 0.18), transparent 28%),
        linear-gradient(180deg, #f9fbfd 0%, #eef2f8 100%);
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
main { min-height: 70vh; }
.container { width: min(1120px, calc(100% - 2rem)); margin: 0 auto; }
.narrow { width: min(760px, 100%); }
h1, h2, h3, h4 { font-family: "Newsreader", serif; line-height: 1.05; margin: 0 0 0.8rem; }
h1 { font-size: clamp(2.7rem, 7vw, 5rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: 1.3rem; }
p { line-height: 1.7; margin: 0 0 1rem; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.16em; color: var(--sand); font-size: 0.78rem; font-weight: 700; }
.lead { font-size: 1.1rem; color: #42546a; }
.dual-copy { color: #d5dec9; margin-top: 1.25rem; }
.site-header {
    position: sticky; top: 0; z-index: 10;
    backdrop-filter: blur(18px);
    background: rgba(7, 24, 45, 0.88);
    border-bottom: 1px solid var(--line);
}
.nav-shell { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 0; }
.locale-switcher { display: flex; align-items: center; gap: 0.4rem; color: #d8e2ef; font-size: 0.82rem; }
.locale-switcher a { padding: 0.28rem 0.5rem; border-radius: 999px; border: 1px solid rgba(255,255,255,0.14); }
.locale-switcher a.is-active { background: rgba(216, 187, 124, 0.18); color: var(--sand-soft); border-color: rgba(216, 187, 124, 0.4); }
.brand { display: flex; align-items: center; gap: 1rem; color: var(--white); }
.brand strong, .brand small { display: block; }
.brand small { color: #afbdd1; font-size: 0.8rem; }
.brand-mark {
    width: 3rem; height: 3rem; border-radius: 50%;
    display: grid; place-items: center;
    background: linear-gradient(180deg, var(--sand), #9e7740);
    color: var(--navy); font-weight: 700;
}
.site-nav { display: flex; align-items: center; gap: 1rem; color: #e8edf5; }
.link-button, .menu-toggle { border: 0; background: transparent; color: inherit; cursor: pointer; font: inherit; }
.menu-toggle { display: none; }
.button {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0.95rem 1.2rem; border-radius: 999px; font-weight: 700;
    background: linear-gradient(135deg, var(--sand), #f0d59a);
    color: var(--navy); box-shadow: var(--shadow); border: 0;
}
.button-secondary { background: transparent; color: var(--white); border: 1px solid rgba(255,255,255,0.28); box-shadow: none; }
.button-small { padding: 0.7rem 1rem; }
.hero, .page-hero {
    background:
        radial-gradient(circle at 20% 10%, rgba(216,187,124,0.18), transparent 24%),
        linear-gradient(180deg, var(--navy) 0%, var(--navy-soft) 100%);
    color: var(--white);
}
.hero { padding: 5rem 0; }
.page-hero { padding: 4rem 0 3rem; }
.hero-grid { display: grid; grid-template-columns: 1.3fr 0.9fr; gap: 2rem; align-items: center; }
.hero-panel, .card, .table-card, .map-card, .form-card {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(11, 31, 56, 0.08);
    border-radius: 24px;
    box-shadow: var(--shadow);
}
.hero-panel { padding: 2rem; background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02)); border-color: rgba(255,255,255,0.1); }
.metric-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.metric-grid.three-up { grid-template-columns: repeat(3, 1fr); margin-bottom: 1.5rem; }
.metric-grid article {
    padding: 1rem; border-radius: 18px; background: rgba(255,255,255,0.08); color: var(--white);
}
.metric-grid.three-up article { background: var(--surface-light); color: var(--ink); }
.metric-grid strong { display: block; font-size: 2rem; margin-bottom: 0.3rem; }
.starfield { position: relative; height: 180px; margin-top: 1.5rem; border-radius: 20px; background: linear-gradient(180deg, rgba(255,255,255,0.12), transparent); overflow: hidden; }
.starfield span { position: absolute; width: 8px; height: 8px; border-radius: 50%; background: var(--sand-soft); animation: drift 5s ease-in-out infinite; }
.starfield span:nth-child(1) { top: 30px; left: 40px; }
.starfield span:nth-child(2) { top: 72px; right: 55px; animation-delay: 1s; }
.starfield span:nth-child(3) { bottom: 44px; left: 120px; animation-delay: 2s; }
.starfield span:nth-child(4) { bottom: 32px; right: 30px; animation-delay: 3s; }
@keyframes drift { 50% { transform: translateY(-10px) scale(1.15); opacity: 0.7; } }
.section { padding: 4rem 0; }
.section-alt { background: rgba(255,255,255,0.6); }
.section-heading { margin-bottom: 1.5rem; }
.card-grid { display: grid; gap: 1.5rem; }
.card-grid.two { grid-template-columns: repeat(2, 1fr); }
.card-grid.three { grid-template-columns: repeat(3, 1fr); }
.card, .table-card, .map-card, .form-card { padding: 1.5rem; }
.toolbar, .hero-actions, .tag-row, .filters { display: flex; flex-wrap: wrap; gap: 0.85rem; }
.tag { padding: 0.4rem 0.7rem; border-radius: 999px; background: #eef3f9; color: #39506d; font-size: 0.9rem; }
.meta { color: var(--muted); font-size: 0.92rem; }
.form-shell { padding: 3rem 0; }
.form-card { display: grid; gap: 1rem; }
.grid-two { grid-template-columns: repeat(2, 1fr); }
.full { grid-column: 1 / -1; }
label { display: grid; gap: 0.45rem; font-weight: 600; color: #304861; }
input, select, textarea {
    width: 100%; padding: 0.9rem 1rem; border-radius: 14px;
    border: 1px solid #d1dae6; background: #fbfdff; font: inherit;
}
textarea { resize: vertical; }
.check { display: flex; gap: 0.7rem; align-items: flex-start; font-weight: 500; }
.check input { width: auto; margin-top: 0.25rem; }
.checkbox-grid { display: grid; gap: 0.8rem; }
.inline-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.archive-layout { display: grid; grid-template-columns: 420px 1fr; gap: 1.5rem; align-items: start; }
#case-map { height: 500px; border-radius: 16px; overflow: hidden; }
.case-marker-dot {
    width: 14px; height: 14px; border-radius: 50%;
    background: #d8bb7c;
    border: 2px solid #07182d;
    box-shadow: 0 0 0 5px rgba(216, 187, 124, 0.25);
    transition: transform 0.2s ease;
    cursor: pointer;
}
.case-marker-dot:hover { transform: scale(1.3); }
.leaflet-popup-content a { color: #07182d; font-weight: 600; text-decoration: underline; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 0.9rem 0.75rem; border-bottom: 1px solid #e6ebf2; }
th { color: var(--muted); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; }
.site-footer { background: #08192d; color: #d6dfeb; padding: 3rem 0; margin-top: 4rem; }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 1.5rem; }
.footer-grid h3, .footer-grid h4 { color: var(--white); }
.flash { background: #f3e8c8; color: #5a430d; padding: 0.75rem 0; }
.error { color: #8d1e1e; background: #fdecec; padding: 0.9rem 1rem; border-radius: 14px; }
.rtl { direction: rtl; }
.rtl .nav-shell,
.rtl .site-nav,
.rtl .toolbar,
.rtl .hero-actions,
.rtl .tag-row,
.rtl .filters,
.rtl .check,
.rtl .locale-switcher { flex-direction: row-reverse; }
.rtl .brand,
.rtl .card,
.rtl .table-card,
.rtl .form-card,
.rtl .section-heading,
.rtl .page-hero,
.rtl .hero { text-align: right; }
.rtl th,
.rtl td { text-align: right; }

@media (max-width: 900px) {
    .hero-grid, .archive-layout, .card-grid.two, .card-grid.three, .footer-grid, .grid-two, .metric-grid.three-up {
        grid-template-columns: 1fr;
    }
    .menu-toggle { display: inline-flex; color: var(--white); }
    .site-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; padding: 1rem; background: var(--navy); flex-direction: column; align-items: flex-start; }
    .site-nav.is-open { display: flex; }
    .nav-shell { flex-wrap: wrap; }
    .locale-switcher { order: -1; width: 100%; }
}
