:root {
    --eu-navy: #0b2239;
    --eu-navy-deep: #061524;
    --eu-blue: #1d4ed8;
    --eu-gold: #eab308;
    --eu-bg: #f8fafc;
    --eu-surface: #ffffff;
    --eu-border: #cbd5e1;
    --eu-line-soft: #e2e8f0;
    --eu-text: #0f172a;
    --eu-body: #334155;
    --eu-muted: #64748b;
    --eu-badge-bg: #eff6ff;
    --eu-badge-txt: #1e40af;
}

/* 1. Ironclad Anti-Overflow Reset */
*, *::before, *::after {
    box-sizing: border-box;
}
html {
    overflow-x: clip;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}
body {
    margin: 0;
    width: 100%;
    max-width: 100vw;
    overflow-x: clip;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--eu-bg);
    color: var(--eu-text);
    line-height: 1.65;
    font-size: 16px;
}
main, section, article, aside, nav, header, footer, div {
    min-width: 0;
}
img, svg, video {
    max-width: 100%;
    height: auto;
    display: block;
}
p, h1, h2, h3, h4, li, td, th, code, a, span {
    overflow-wrap: anywhere;
    word-break: break-word;
}
code {
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.88em;
}
a {
    color: var(--eu-blue);
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}
.eu-wrap {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 2. Top Institutional Bar */
.eu-topbar {
    background: var(--eu-navy-deep);
    color: #cbd5e1;
    font-size: 12.5px;
    padding: 8px 0;
    border-bottom: 2px solid var(--eu-gold);
}
.eu-topbar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 16px;
}
.eu-topbar-links {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}
.eu-topbar a {
    color: #e2e8f0;
}

/* 3. Responsive Header */
.eu-header {
    background: var(--eu-navy);
    color: #ffffff;
    padding: 20px 0;
}
.eu-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}
.eu-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    color: #ffffff !important;
    text-decoration: none !important;
    min-width: 0;
}
.eu-emblem {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background: #1e3a8a;
    border: 1.5px solid var(--eu-gold);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: var(--eu-gold);
    font-size: 13.5px;
    letter-spacing: 0.8px;
    flex-shrink: 0;
}
.eu-brand-title {
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.08rem, 2vw, 1.32rem);
    font-weight: 700;
    display: block;
    line-height: 1.25;
}
.eu-brand-sub {
    font-size: 12.5px;
    color: #94a3b8;
    display: block;
    line-height: 1.3;
}
.eu-search {
    display: flex;
    gap: 6px;
    width: 100%;
    max-width: 330px;
}
.eu-search input {
    padding: 9px 13px;
    border-radius: 6px;
    border: 1px solid #334155;
    background: #0f2d4a;
    color: #fff;
    flex: 1 1 0%;
    min-width: 0;
    width: 100%;
    font-size: 14px;
}
.eu-search input::placeholder {
    color: #94a3b8;
}
.eu-search button {
    padding: 9px 16px;
    background: var(--eu-gold);
    color: #071626;
    border: none;
    border-radius: 6px;
    font-weight: 700;
    font-size: 13.5px;
    cursor: pointer;
    flex-shrink: 0;
    white-space: nowrap;
}

/* 4. Sector Nav (Wrapped on Desktop, Touch Scroll on Mobile) */
.eu-nav {
    background: #ffffff;
    border-bottom: 1px solid var(--eu-line-soft);
    position: sticky;
    top: 0;
    z-index: 30;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.03);
}
.eu-nav-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 10px 0;
}
.eu-nav-list li {
    flex-shrink: 0;
}
.eu-nav-list a {
    display: inline-block;
    padding: 7px 13px;
    border-radius: 6px;
    color: #334155;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    text-decoration: none !important;
    background: #f8fafc;
    border: 1px solid var(--eu-line-soft);
    transition: all 0.15s ease;
}
.eu-nav-list a:hover {
    background: var(--eu-badge-bg);
    color: var(--eu-badge-txt);
    border-color: #bfdbfe;
}
.eu-nav-list a.active {
    background: var(--eu-navy);
    color: #ffffff;
    border-color: var(--eu-navy);
}

/* 5. Hero Banner */
.eu-hero {
    background: linear-gradient(135deg, #0b2239 0%, #1e3a8a 100%);
    color: #fff;
    padding: 32px 0;
    margin-bottom: 24px;
}
.eu-hero h1 {
    font-family: Georgia, serif;
    font-size: clamp(1.4rem, 2.6vw, 2rem);
    margin: 0 0 10px;
    line-height: 1.28;
}
.eu-hero p {
    margin: 0;
    color: #dbeafe;
    max-width: 800px;
    font-size: clamp(0.92rem, 1.4vw, 1rem);
}

/* 6. Symmetrical Card Grid (3 Col Desktop -> 2 Col Tablet -> 1 Col Mobile) */
.eu-section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    border-bottom: 2px solid var(--eu-navy);
    padding-bottom: 10px;
    margin: 24px 0 18px;
}
.eu-section-head h1,
.eu-section-head h2 {
    font-family: Georgia, serif;
    font-size: clamp(1.15rem, 2vw, 1.35rem);
    margin: 0;
    color: var(--eu-navy);
}
.eu-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 48px;
}
.eu-card {
    background: var(--eu-surface);
    border: 1px solid var(--eu-line-soft);
    border-radius: 10px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    min-width: 0;
    transition: box-shadow 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}
.eu-card:hover {
    border-color: #93c5fd;
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(15, 41, 66, 0.08);
}
.eu-card-top {
    display: flex;
    gap: 13px;
    align-items: flex-start;
    margin-bottom: 12px;
    min-width: 0;
}
.eu-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    object-fit: cover;
    border: 1px solid var(--eu-line-soft);
    flex-shrink: 0;
    background: #f1f5f9;
}
.eu-card-meta {
    min-width: 0;
    flex: 1;
}
.eu-card-sector {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--eu-badge-txt);
    background: var(--eu-badge-bg);
    padding: 2px 8px;
    border-radius: 4px;
    margin-bottom: 5px;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.eu-card h3 {
    margin: 0;
    font-size: 16px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.eu-card h3 a {
    color: var(--eu-navy);
}
.eu-card-dev {
    font-size: 12px;
    color: var(--eu-muted);
    margin-top: 3px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.eu-card-desc {
    font-size: 13.8px;
    color: var(--eu-body);
    margin: 0 0 14px;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.eu-card-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding-top: 11px;
    border-top: 1px solid #f1f5f9;
    font-size: 13px;
    margin-top: auto;
}
.eu-verified-pill {
    color: #15803d;
    font-weight: 600;
    font-size: 12px;
    white-space: nowrap;
}

/* 7. Audit Detail Layout (Strict minmax(0, 1fr)!) */
.eu-breadcrumb {
    font-size: 13px;
    color: var(--eu-muted);
    padding: 16px 0 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}
.eu-audit-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 28px;
    align-items: start;
    margin: 8px 0 48px;
}
.eu-article {
    background: var(--eu-surface);
    border: 1px solid var(--eu-line-soft);
    border-radius: 12px;
    padding: 28px;
    min-width: 0;
    max-width: 100%;
}
.eu-audit-header {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--eu-line-soft);
    margin-bottom: 20px;
}
.eu-audit-icon {
    width: 80px;
    height: 80px;
    border-radius: 16px;
    border: 1px solid var(--eu-border);
    flex-shrink: 0;
    object-fit: cover;
}
.eu-article h1 {
    font-family: Georgia, serif;
    font-size: clamp(1.3rem, 2.4vw, 1.7rem);
    color: var(--eu-navy);
    margin: 0 0 8px;
    line-height: 1.3;
}
.eu-mobile-cta {
    display: none;
    margin: 0 0 20px;
}
.eu-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}
.eu-badge {
    font-size: 11.5px;
    font-weight: 600;
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
    padding: 3px 9px;
    border-radius: 5px;
}
.eu-article h2 {
    font-family: Georgia, serif;
    font-size: clamp(1.12rem, 1.9vw, 1.28rem);
    color: var(--eu-navy);
    margin: 28px 0 12px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--eu-line-soft);
}
.eu-callout {
    background: #f8fafc;
    border-left: 4px solid var(--eu-blue);
    border-radius: 0 8px 8px 0;
    padding: 14px 18px;
    margin: 18px 0;
    font-size: 14.3px;
    color: var(--eu-body);
}
.eu-modules {
    list-style: none;
    padding: 0;
    margin: 14px 0;
    display: grid;
    gap: 10px;
}
.eu-modules li {
    background: #f8fafc;
    border: 1px solid var(--eu-line-soft);
    border-radius: 8px;
    padding: 11px 14px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    font-size: 14.2px;
}
.eu-mod-code {
    font-family: monospace;
    font-size: 11.5px;
    font-weight: 700;
    background: var(--eu-navy);
    color: #fff;
    padding: 2px 7px;
    border-radius: 4px;
    flex-shrink: 0;
    margin-top: 2px;
}

/* Responsive Fixed-Bounds Table */
.eu-matrix {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    margin: 14px 0;
    font-size: 14px;
}
.eu-matrix th, .eu-matrix td {
    border: 1px solid var(--eu-line-soft);
    padding: 10px 13px;
    text-align: left;
    vertical-align: top;
}
.eu-matrix th {
    background: #f8fafc;
    width: 36%;
    color: var(--eu-navy);
    font-weight: 600;
}
.eu-matrix td {
    width: 64%;
}

/* Bounded Screenshots Strip */
.eu-shots {
    display: flex;
    gap: 12px;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    padding: 4px 2px 14px;
}
.eu-shots img {
    height: 220px;
    width: auto;
    max-width: 78vw;
    border-radius: 10px;
    border: 1px solid var(--eu-border);
    flex-shrink: 0;
    object-fit: cover;
}

/* Sticky Sidebar */
.eu-aside {
    position: sticky;
    top: 68px;
    min-width: 0;
}
.eu-side-box {
    background: var(--eu-surface);
    border: 1px solid var(--eu-line-soft);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 18px;
}
.eu-side-box h3 {
    font-family: Georgia, serif;
    font-size: 16.5px;
    margin: 0 0 10px;
    color: var(--eu-navy);
}
.eu-play-btn {
    display: block;
    text-align: center;
    background: #0f766e;
    color: #ffffff !important;
    font-weight: 700;
    font-size: 15px;
    padding: 13px 18px;
    border-radius: 8px;
    text-decoration: none !important;
    margin: 12px 0;
    box-shadow: 0 3px 10px rgba(15, 118, 110, 0.22);
}
.eu-play-btn:hover {
    background: #115e59;
}
.eu-faq-item {
    border-bottom: 1px solid var(--eu-line-soft);
    padding: 13px 0;
}
.eu-faq-item h3 {
    font-size: 15.5px;
    margin: 0 0 6px;
    color: var(--eu-navy);
}
.eu-faq-item p {
    margin: 0;
    font-size: 14.2px;
    color: var(--eu-body);
}

/* Footer */
.eu-footer {
    background: var(--eu-navy);
    color: #cbd5e1;
    padding: 38px 0 28px;
    margin-top: 40px;
    font-size: 13.5px;
}
.eu-footer a {
    color: #f8fafc;
}
.eu-footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 28px;
}

/* =========================================================================
   RESPONSIVE BREAKPOINTS
   ========================================================================= */
@media (max-width: 1024px) {
    .eu-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .eu-audit-layout {
        grid-template-columns: minmax(0, 1fr);
    }
    .eu-aside {
        position: static;
    }
    .eu-mobile-cta {
        display: block;
    }
}

@media (max-width: 820px) {
    .eu-header-row {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    .eu-search {
        max-width: 100%;
    }
    .eu-nav-list {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .eu-nav-list::-webkit-scrollbar {
        display: none;
    }
    .eu-footer-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 22px;
    }
}

@media (max-width: 640px) {
    .eu-wrap {
        padding: 0 14px;
    }
    .eu-topbar-inner {
        font-size: 11.5px;
    }
    .eu-hero {
        padding: 22px 0;
    }
    .eu-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 14px;
    }
    .eu-article {
        padding: 18px 15px;
    }
    .eu-audit-header {
        gap: 13px;
    }
    .eu-audit-icon {
        width: 64px;
        height: 64px;
    }
    .eu-matrix, .eu-matrix tbody, .eu-matrix tr, .eu-matrix th, .eu-matrix td {
        display: block;
        width: 100%;
    }
    .eu-matrix tr {
        margin-bottom: 10px;
        border: 1px solid var(--eu-line-soft);
        border-radius: 8px;
        overflow: hidden;
    }
    .eu-matrix th {
        border: none;
        border-bottom: 1px solid var(--eu-line-soft);
        padding: 7px 12px;
        font-size: 12.5px;
    }
    .eu-matrix td {
        border: none;
        padding: 8px 12px;
    }
    .eu-shots img {
        height: 190px;
    }
}
