:root {
    --bg-top: #f8f1df;
    --bg-bottom: #d7ecff;
    --surface: rgba(255, 252, 245, 0.88);
    --surface-strong: rgba(255, 255, 255, 0.96);
    --text: #1f2937;
    --muted: #5b6472;
    --accent: #c96a16;
    --accent-strong: #8f3f00;
    --line: rgba(31, 41, 55, 0.12);
    --shadow: 0 24px 50px rgba(91, 100, 114, 0.14);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", "Malgun Gothic", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(255, 200, 87, 0.55), transparent 32%),
        radial-gradient(circle at top right, rgba(125, 211, 252, 0.45), transparent 28%),
        linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
    min-height: 100vh;
}

.page {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
    padding: 48px 0 64px;
}

.hero,
.summary-card,
.chart-card,
.table-card {
    background: var(--surface);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 28px;
    box-shadow: var(--shadow);
}

.hero {
    padding: 36px;
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--accent-strong);
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

h1,
h2,
h3,
strong {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
}

h1 {
    font-size: clamp(2.2rem, 5vw, 4rem);
    line-height: 1.05;
    max-width: 10ch;
}

.intro,
.meta,
.section-head p {
    color: var(--muted);
    line-height: 1.7;
}

.intro {
    max-width: 56ch;
    margin: 18px 0 0;
}

.search-form {
    display: flex;
    gap: 12px;
    margin-top: 28px;
}

.search-form input {
    flex: 1;
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 16px 20px;
    font-size: 1rem;
    background: var(--surface-strong);
}

.search-form button {
    border: 0;
    border-radius: 999px;
    padding: 16px 22px;
    font-size: 1rem;
    font-weight: 700;
    color: white;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    cursor: pointer;
}

.error {
    margin: 16px 0 0;
    color: #b42318;
    font-weight: 600;
}

.summary-card,
.chart-card,
.table-card {
    margin-top: 24px;
    padding: 28px;
}

.summary-card {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: flex-start;
}

.card-label {
    margin: 0 0 8px;
    color: var(--accent-strong);
    font-size: 0.9rem;
    font-weight: 700;
}

.metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(120px, 1fr));
    gap: 16px;
    width: min(440px, 100%);
}

.metrics div {
    padding: 18px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.72);
}

.metrics span {
    display: block;
    color: var(--muted);
    font-size: 0.92rem;
    margin-bottom: 6px;
}

.metrics strong {
    font-size: 1.5rem;
}

.section-head {
    margin-bottom: 18px;
}

.chart-image {
    width: 100%;
    display: block;
    border-radius: 20px;
    background: white;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(255, 255, 255, 0.78);
    border-radius: 18px;
    overflow: hidden;
}

th,
td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}

th {
    background: rgba(201, 106, 22, 0.08);
    font-size: 0.95rem;
}

tbody tr:hover {
    background: rgba(251, 191, 36, 0.08);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

@media (max-width: 800px) {
    .page {
        width: min(100% - 20px, 1120px);
        padding: 24px 0 40px;
    }

    .hero,
    .summary-card,
    .chart-card,
    .table-card {
        padding: 22px;
        border-radius: 22px;
    }

    .search-form,
    .summary-card {
        flex-direction: column;
    }

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