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

:root {
    --ink: #17231d;
    --muted: #718078;
    --soft: #f4f7f5;
    --line: #e2e9e5;
    --green: #356b51;
    --red: #d64545;
    --red-light: #fdf0f0;
    --white: #ffffff;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    color: var(--ink);
    background: var(--soft);
    line-height: 1.5;
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    width: min(1140px, calc(100% - 40px));
    margin: 0 auto;
}


/* HEADER */

.site-header {
    background: rgba(255,255,255,0.94);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(12px);
}

.header-inner {
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 19px;
    font-weight: 800;
    letter-spacing: -0.7px;
}

.logo-mark {
    position: relative;
    width: 27px;
    height: 27px;
    display: grid;
    place-items: center;
}

.logo-mark i {
    position: absolute;
    display: block;
    border: 1.5px solid var(--red);
    border-radius: 50%;
}

.logo-mark i:nth-child(1) {
    width: 7px;
    height: 7px;
    background: var(--red);
}

.logo-mark i:nth-child(2) {
    width: 17px;
    height: 17px;
    opacity: 0.55;
}

.logo-mark i:nth-child(3) {
    width: 27px;
    height: 27px;
    opacity: 0.25;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 30px;
    color: #69756f;
    font-size: 13px;
    font-weight: 700;
}

.main-nav a {
    transition: color 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--ink);
}


/* INTRO */

.intro-section {
    background:
        radial-gradient(
            circle at 88% 50%,
            rgba(214,69,69,0.07),
            transparent 26%
        ),
        var(--white);
    border-bottom: 1px solid var(--line);
}

.intro-inner {
    min-height: 425px;
    display: grid;
    grid-template-columns: 1fr 440px;
    align-items: center;
    gap: 70px;
}

.eyebrow {
    display: block;
    margin-bottom: 13px;
    color: var(--green);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1.9px;
}

.intro-copy h1 {
    max-width: 650px;
    font-size: clamp(48px, 6vw, 72px);
    line-height: 0.98;
    letter-spacing: -4px;
}

.intro-copy h1 em {
    color: var(--red);
    font-style: normal;
}

.intro-copy p {
    max-width: 500px;
    margin-top: 23px;
    color: var(--muted);
    font-size: 16px;
}


/* LATEST EVENT */

.latest-event {
    position: relative;
    padding: 27px;
    overflow: hidden;
    background: var(--white);
    border: 1px solid #dce5df;
    border-radius: 18px;
    box-shadow: 0 18px 45px rgba(30,50,40,0.07);
}

.latest-event::after {
    content: "";
    position: absolute;
    width: 220px;
    height: 220px;
    right: -90px;
    bottom: -110px;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(214,69,69,0.15),
        rgba(214,69,69,0) 70%
    );
}

.latest-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #8a9690;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1.5px;
}

.latest-top b {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--green);
    font-size: 8px;
}

.latest-top b i {
    width: 6px;
    height: 6px;
    display: block;
    border-radius: 50%;
    background: #4a9c72;
    box-shadow: 0 0 0 4px rgba(74,156,114,0.1);
}

.latest-main {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: flex-end;
    gap: 20px;
    margin-top: 28px;
}

.latest-magnitude {
    display: flex;
    align-items: baseline;
    gap: 5px;
}

.latest-magnitude strong {
    color: var(--red);
    font-size: 67px;
    line-height: 0.8;
    letter-spacing: -5px;
}

.latest-magnitude span {
    color: #9caaa2;
    font-size: 9px;
    font-weight: 800;
}

.latest-place {
    min-width: 0;
    padding-bottom: 3px;
}

.latest-place strong {
    display: block;
    overflow: hidden;
    font-size: 15px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.latest-place span {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 11px;
}

.latest-meta {
    position: relative;
    z-index: 2;
    display: flex;
    gap: 28px;
    margin-top: 29px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.latest-meta span {
    color: var(--ink);
    font-size: 12px;
}

.latest-meta small {
    display: block;
    margin-bottom: 3px;
    color: #9aa59f;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 1px;
}


/* NUMBERS */

.numbers-section {
    padding: 0;
    background: var(--white);
}

.numbers-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1.2fr 1.2fr;
    border-right: 1px solid var(--line);
    border-left: 1px solid var(--line);
}

.number-item,
.number-action {
    min-height: 125px;
    padding: 23px;
    border-right: 1px solid var(--line);
}

.number-item:last-child,
.number-action:last-child {
    border-right: 0;
}

.number-item > span {
    display: block;
    margin-bottom: 8px;
    color: #929d97;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 1.4px;
}

.number-item strong {
    font-size: 29px;
    line-height: 1;
}

.number-item small {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-size: 10px;
}

.number-item.largest strong {
    color: var(--red);
}

.number-action {
    padding: 0;
    border-right: 0;
}

.number-action a {
    height: 100%;
    padding: 23px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--red-light);
    transition: background 0.2s ease;
}

.number-action a:hover {
    background: #fae8e8;
}

.number-action span {
    max-width: 130px;
    font-size: 12px;
    font-weight: 700;
}

.number-action strong {
    color: var(--red);
    font-size: 24px;
}


/* SECTIONS */

.earthquakes-section,
.map-section,
.cities-section,
.source-section,
.faq-section {
    padding: 82px 0;
}

.section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 25px;
    margin-bottom: 27px;
}

.section-header h2 {
    font-size: 31px;
    line-height: 1;
    letter-spacing: -1.3px;
}

.section-header p {
    margin-top: 8px;
    color: var(--muted);
    font-size: 13px;
}

.text-link {
    color: var(--green);
    font-size: 11px;
    font-weight: 800;
}

.text-link span {
    margin-left: 5px;
}


/* EARTHQUAKES */

.earthquake-feed {
    border-top: 1px solid var(--line);
}

.feed-header {
    height: 38px;
    display: grid;
    grid-template-columns: 100px 1fr 120px 120px 25px;
    align-items: center;
    gap: 20px;
    color: #a0aaa5;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 1.2px;
}

.earthquake-row {
    min-height: 76px;
    display: grid;
    grid-template-columns: 100px 1fr 120px 120px 25px;
    align-items: center;
    gap: 20px;
    border-bottom: 1px solid var(--line);
    transition:
        background 0.2s ease,
        padding 0.2s ease;
}

.earthquake-row:hover {
    padding-left: 9px;
    padding-right: 9px;
    background: var(--white);
}

.row-magnitude {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.row-magnitude strong {
    color: var(--red);
    font-size: 22px;
    letter-spacing: -0.8px;
}

.row-magnitude span {
    color: #a0aaa5;
    font-size: 8px;
    font-weight: 800;
}

.row-location {
    min-width: 0;
}

.row-location strong {
    display: block;
    overflow: hidden;
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.row-location span {
    display: block;
    margin-top: 2px;
    color: #89958e;
    font-size: 10px;
}

.row-depth {
    color: #64726b;
    font-size: 12px;
}

.row-time {
    display: flex;
    flex-direction: column;
    font-size: 10px;
}

.row-time span {
    color: #98a29d;
}

.row-time strong {
    margin-top: 2px;
    font-size: 12px;
}

.row-arrow {
    color: #9ca7a2;
    font-size: 17px;
}

.earthquake-row:hover .row-arrow {
    color: var(--red);
}


/* MAP */

.map-section {
    background: var(--white);
}

.map-container {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: 0 18px 45px rgba(30,50,40,0.07);
}

#earthquake-map {
    width: 100%;
    height: 500px;
}

.map-badge {
    position: absolute;
    z-index: 500;
    top: 15px;
    left: 15px;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 9px 12px;
    background: rgba(255,255,255,0.94);
    border: 1px solid rgba(220,229,223,0.8);
    border-radius: 7px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    font-size: 9px;
    font-weight: 800;
}

.map-badge i {
    width: 6px;
    height: 6px;
    display: block;
    border-radius: 50%;
    background: var(--red);
}


/* MARKERS */

.earthquake-marker-wrapper {
    border: 0;
    background: transparent;
}

.earthquake-marker {
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(166,38,38,0.75) 0%,
        rgba(214,69,69,0.4) 28%,
        rgba(214,69,69,0.14) 55%,
        rgba(214,69,69,0) 82%
    );
    animation: markerPulse 2.5s ease-in-out infinite;
}

@keyframes markerPulse {

    0%,
    100% {
        transform: scale(0.92);
        opacity: 0.75;
    }

    50% {
        transform: scale(1.06);
        opacity: 1;
    }

}


/* CITIES */

.cities-section {
    background: var(--soft);
}

.cities-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    border-top: 1px solid var(--line);
    border-left: 1px solid var(--line);
}

.city-card {
    min-height: 100px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 22px 24px;
    background: var(--white);
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

.city-card:hover {
    background: #fbfcfb;
}

.city-number {
    display: block;
    margin-bottom: 5px;
    color: #a1aaa5;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 1px;
}

.city-card h3 {
    font-size: 15px;
}

.city-count {
    margin-left: auto;
    text-align: right;
}

.city-count strong {
    display: block;
    font-size: 21px;
    line-height: 1;
}

.city-count span {
    color: #929d97;
    font-size: 9px;
}

.city-arrow {
    color: #a2aca7;
    font-size: 17px;
}

.city-card:hover .city-arrow {
    color: var(--red);
}


/* FAQ */

.faq-section {
    background: var(--white);
}

.faq-container {
    max-width: 820px;
}

.faq-list {
    border-top: 1px solid var(--line);
}

.faq-item {
    border-bottom: 1px solid var(--line);
}

.faq-question {
    position: relative;
    padding: 22px 45px 22px 0;
    cursor: pointer;
    font-size: 15px;
    font-weight: 700;
}

.faq-question span {
    position: absolute;
    top: 17px;
    right: 4px;
    color: var(--green);
    font-size: 21px;
    font-weight: 400;
    transition: transform 0.2s ease;
}

.faq-item.open .faq-question span {
    transform: rotate(45deg);
}

.faq-answer {
    display: none;
    padding: 0 45px 22px 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.75;
}

.faq-item.open .faq-answer {
    display: block;
}

.dv-source-update {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 20px 0;
    border-top: 1px solid var(--line);
}

.dv-source-update small {
    color: var(--muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1px;
}

.dv-source-update strong {
    color: var(--ink);
    font-size: 12px;
    font-weight: 700;
}

/* TABLET */

@media (max-width: 850px) {

    .intro-inner {
        grid-template-columns: 1fr;
        gap: 35px;
        padding: 65px 0;
    }

    .latest-event {
        max-width: 560px;
    }

    .numbers-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .number-item:nth-child(2) {
        border-right: 0;
    }

    .number-action {
        border-top: 1px solid var(--line);
    }

    .feed-header,
    .earthquake-row {
        grid-template-columns: 85px 1fr 100px 100px 20px;
        gap: 13px;
    }

}


/* MOBILE */

@media (max-width: 600px) {

    .container {
        width: min(100% - 24px, 1140px);
    }

    .header-inner {
        height: 62px;
    }

    .main-nav {
        display: none;
    }

    .intro-inner {
        padding: 52px 0;
    }

    .intro-copy h1 {
        font-size: 48px;
        letter-spacing: -2.8px;
    }

    .intro-copy p {
        font-size: 14px;
    }

    .latest-event {
        padding: 21px;
    }

    .latest-main {
        gap: 13px;
    }

    .latest-magnitude strong {
        font-size: 55px;
    }

    .latest-place strong {
        font-size: 13px;
    }

    .latest-meta {
        gap: 18px;
    }

    .numbers-grid {
        grid-template-columns: 1fr 1fr;
    }

    .number-item,
    .number-action {
        min-height: 110px;
        padding: 17px;
    }

    .number-item strong {
        font-size: 24px;
    }

    .number-action a {
        padding: 17px;
    }

    .earthquakes-section,
    .map-section,
    .cities-section,
    .source-section,
    .faq-section {
        padding: 58px 0;
    }

    .section-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .section-header h2 {
        font-size: 27px;
    }

    .feed-header {
        display: none;
    }

    .earthquake-row {
        grid-template-columns: 62px 1fr 20px;
        gap: 10px;
        padding: 15px 0;
    }

    .row-depth,
    .row-time {
        display: none;
    }

    .row-magnitude strong {
        font-size: 20px;
    }

    #earthquake-map {
        height: 420px;
    }

    .cities-grid {
        grid-template-columns: 1fr;
    }

    .city-card {
        min-height: 86px;
    }

    .footer-inner {
        min-height: 100px;
        align-items: flex-start;
        justify-content: center;
        flex-direction: column;
    }

}



.source-card {
    border: 1px solid var(--line);
    background: var(--soft);
    padding: 32px 34px 0;
}

.source-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--line);
}

.source-status {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
}

.source-status i {
    display: block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--green);
}

.source-card-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
    padding: 30px 0;
}

.source-card-title {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    max-width: 620px;
}

.source-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 54px;
    width: 54px;
    height: 54px;
    border: 1px solid #cfdad4;
    background: var(--white);
    color: var(--red);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: -.5px;
}

.source-card-title h2 {
    margin: 0 0 10px;
    color: var(--ink);
    font-size: 22px;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -.6px;
}

.source-card-title p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.7;
}

.source-card-info {
    display: flex;
    gap: 38px;
    flex-shrink: 0;
}

.source-card-info div {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.source-card-info small {
    color: var(--muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1px;
}

.source-card-info strong {
    max-width: 190px;
    color: var(--ink);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.5;
}

.source-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 52px;
    border-top: 1px solid var(--line);
    color: var(--ink);
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

.source-link span {
    color: var(--green);
    font-size: 17px;
    transition: transform .2s ease;
}

.source-link:hover span {
    transform: translate(3px, -3px);
}

@media (max-width: 900px) {

    .source-card-content {
        align-items: flex-start;
        flex-direction: column;
        gap: 28px;
    }

    .source-card-info {
        width: 100%;
    }

}

@media (max-width: 600px) {

   

    .source-card {
        padding: 25px 20px 0;
    }

    .source-card-top {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    .source-card-content {
        padding: 25px 0;
    }

    .source-card-title {
        gap: 14px;
    }

    .source-icon {
        flex-basis: 46px;
        width: 46px;
        height: 46px;
        font-size: 11px;
    }

    .source-card-title h2 {
        font-size: 19px;
    }

    .source-card-title p {
        font-size: 12px;
    }

    .source-card-info {
        flex-direction: column;
        gap: 18px;
    }

}



/* MAP POPUP */
.dv-map-popup .leaflet-popup-content-wrapper {
    padding: 0;
    background: #ffffff;
    border: 1px solid #dfe7e2;
    border-radius: 14px;
    box-shadow: 0 12px 35px rgba(23,35,29,0.14);
}

.dv-map-popup .leaflet-popup-content {
    width: 245px !important;
    margin: 0;
}

.dv-map-popup .leaflet-popup-tip {
    background: #ffffff;
    box-shadow: 2px 2px 5px rgba(23,35,29,0.05);
}

.dv-map-popup .leaflet-popup-close-button {
    top: 9px !important;
    right: 10px !important;
    width: 24px !important;
    height: 24px !important;
    color: #8b9690 !important;
    font-size: 18px !important;
    font-weight: 400 !important;
    line-height: 24px !important;
    z-index: 5;
}

.dv-map-popup .leaflet-popup-close-button:hover {
    color: var(--red) !important;
}

.dv-popup-inner {
    padding: 17px 18px 15px;
}

.dv-popup-top {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 9px;
    padding-right: 20px;
}

.dv-popup-magnitude {
    color: var(--red);
    font-size: 22px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.8px;
}

.dv-popup-type {
    padding: 4px 7px;
    border-radius: 5px;
    background: #f5f8f6;
    color: var(--green);
    font-size: 8px;
    font-weight: 800;
    letter-spacing: .7px;
    text-transform: uppercase;
}

.dv-popup-location {
    display: block;
    margin-bottom: 13px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
    color: var(--ink);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
}

.dv-popup-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 14px;
}

.dv-popup-meta-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.dv-popup-meta-item small {
    color: #9aa59f;
    font-size: 7px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.dv-popup-meta-item strong {
    color: var(--ink);
    font-size: 10px;
    font-weight: 700;
}

.dv-popup-detail {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 34px;
    padding: 0 11px;
    border-radius: 7px;
    background: var(--red-light);
    color: var(--red);
    font-size: 9px;
    font-weight: 800;
    transition: background .2s ease;
}

.dv-popup-detail:hover {
    background: #fae5e5;
}

.dv-popup-detail span {
    font-size: 14px;
    font-weight: 400;
}