:root {
    color-scheme: light;
    --text: #181a20;
    --muted: #66707f;
    --border: #dce1e8;
    --page: #f6f7f9;
    --surface: #ffffff;
    --surface-muted: #eef1f5;
    --control: #ffffff;
    --accent: #2563eb;
    --accent-soft: #e8f0ff;
    --success: #16805a;
    --success-soft: #e7f6ef;
    --warning: #9a6a11;
    --warning-soft: #fff3d8;
    --danger: #b4495c;
    --danger-soft: #ffe9ee;
    --neutral-pill: #edf1f5;
    --neutral-pill-text: #596273;
    --focus: rgba(37, 99, 235, 0.18);
}

:root[data-theme="dark"] {
    color-scheme: dark;
    --text: #f1f3f6;
    --muted: #9aa3b2;
    --border: #2b3038;
    --page: #0d0f12;
    --surface: #15181d;
    --surface-muted: #1d2229;
    --control: #111419;
    --accent: #8ab4ff;
    --accent-soft: #172438;
    --success: #7ad6a8;
    --success-soft: #14291f;
    --warning: #e8bf62;
    --warning-soft: #2d2412;
    --danger: #ff9caf;
    --danger-soft: #321820;
    --neutral-pill: #232933;
    --neutral-pill-text: #a7b0bf;
    --focus: rgba(138, 180, 255, 0.22);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    background: var(--page);
}

a {
    color: inherit;
}

button,
input,
select {
    font: inherit;
}

.shell {
    width: min(var(--shell-width, 1120px), calc(100% - 32px));
    margin: 0 auto;
    padding: 22px 0 40px;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border);
}

.brand {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--text);
    text-decoration: none;
    font-weight: 800;
    letter-spacing: 0;
}

.mark {
    width: 38px;
    height: 38px;
    display: block;
    object-fit: contain;
}

.top-actions,
.nav,
.auth-status {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.auth-status {
    display: inline-flex;
}

.auth-name {
    color: var(--muted);
    font-size: 0.92rem;
    font-weight: 700;
}

.button {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--control);
    color: var(--text);
    padding: 0 14px;
    text-decoration: none;
    font-weight: 750;
    cursor: pointer;
}

.button.primary,
.button.download {
    background: var(--accent);
    border-color: var(--accent);
    color: #ffffff;
}

.button.download {
    background: var(--success);
    border-color: var(--success);
}

:root[data-theme="dark"] .button.primary,
:root[data-theme="dark"] .button.download {
    color: #0d0f12;
}

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

.button.download:hover {
    border-color: var(--success);
    filter: brightness(0.95);
}

.button:focus-visible,
.search:focus-within,
input:focus-visible,
select:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 2px;
}

.button svg,
.search svg,
.placeholder svg {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    stroke-width: 2.25;
}

h1 {
    margin: 0;
    font-size: clamp(2rem, 5vw, 3.35rem);
    line-height: 1;
    letter-spacing: 0;
}

.summary {
    margin: 0;
    color: var(--muted);
    line-height: 1.45;
    font-size: 0.96rem;
}

.eyebrow,
.section-label,
label,
.filter-label {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.eyebrow,
.section-label {
    margin: 0 0 10px;
}

.search {
    min-height: 42px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--control);
    padding: 0 14px;
}

.search input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
    font-weight: 650;
}

.search input::placeholder,
input::placeholder {
    color: var(--muted);
}

.notice,
.empty,
.empty-tools,
.state {
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--muted);
    line-height: 1.5;
    padding: 16px;
}

.hidden {
    display: none !important;
}

@media (max-width: 760px) {
    .topbar,
    .top-actions,
    .nav,
    .auth-status {
        align-items: stretch;
        flex-direction: column;
    }

    .top-actions,
    .nav,
    .auth-status,
    .button {
        width: 100%;
    }

    .topbar {
        gap: 12px;
        padding-bottom: 14px;
    }

    .brand {
        justify-content: flex-start;
        width: 100%;
    }

    .auth-status {
        gap: 8px;
    }

    .button {
        min-height: 46px;
        padding: 0 12px;
    }
}

@media (max-width: 560px) {
    .shell {
        width: min(100% - 18px, var(--shell-width, 1120px));
        padding-top: 16px;
        padding-bottom: 28px;
    }

    h1 {
        font-size: clamp(2rem, 12vw, 2.65rem);
    }

    .summary {
        font-size: 0.94rem;
    }
}
