:root {
    color-scheme: light;
    --ink: #202325;
    --muted: #686e72;
    --line: #d9dddf;
    --paper: #fff;
    --bg: #f2f3f1;
    --accent: #243b34;
    --soft: #eef3f0
}

* {
    box-sizing: border-box
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font: 16px/1.55 system-ui, -apple-system, "Segoe UI", sans-serif;
    min-height: 100vh;
    padding: 24px
}

.card {
    width: min(900px, 100%);
    margin: auto;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: clamp(24px, 6vw, 54px);
    box-shadow: 0 16px 50px #1d29231a
}

.hero {
    display: flex;
    gap: 18px;
    align-items: flex-start
}

.mark {
    font: 44px/1 Georgia, serif;
    color: var(--accent)
}

h1 {
    font: 700 clamp(30px, 6vw, 50px)/1.1 Georgia, serif;
    margin: 0 0 8px
}

.lead {
    color: var(--muted);
    margin: 0 0 30px
}

label {
    display: block;
    font-weight: 700;
    margin-bottom: 8px
}

.search-form>input {
    width: 100%
}

.filters {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 12px;
    align-items: end;
    margin-top: 14px
}

.filters input {
    width: 100%
}

input {
    min-width: 0;
    border: 1px solid #aeb6b2;
    border-radius: 10px;
    padding: 14px 16px;
    font: inherit
}

input:focus {
    outline: 3px solid #a8c4b7;
    outline-offset: 1px;
    border-color: var(--accent)
}

button {
    height: 52px;
    border: 0;
    border-radius: 10px;
    background: var(--accent);
    color: white;
    padding: 14px 28px;
    font: 700 16px/1 inherit;
    cursor: pointer
}

button:hover {
    filter: brightness(1.12)
}

button:disabled {
    opacity: .45;
    cursor: not-allowed
}

.notice,
.results {
    margin-top: 30px
}

.notice {
    padding: 20px;
    border-radius: 12px
}

.notice h2,
.results h2 {
    font-size: 21px;
    margin: 0 0 8px
}

.notice p,
.section-note {
    margin: 0;
    color: var(--muted)
}

.neutral {
    background: var(--soft)
}

.error {
    background: #fff0ef;
    color: #812b22
}

.section-title {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center
}

.section-title a {
    color: var(--accent)
}

.person {
    border-top: 1px solid var(--line);
    padding: 18px 0
}

.person strong {
    font-size: 19px
}

.person dl {
    display: flex;
    gap: 34px;
    margin: 10px 0 0
}

.person dl div {
    display: grid
}

.person dt {
    font-size: 13px;
    color: var(--muted)
}

.person dd {
    margin: 0;
    font-weight: 650
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    flex-wrap: wrap;
    border-top: 1px solid var(--line);
    padding-top: 22px
}

.pagination button {
    height: 42px;
    min-width: 42px;
    padding: 8px 13px;
    background: var(--soft);
    color: var(--accent);
    border: 1px solid var(--line)
}

.pagination button.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent)
}

.pagination span {
    color: var(--muted)
}

.latest {
    border-top: 1px solid var(--line);
    padding-top: 28px
}

.latest-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 24px;
    margin-top: 14px
}

.compact {
    display: grid;
    gap: 3px
}

.compact span,
.compact small {
    color: var(--muted)
}

footer {
    border-top: 1px solid var(--line);
    margin-top: 34px;
    padding-top: 18px;
    color: var(--muted);
    font-size: 13px
}

footer p {
    margin: 4px 0
}

@media(max-width:650px) {
    body {
        padding: 12px
    }

    .card {
        border-radius: 12px
    }

    .filters,
    .latest-grid {
        grid-template-columns: 1fr
    }

    .filters button {
        width: 100%
    }

    .person dl {
        gap: 18px;
        flex-wrap: wrap
    }

    .hero {
        gap: 10px
    }

    .mark {
        font-size: 36px
    }

    .section-title {
        align-items: flex-start
    }

    .pagination {
        gap: 5px
    }

    .pagination button {
        padding: 7px 10px
    }
}

.site-logo {
    flex: 0 0 auto;
    border-radius: 13px
}

.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin: 4px 0 8px
}

.stats div {
    background: var(--soft);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 16px 14px;
    display: flex;
    align-items: center
}

.stats p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.45
}

.stats strong {
    font: 700 20px/1.2 Georgia, serif;
    color: var(--accent);
    white-space: nowrap
}

.freshness {
    margin: 0 0 26px;
    color: var(--muted);
    font-size: 13px
}

.about {
    margin-top: 32px;
    padding: 20px;
    background: var(--soft);
    border-radius: 12px
}

.about h2 {
    font-size: 20px;
    margin: 0 0 7px
}

.about p {
    margin: 0;
    color: var(--muted)
}

footer a {
    color: var(--accent)
}

@media(max-width:650px) {
    .stats {
        grid-template-columns: 1fr 1fr
    }

    .stats strong {
        font-size: 18px
    }

    .site-logo {
        width: 46px;
        height: 46px
    }
}

.site-nav {
    display: flex;
    gap: 8px;
    margin: -12px 0 26px
}

.site-nav a {
    color: var(--accent);
    text-decoration: none;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 7px 13px;
    font-size: 14px
}

.site-nav a[aria-current=page] {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent)
}

.wide-card {
    width: min(1120px, 100%)
}

.stats-summary {
    margin-top: 0
}

.statistics-note,
.statistics-updated {
    color: var(--muted);
    font-size: 13px
}

.statistics-section {
    margin-top: 34px
}

.statistics-section h2 {
    font-size: 21px;
    margin: 0 0 8px
}

.statistics-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px
}

.bar-row {
    display: grid;
    grid-template-columns: minmax(84px, 130px) 1fr auto;
    gap: 10px;
    align-items: center;
    margin: 8px 0;
    font-size: 13px
}

.bar-row>span {
    overflow: hidden;
    text-overflow: ellipsis
}

.bar-row>strong {
    font-variant-numeric: tabular-nums
}

.bar-track {
    height: 12px;
    background: var(--soft);
    border-radius: 99px;
    overflow: hidden
}

.bar-track i {
    display: block;
    height: 100%;
    background: #6e9181;
    border-radius: 99px
}

.year-chart {
    max-height: 520px;
    overflow: auto;
    padding-right: 8px
}

.ranking {
    margin: 14px 0 0;
    padding-left: 30px
}

.ranking li {
    padding: 7px 0 7px 5px;
    border-bottom: 1px solid var(--line)
}

.ranking li::marker {
    color: var(--muted)
}

.ranking li span {
    display: inline-block;
    width: calc(100% - 90px)
}

.ranking li strong {
    float: right
}

.statistics-updated {
    margin-top: 32px
}

@media(max-width:760px) {
    .statistics-columns {
        grid-template-columns: 1fr;
        gap: 0
    }

    .bar-row {
        grid-template-columns: 92px 1fr auto
    }

    .wide-card {
        padding-left: 20px;
        padding-right: 20px
    }
}

.visitor-counter {
    width: max-content;
    min-width: 190px;
    display: grid;
    gap: 2px;
    background: var(--soft);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 14px 16px;
    margin: 0 0 18px;
    color: var(--muted);
    font-size: 12px
}

.visitor-counter strong {
    font: 700 21px/1.2 Georgia, serif;
    color: var(--accent);
    white-space: nowrap
}

@media(max-width:650px) {
    .site-nav {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        margin: 0 0 24px
    }

    .site-nav a {
        display: flex;
        align-items: center;
        justify-content: center;
        min-width: 0;
        min-height: 44px;
        padding: 8px 7px;
        text-align: center;
        font-size: 13px;
        line-height: 1.2;
        white-space: normal;
        overflow-wrap: anywhere
    }

    .pagination button {
        max-width: 100%;
        white-space: normal
    }

    .section-title {
        flex-wrap: wrap
    }
}