* {
    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;
}

button,
select {
    font-family: inherit;
}

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

.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-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-copy {
    min-height: 310px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

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

.intro-copy h1 {
    max-width: 700px;
    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: 620px;
    margin-top: 23px;
    color: var(--muted);
    font-size: 16px;
}

.map-section {
    padding: 55px 0 0;
    background: var(--white);
}

.filter-bar {
    display: flex;
    align-items: flex-end;
    gap: 14px;
    padding: 18px;
    margin-bottom: 18px;
    background: var(--soft);
    border: 1px solid var(--line);
    border-radius: 14px;
}

.filter-group {
    flex: 1;
}

.filter-group label {
    display: block;
    margin-bottom: 7px;
    color: #8b9690;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 1.2px;
}

.filter-group select {
    width: 100%;
    height: 42px;
    padding: 0 12px;
    color: var(--ink);
    background: var(--white);
    border: 1px solid #dce5df;
    border-radius: 7px;
    outline: none;
    font-size: 12px;
    cursor: pointer;
}

.filter-group select:focus {
    border-color: var(--green);
}

.reset-button {
    height: 42px;
    padding: 0 17px;
    color: var(--green);
    background: var(--white);
    border: 1px solid #dce5df;
    border-radius: 7px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s ease;
}

.reset-button:hover {
    background: var(--red-light);
    color: var(--red);
    border-color: #f0cccc;
}

.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: 680px;
}

.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);
}

.map-count {
    position: absolute;
    z-index: 500;
    right: 15px;
    bottom: 15px;
    display: flex;
    align-items: baseline;
    gap: 6px;
    padding: 10px 13px;
    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);
}

.map-count strong {
    color: var(--red);
    font-size: 16px;
}

.map-count span {
    color: #7d8983;
    font-size: 9px;
    font-weight: 700;
}

.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;
    }
}

.popup-content {
    min-width: 170px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.popup-content strong {
    color: var(--red);
    font-size: 17px;
}

.popup-content span {
    color: var(--ink);
    font-size: 12px;
    font-weight: 700;
}

.popup-content small {
    color: var(--muted);
    font-size: 10px;
}

.popup-content a {
    margin-top: 5px;
    color: var(--green);
    font-size: 10px;
    font-weight: 800;
}

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

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

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

.number-item: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);
}

.earthquakes-section,
.info-section,
.faq-section {
    padding: 82px 0;
}

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

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

.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;
}

.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);
}

.empty-state {
    padding: 40px 0;
    color: var(--muted);
    text-align: center;
    font-size: 13px;
}

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

.info-content {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.8;
}

.info-content p + p {
    margin-top: 18px;
}

.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(0deg);
}

.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;
}

.site-footer {
    background: #101b16;
    color: #7f9087;
}

.footer-inner {
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    font-size: 10px;
}

.footer-logo {
    color: #dce6e1;
    font-size: 13px;
    font-weight: 800;
}

@media (max-width: 850px) {

    .filter-bar {
        flex-wrap: wrap;
    }

    .filter-group {
        min-width: calc(50% - 7px);
    }

    .reset-button {
        width: 100%;
    }

    #earthquake-map {
        height: 580px;
    }

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

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

    .number-item:nth-child(3),
    .number-item:nth-child(4) {
        border-top: 1px solid var(--line);
    }

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

@media (max-width: 600px) {

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

    .header-inner {
        height: 62px;
    }

    .main-nav {
        display: none;
    }

    .intro-copy {
        min-height: 270px;
    }

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

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

    .filter-bar {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .filter-group {
        min-width: 0;
    }

    .filter-group:last-of-type {
        grid-column: 1 / -1;
    }

    .reset-button {
        grid-column: 1 / -1;
    }

    #earthquake-map {
        height: 500px;
    }

    .map-count {
        right: 10px;
        bottom: 10px;
    }

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

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

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

    .earthquakes-section,
    .info-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;
    }

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