body {
    word-break: keep-all;
    overflow-wrap: break-word;
}

ul.metrics li {
    list-style: none;
    text-align: center;
}
p.value {
    font-size: 2.5rem;
    margin: 0;
}
p.label {
    margin: 0;
}
.hero {
    text-align: center;
    padding: 2rem 1rem;
}
mark {
}
section.stats, section.search {
    margin: 0 0 4rem 0;
}
article {
    margin-block: 0;
    box-shadow: var(--pico-card-box-shadow);
    background: var(--pico-card-background-color);
    border: 0.0625rem solid var(--pico-card-border-color);
    margin-bottom: 1rem;
}
div.recent {
    text-align: center;
}
header a {
    text-decoration: none;
}
footer {
    font-size: 0.75rem;
}
footer ul {
    padding-left: 0;
}
footer ul li {
    list-style-type: none;
}
footer ul li:first-child {
    font-weight: bold;
}
footer a {
    text-decoration: none;
}
a.bmc {
    font-size: 0.75rem;
    padding: 0.2rem 0.3rem 0.3rem 0.2rem;

}
a.amber {
    color: var(--pico-color-zinc-950);
    background-color: var(--pico-color-amber-200);
    border: 0.0625rem solid var(--pico-color-amber-250);
}
a.amber:hover {
    background-color: var(--pico-color-amber-250);
    border-color: var(--pico-color-amber-300);
}
kbd {
    background-color: var(--pico-switch-background-color);
    color: var(--pico-switch-color);
    font-size: 0.5rem;
    padding: 0.25rem;
}
kbd.shortcut {
    background-color: var(--pico-switch-background-color);
}
a {
    text-decoration: none;
}

pre[class*="language-"],
code[class*="language-"] {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
    font-size: 0.75rem !important;
}

.autocomplete-dropdown {
    position: absolute;
    background: var(--pico-background-color);
    border: var(--pico-border-width) solid var(--pico-muted-border-color);
    border-radius: var(--pico-border-radius);
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: var(--pico-card-box-shadow);
    margin-top: 0.25rem;
}

.dropdown-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid var(--pico-muted-border-color);
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover,
.dropdown-item.selected {
    background: var(--pico-primary-focus);
}

.dropdown-item.selected {
    background: var(--pico-primary-focus);
}

/* Network chart fullscreen */
.network-wrapper {
    position: relative;
    height: 50vh;
}

.network-fs-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    z-index: 10;
    padding: 0.35rem 0.6rem;
    background: rgba(0,0,0,0.45);
    border: 1px solid var(--pico-muted-border-color);
    border-radius: 4px;
    color: var(--pico-muted-color);
    cursor: pointer;
    line-height: 1;
    transition: background 0.2s;
}

.network-fs-btn:hover {
    background: rgba(0,0,0,0.7);
    color: var(--pico-primary-inverse);
}

.network-export-btn {
    position: absolute;
    top: 0.5rem;
    right: 3.5rem;
    z-index: 10;
    padding: 0.35rem 0.6rem;
    background: rgba(0,0,0,0.45);
    border: 1px solid var(--pico-muted-border-color);
    border-radius: 4px;
    color: var(--pico-muted-color);
    cursor: pointer;
    line-height: 1;
    transition: background 0.2s;
}
.network-export-btn:hover {
    background: rgba(0,0,0,0.7);
    color: var(--pico-primary-inverse);
}

.globe-toggle-btn {
    position: absolute;
    top: 0.5rem;
    right: 3.5rem;
    z-index: 10;
    padding: 0.35rem 0.6rem;
    background: rgba(0,0,0,0.45);
    border: 1px solid var(--pico-muted-border-color);
    border-radius: 4px;
    color: var(--pico-muted-color);
    cursor: pointer;
    line-height: 1;
    transition: background 0.2s;
}
.globe-toggle-btn:hover {
    background: rgba(0,0,0,0.7);
    color: var(--pico-primary-inverse);
}

.globe-legend {
    position: absolute;
    bottom: 1.5rem;
    left: 1rem;
    z-index: 10;
    background: transparent;
    border: none;
    border-radius: 4px;
    padding: 0.4rem 0.6rem;
    min-width: 120px;
}
.globe-legend-bar {
    height: 8px;
    border-radius: 3px;
    background: linear-gradient(to right, #FFFCD9, #C70039);
}
.globe-legend-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    color: var(--pico-color);
    margin-top: 0.25rem;
}

.network-wrapper.is-fullscreen {
    position: fixed;
    inset: 0;
    height: 100dvh;
    z-index: 1100;
    background: var(--pico-background-color);
}

/* Hero Carousel */
.hero-carousel {
    position: relative;
    overflow: hidden;
}

.hero-carousel-track {
    display: flex;
    transition: transform 0.4s ease;
}

.hero-carousel-slide {
    min-width: 100%;
    box-sizing: border-box;
    padding: 1rem 3rem 1rem 3rem;
}

.hero-carousel-slide article {
    margin: 0;
    border-left: 3px solid var(--pico-primary);
}

.carousel-type-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.carousel-type-actor { background: var(--pico-color-violet-550); color: var(--pico-color-zinc-50); }
.carousel-type-incident { background: var(--pico-color-red-550); color: var(--pico-color-zinc-50); }

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.4);
    border: none;
    color: var(--pico-primary-inverse);
    font-size: 1.5rem;
    width: 2rem;
    height: 2rem;
    cursor: pointer;
    border-radius: var(--pico-border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
    z-index: 10;
}

.carousel-prev { left: 0.5rem; }
.carousel-next { right: 0.5rem; }
.carousel-btn:hover { background: rgba(0,0,0,0.7); }

.carousel-dots {
    position: absolute;
    bottom: 0.5rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.4rem;
    z-index: 10;
}

.carousel-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: var(--pico-muted-border-color);
    border: none;
    cursor: pointer;
    padding: 0;
}

.carousel-dot.active { background: var(--pico-primary); }

.carousel-detail-link {
    font-size: 0.85rem;
    float: right;
}

/* ── Mobile hamburger nav ─────────────────── */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    width: auto;
    margin: 0;
    color: inherit;
}
.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    transition: transform 0.2s, opacity 0.2s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 767px) {
    header nav { flex-wrap: wrap; }
    header nav > ul:first-child { flex: 1; order: 1; }
    .nav-toggle { display: flex; order: 2; margin-left: auto; align-self: center; }
    #nav-menu {
        display: none;
        order: 3;
        width: 100%;
        flex-direction: column;
        padding: 0.5rem 0;
        margin: 0;
    }
    #nav-menu.is-open { display: flex; }
    #nav-menu > li { width: 100%; }
    #nav-menu > li > a,
    #nav-menu > li > details > summary { display: block; padding: 0.5rem 0; }
    #nav-menu details[open] > ul {
        position: static;
        box-shadow: none;
        padding-left: 1rem;
        min-width: unset;
    }
}