:root {
    --bg:       #F8F5F0;
    --text:     #1C1C1C;
    --muted:    #777;
    --accent:   #C0392B;
    --nav-bg:   #1C1C1C;
    --nav-text: #F8F5F0;
    --border:   #1f1f1f;
    --card-bg:  #FFFFFF;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Lato', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    font-size: 16px;
    line-height: 1.7;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

html.i18n-pending {
  visibility: hidden;
}

nav {
    background-color: var(--nav-bg);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

nav .nav-inner {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

nav .logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    color: var(--nav-text);
    text-decoration: none;
    letter-spacing: 0.5px;
}

nav .logo span {
    color: var(--accent);
}

nav ul {
    list-style: none;
    display: flex;
    gap: 8px;
}

nav ul li a {
    color: var(--nav-text);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 8px 14px;
    border-radius: 4px;
    transition: background 0.2s, color 0.2s;
}

nav ul li a:hover {
    background-color: var(--accent);
    color: #fff;
}

.lang-switch {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: 1.25rem;
    padding-left: 1.25rem;
    border-left: 1px solid rgba(248, 245, 240, 0.18);
}

.lang-switch button {
    background: none;
    border: 1px solid rgba(248, 245, 240, 0.35);
    color: var(--nav-text);
    border-radius: 20px;
    padding: 4px 11px;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    opacity: 0.65;
    transition: background-color 0.2s, border-color 0.2s, opacity 0.2s;
}

.lang-switch button:hover { opacity: 1; border-color: var(--nav-text); }
.lang-switch button.active {
    background-color: var(--accent);
    border-color: var(--accent);
    color: #fff;
    opacity: 1;
}

#welcome {
    background-color: var(--nav-bg);
    color: var(--nav-text);
    padding: 25px 24px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

#welcome::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 30% 50%, #3d0f0a 0%, transparent 60%),
                radial-gradient(ellipse at 70% 50%, #0d1a2e 0%, transparent 60%);
}

#welcome .hero-content {
    position: relative;
    max-width: 700px;
    margin: 0 auto;
}

#welcome .tag {
    display: inline-block;
    background-color: var(--accent);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 5px 14px;
    border-radius: 20px;
    margin-bottom: 24px;
}

#welcome h1 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    line-height: 1.2;
    margin-bottom: 20px;
}

#welcome .btn {
    display: inline-block;
    background-color: var(--accent);
    color: #fff;
    text-decoration: none;
    padding: 14px 36px;
    border-radius: 4px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-size: 0.85rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

#welcome .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(192, 57, 43, 0.4);
}

#scripts {
    flex: 1;
    background-color: var(--bg);
    padding: 80px 24px;
}
    
#scripts .section-inner {
    max-width: 960px;
    margin: 0 auto;
}

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

#scripts h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem;
    margin-bottom: 18px;
    line-height: 1.2;
}


#scripts h2 span {
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

#scripts .divider {
    width: 48px;
    height: 3px;
    background-color: var(--accent);
    margin-bottom: 28px;
    border-radius: 2px;
}

#scripts .scripts-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: fit-content;
    gap: 28px;
    margin-top: 40px;
}

#scripts .card {
    background-color: var(--card-bg);
    border-radius: 8px;
    padding: 28px;
    transition: transform 0.2s, box-shadow 0.2s;
}

#scripts .card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.08);
}
    
#scripts .card .card-tag {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 2px;
}

#scripts .card h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    margin-bottom: 10px;
    line-height: 1.35;
}

#scripts .img-wrapper {
    display: inline-block;
    aspect-ratio: 320 / 241;
    overflow: hidden;
    border-radius: 4px;
    box-shadow: 2px 2px 2px rgba(0,0,0,0.08);
}

#scripts .img-wrapper img {
    display: block;
    width: 100%;
    height: auto;
}

#scripts .card.skeleton {
    cursor: default;
}
#scripts .card.skeleton:hover {
    transform: none;
    box-shadow: none;
}

#scripts .skeleton-line {
    border-radius: 4px;
    background: linear-gradient(90deg, #ECE7DD 25%, #F7F4EE 50%, #ECE7DD 75%);
    background-size: 200% 100%;
    animation: pns-skeleton 1.6s ease-in-out infinite;
}

#scripts .skeleton-creator   { width: 70px;  height: 0.8rem; margin-bottom: 6px; }
#scripts .skeleton-title { width: 110px; height: 1.4rem; margin-bottom: 4px; }

#scripts .img-wrapper.skeleton-img {
    width: 220px;
    border: none;
    box-shadow: none;
    margin-top: 12px;
    background: linear-gradient(90deg, #ECE7DD 25%, #F7F4EE 50%, #ECE7DD 75%);
    background-size: 200% 100%;
    animation: pns-skeleton 1.6s ease-in-out infinite;
}

@keyframes pns-skeleton {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

@media (prefers-reduced-motion: reduce) {
    #scripts .skeleton-line,
    #scripts .img-wrapper.skeleton-img {
        animation: none;
        background: #ECE7DD;
    }
}

#pagination {
    display:flex;
    justify-content:center;
    gap:8px;
    margin-top:40px;
}


#pagination a {
    padding:6px 12px;
    border-radius:20px;
    border:1px solid rgba(0,0,0,0.12);
    text-decoration:none;
    color:var(--muted);
}


#pagination a:hover {
    border-color:var(--accent);
    color:var(--accent);
}


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

#search {
    background-color: var(--nav-bg);
    padding: 80px 80px 80px;
}

.search-inner {
    max-width: 960px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.search-bar {
    display: flex;
    gap: 8px;
    align-items: center;
}

.search-bar input {
    flex: 1;
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    font-family: 'Lato', sans-serif;
    font-size: 1rem;
    background: #fff;
    color: var(--text);
    outline: none;
}

.search-bar input:focus {
    box-shadow: 0 0 0 2px var(--accent);
}

.field-select {
    appearance: none;
    -webkit-appearance: none;
    background-color: #2a2a2a;
    border: 1px solid #444;
    border-radius: 6px;
    padding: 10px 32px 10px 12px;
    font-family: 'Lato', sans-serif;
    font-size: 0.85rem;
    color: #ccc;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5z' fill='%23999'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    white-space: nowrap;
}

.field-select:hover,
.field-select:focus {
    border-color: var(--accent);
    outline: none;
}

.search-bar button {
    padding: 10px 22px;
    background-color: var(--accent);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-family: 'Lato', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity 0.2s;
}

.search-bar button:hover {
    opacity: 0.85;
}

.sort-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.sort-label {
    font-size: 0.85rem;
    color: #888;
    font-weight: 600;
    white-space: nowrap;
}

.search-syntax {
    flex: 1;
    background-color: var(--bg);
    padding: 60px 24px;
}

.syntax-inner {
    max-width: 860px;
    margin: 0 auto;
}

.search-syntax h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem;
    color: var(--text);
    margin-bottom: 18px;
}

.syntax-intro {
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 32px;
}

.prefix-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

.prefix-card {
    background: var(--card-bg);
    border: 1px solid rgba(0, 0, 0, 0.07);
    border-radius: 10px;
    padding: 20px 22px;
    display: flex;
    align-items: flex-start;
    gap: 18px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.prefix-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.prefix-symbol {
    font-family: 'Courier New', monospace;
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--accent);
    line-height: 1;
    min-width: 32px;
    padding-top: 2px;
}

.prefix-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.prefix-body strong {
    font-size: 0.95rem;
    color: var(--text);
}

.prefix-examples {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.prefix-example {
    display: flex;
    align-items: center;
    gap: 8px;
}

.prefix-example code {
    font-family: 'Courier New', monospace;
    font-size: 0.82rem;
    background: rgba(0, 0, 0, 0.04);
    border-radius: 4px;
    padding: 2px 8px;
    color: var(--text);
}

.prefix-tag {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--muted);
}

.prefix-tag--exact {
    color: var(--accent);
}

.wildcard-card {
    background: var(--card-bg);
    border: 1px solid rgba(0, 0, 0, 0.07);
    border-left: 3px solid var(--accent);
    border-radius: 0 10px 10px 0;
    padding: 20px 24px;
    display: flex;
    align-items: flex-start;
    gap: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.wildcard-symbol {
    font-size: 2.4rem;
    min-width: 36px;
    padding-top: 0;
}

.wildcard-card strong {
    display: block;
    font-size: 0.95rem;
    margin-bottom: 6px;
    color: var(--text);
}

.wildcard-card p {
    font-size: 0.9rem;
    color: var(--muted);
    line-height: 1.6;
    margin: 0 0 6px;
}

.wildcard-card p:last-child {
    margin-bottom: 0;
}

.wildcard-example code {
    font-family: 'Courier New', monospace;
    font-size: 0.82rem;
    background: rgba(0, 0, 0, 0.04);
    border-radius: 4px;
    padding: 1px 6px;
    color: var(--text);
}

@media (max-width: 600px) {
    .prefix-grid {
        grid-template-columns: 1fr;
    }
    .prefix-symbol {
        font-size: 1.8rem;
    }
}

.advanced-toggle {
    align-self: flex-start;
    background: none;
    border: none;
    color: #777;
    font-family: 'Lato', sans-serif;
    font-size: 0.85rem;
    cursor: pointer;
    padding: 0;
    transition: color 0.2s;
}

.advanced-toggle:hover {
    color: var(--accent);
}

.advanced-panel {
    display: none;
    flex-direction: column;
    gap: 16px;
    background: #1e1e1e;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 18px 20px;
}

.advanced-panel.open {
    display: flex;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.filter-label {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #777;
    min-width: 48px;
}

.date-range {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.date-range input[type="date"] {
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: 6px;
    padding: 6px 10px;
    font-family: 'Lato', sans-serif;
    font-size: 0.85rem;
    color: #ccc;
    outline: none;
    cursor: pointer;
}

.date-range input[type="date"]:focus {
    border-color: var(--accent);
}

.date-sep {
    color: #555;
    font-size: 0.9rem;
}

.size-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.size-pill {
    display: inline-flex;
    align-items: center;
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: 20px;
    padding: 5px 14px;
    font-family: 'Lato', sans-serif;
    font-size: 0.85rem;
    color: #888;
    cursor: pointer;
    user-select: none;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.size-pill:hover {
    border-color: var(--accent);
    color: #ccc;
}

.size-pill input {
    display: none;
}

.size-pill:has(input:checked) {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

@media (max-width: 600px) {
    .search-bar {
        flex-wrap: wrap;
    }
    .search-bar input {
        flex: 1 1 100%;
    }
    .field-select {
        flex: 1;
    }
    .filter-group {
        flex-direction: column;
        align-items: flex-start;
    }
}

#creator-section {
    background-color: var(--bg);
    max-width: 960px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 200px;
}

#creator-section div[class="creator-bar"] {
    display: flex;
    flex-direction: row;
    gap: 10px;
    align-items: center;
}

#creator-section input[type="text"] {
    width: 100%;
    max-width: 400px;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

#creator-section button {
    display: inline-block;
    background-color: var(--accent);
    border: none;
    color: #fff;
    text-decoration: none;
    padding: 10px 14px;
    border-radius: 4px;
    font-weight: 700;
    letter-spacing: 1px;
    font-size: 1rem;
    transition: transform 0.2s, box-shadow 0.2s;
    white-space: nowrap;
    width: auto;
}

#creator-section button:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(192, 57, 43, 0.4);
}

#creator-section p {
    display: none;
    margin-top: 10px;
    color: var(--muted);
    font-size: 0.9rem;
}

#msg {
    display: block;
    margin-top: 10px;
    color: var(--muted);
    font-size: 0.9rem;
    text-align: center;
}

#advanced {
    flex: 1;
    background-color: var(--bg);
    padding: 80px 24px;
}
    
#advanced .section-inner {
    max-width: 960px;
    margin: 0 auto;
}

#advanced h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem;
    margin-bottom: 18px;
    line-height: 1.2;
}

#advanced .divider {
    width: 48px;
    height: 3px;
    background-color: var(--accent);
    margin-bottom: 28px;
    border-radius: 2px;
}

#advanced .content p {
    margin-bottom: 16px;
    font-size: 20px;
}

#advanced .content a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 3px;
}

#advanced .content a:hover {
    opacity: 0.75;
}

#advanced .content code{
    display: block;
    background-color: var(--card-bg);
    border-left: 3px solid var(--accent);
    border-radius: 0 6px 6px 0;
    padding: 5px 16px;
    margin: 10px 0;
    overflow-x: auto;
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    color: var(--text);
    white-space: pre;
    line-height: 1.6;
}

#script-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    background-color: var(--bg);
    padding: 80px 24px;
}

#script-section h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem;
    margin-bottom: 15px;
    line-height: 1.2;
}

#script-section .divider {
    width: 48px;
    height: 3px;
    background-color: var(--accent);
    margin-bottom: 28px;
    border-radius: 2px;
}

.description, .tags {
    max-width: 960px;
    width: 100%;
}

#script-section .description p, #script-section .tags p {
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    font-size: 1.2rem;
    color: var(--text);
    padding-bottom: 12px;
}

#script-section .description ul, #script-section .tags ul {
    padding-left: 20px;
    margin-bottom: 12px;
}

#script-section .description a {
    color: var(--accent);
}

#script-section .description li {
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    font-size: 1.2rem;
    color: var(--text);
}

#script-section .description h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    margin-top: 24px;
    margin-bottom: 12px;
    color: var(--text);
}

#script-section .description h4 {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    margin-top: 20px;
    margin-bottom: 10px;
    color: var(--text);
}

#script-section .description hr {
    color: var(--border);
    margin: 24px 0;
}

#script-section .description code {
    background-color: var(--card-bg);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.95rem;
    color: var(--text);
    white-space: pre-wrap;
}

#script-section .description code.code-block,
#script-section .description pre {
    display: block;
    background-color: var(--card-bg);
    border-left: 3px solid var(--accent);
    border-radius: 0 6px 6px 0;
    padding: 14px 16px;
    margin: 10px 0;
    overflow-x: auto;
    font-family: 'Courier New', monospace;
    font-size: 0.88rem;
    color: var(--text);
    white-space: pre;
    line-height: 1.6;
}

#script-section .description pre code {
    background: none;
    padding: 0;
    border: none;
    border-radius: 0;
    font-size: inherit;
    white-space: pre;
}
    
#script-section .two-columns {
    display: flex;
    flex-direction: row;
    gap: 70px;
    max-width: 960px;
    margin: 0 auto;
}

#script-section .img-wrapper {
    display: inline-block;
    height: 100%;
    border-radius: 4px;
    box-shadow: 2px 2px 2px rgba(0,0,0,0.08);
}

#script-section .img-wrapper img {
    display: block;
    width: 100%;
    height: auto;
}

#script-section .script-info {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    flex-direction: column;
}

#script-section .script-info .name {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    line-height: 1.35;
    color: var(--text);
    margin-top: -8px;
}

#script-section .script-info p {
    letter-spacing: 1px;
    color: var(--text);
}
    
#script-section .script-info .creator a{
    color: inherit;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 2px;
    color: var(--text);
}

#script-section .btn {
    display: inline-block;
    background-color: var(--accent);
    color: #fff;
    text-decoration: none;
    padding: 14px 36px;
    border-radius: 4px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-size: 0.85rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

#script-section .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(192, 57, 43, 0.4);
}

.script-count {
    font-size: 0.9rem;
    color: var(--muted);
    margin-bottom: 16px;
}

.sort-bar {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.sort-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--muted);
    white-space: nowrap;
}

.sort-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.sort-btn {
    background: var(--card-bg);
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 20px;
    padding: 5px 14px;
    font-family: 'Lato', sans-serif;
    font-size: 0.85rem;
    color: var(--muted);
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.sort-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

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

#error-content {
    text-align: center;
    padding: 60px 20px;
    flex: 1;
}

#error-content h1 {
    font-size: 3rem;
    margin-bottom: 20px;
}

#error-content p {
    font-size: 1.2rem;
    color: var(--muted);
}

#turnstile-section {
    flex: 1;
    margin: 20px auto;
    background-color: var(--bg);
    display: flex;
    justify-content: center;
    align-items: center;
}

#legal {
    flex: 1;
    background-color: var(--bg);
    padding: 60px 24px;
}

#legal .legal-inner {
    max-width: 720px;
    margin: 0 auto;
}

#legal .legal-header {
    border-bottom: 3px solid var(--accent);
    padding-bottom: 24px;
    margin-bottom: 48px;
}

#legal .legal-header h1 {
    font-family: 'Playfair Display', serif;
    font-size: 2.4rem;
    margin-bottom: 8px;
    color: var(--text);
}

#legal .legal-updated {
    color: var(--muted);
    font-style: italic;
    font-size: 0.9rem;
}

#legal article {
    margin-bottom: 36px;
    padding-bottom: 36px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.07);
}

#legal article:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

#legal h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.25rem;
    margin-bottom: 14px;
    color: var(--text);
}

#legal p {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text);
    margin-bottom: 12px;
}

#legal p:last-child {
    margin-bottom: 0;
}

#legal a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 3px;
}

#legal a:hover {
    opacity: 0.75;
}

#stats {
    flex: 1;
    background-color: var(--bg);
    padding: 60px 24px;
}

#stats .stats-inner {
    max-width: 960px;
    margin: 0 auto;
}

.stats-heading h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem;
    color: var(--text);
    margin-bottom: 18px;
}

.stats-heading--chart {
    margin-top: 60px;
}

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

.stat-card {
    background-color: var(--card-bg);
    border: 1px solid rgba(0, 0, 0, 0.07);
    border-radius: 10px;
    padding: 32px 28px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.09);
}

.stat-eyebrow {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 10px;
}

.stat-number {
    font-family: 'Playfair Display', serif;
    font-size: 3.2rem;
    line-height: 1;
    color: var(--text);
    margin-bottom: 10px;
    font-weight: 700;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--muted);
    line-height: 1.4;
}

.stat-card--accent {
    background-color: var(--accent);
    border-color: var(--accent);
}

.stat-card--accent .stat-eyebrow,
.stat-card--accent .stat-number,
.stat-card--accent .stat-label {
    color: #fff;
}

.stat-card--accent:hover {
    box-shadow: 0 10px 28px rgba(192, 57, 43, 0.3);
}

.chart {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chart-row {
    display: grid;
    grid-template-columns: 140px 1fr 56px;
    align-items: center;
    gap: 14px;
}

.chart-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
    text-align: right;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.2s ease;
}

.chart-label:hover {
    color: var(--accent);
}

.chart-bar-container {
    background-color: rgba(0, 0, 0, 0.06);
    border-radius: 4px;
    overflow: hidden;
    height: 32px;
}

.chart-bar {
    height: 100%;
    width: 0;
    background-color: var(--accent);
    border-radius: 0 4px 4px 0;
    transition: width 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.chart-bar.animated {
    width: var(--pct);
}

.chart-count {
    font-family: 'Playfair Display', serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    text-align: left;
}

@media (max-width: 840px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .stat-number {
        font-size: 2.4rem;
    }
    .chart-row {
        grid-template-columns: 110px 1fr 48px;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    .stat-number {
        font-size: 2rem;
    }
    .chart-row {
        grid-template-columns: 90px 1fr 42px;
        gap: 8px;
    }
    .chart-label {
        font-size: 0.8rem;
    }
    .chart-bar-container {
        height: 26px;
    }
}

footer {
    background-color: #111;
    color: #777;
    text-align: center;
    padding: 15px;
    font-size: 0.85rem;
}

footer span {
    color: var(--accent);
}

footer a {
    color: #777;
    text-decoration: none;
}

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

.legal-updated {
    color: var(--muted);
    font-style: italic;
    margin-bottom: 8px;
}