:root {
    color-scheme: light;
    --bg: #f5f3ee;
    --surface: #ffffff;
    --surface-2: #ece8df;
    --text: #171717;
    --muted: #67645d;
    --line: #ddd8cc;
    --brand: #fcbd01;
    --brand-soft: #fff2bd;
    --brand-2: #10100f;
    --green: #16a34a;
    --blue: #2563eb;
    --teal: #0f766e;
    --violet: #6d5bd0;
    --red: #dc2626;
    --radius: 8px;
    --shadow: 0 18px 50px rgba(18, 18, 18, 0.11);
    --shadow-soft: 0 10px 28px rgba(18, 18, 18, 0.08);
    --container: 1296px;
    --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    --ease: cubic-bezier(.2, .8, .2, 1);
}

[data-theme="dark"] {
    color-scheme: dark;
    --bg: #111111;
    --surface: #191919;
    --surface-2: #25231f;
    --text: #f4f1e8;
    --muted: #b7b2a7;
    --line: #333333;
    --brand: #fcbd01;
    --brand-soft: rgba(252, 189, 1, 0.15);
    --brand-2: #f4f1e8;
    --shadow: 0 16px 40px rgba(0, 0, 0, 0.32);
    --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.24);
}

* {
    box-sizing: border-box;
}

html {
    height: 100%;
    min-width: 0;
    overflow-x: hidden;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    letter-spacing: 0;
    scroll-behavior: smooth;
}

body {
    display: flex;
    min-height: 100%;
    flex-direction: column;
    margin: 0;
    overflow-x: clip;
    background: var(--bg);
    color: var(--text);
    font-size: 16px;
    line-height: 1.5;
    animation: page-in 420ms var(--ease) both;
}

body.is-nav-open {
    overflow: hidden;
}

html.is-modal-open,
body.is-modal-open {
    overflow: hidden;
}

main {
    flex: 1 0 auto;
    min-width: 0;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

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

a {
    color: inherit;
    text-decoration: none;
    transition: color 180ms var(--ease), opacity 180ms var(--ease), background-color 180ms var(--ease), border-color 180ms var(--ease);
}

h1,
h2,
h3,
h4,
p,
strong {
    overflow-wrap: anywhere;
}

a:hover {
    color: var(--brand);
}

button,
input,
select,
textarea {
    max-width: 100%;
    font: inherit;
}

button {
    cursor: pointer;
    transition: transform 180ms var(--ease), color 180ms var(--ease), background-color 180ms var(--ease), border-color 180ms var(--ease), box-shadow 180ms var(--ease);
}

button:active,
.solid-button:active {
    transform: translateY(1px);
}

.password-field {
    position: relative;
    display: block;
    width: 100%;
}

.password-field input {
    padding-right: 48px !important;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 7px;
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--muted);
    padding: 0;
    transform: translateY(-50%);
}

.password-toggle:hover,
.password-toggle:focus-visible {
    background: color-mix(in srgb, var(--brand) 14%, transparent);
    color: var(--text);
}

.password-toggle:active {
    transform: translateY(-50%);
}

.password-toggle svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.password-toggle__eye-off {
    display: none;
}

.password-toggle.is-visible .password-toggle__eye {
    display: none;
}

.password-toggle.is-visible .password-toggle__eye-off {
    display: block;
}

:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--brand) 72%, transparent);
    outline-offset: 3px;
}

.container {
    width: min(100% - 32px, var(--container));
    margin: 0 auto;
}

.solid-button,
.text-button {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    font-weight: 800;
    transition: transform 180ms var(--ease), box-shadow 180ms var(--ease), background-color 180ms var(--ease), color 180ms var(--ease);
}

.solid-button {
    padding: 0 18px;
    background: var(--brand);
    color: #111111;
    box-shadow: 0 10px 24px rgba(252, 189, 1, 0.24);
}

.solid-button:hover {
    color: #111111;
    transform: translateY(-2px);
    box-shadow: 0 16px 34px rgba(252, 189, 1, 0.32);
}

.text-button {
    color: var(--brand-2);
}

.news-badge {
    display: inline-flex;
    min-height: 24px;
    align-items: center;
    border-radius: 4px;
    background: var(--badge-color, var(--brand));
    color: #ffffff;
    padding: 3px 8px;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.2;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.16);
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 22px;
    padding-bottom: 12px;
}

.section-heading span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.section-heading h2 {
    margin: 2px 0 0;
    font-size: 24px;
    line-height: 1.15;
}

.section-heading a {
    color: var(--muted);
    font-size: 14px;
    font-weight: 800;
    white-space: nowrap;
}

.news-card {
    position: relative;
    min-width: 0;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 220ms var(--ease), box-shadow 220ms var(--ease), border-color 220ms var(--ease), background-color 220ms var(--ease);
}

.news-card:hover {
    border-color: color-mix(in srgb, var(--brand) 45%, var(--line));
    box-shadow: var(--shadow-soft);
    transform: translateY(-3px);
}

.news-card__image {
    display: block;
    aspect-ratio: 16 / 9;
    background: var(--surface-2);
    overflow: hidden;
}

.news-card__image img,
.news-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 420ms var(--ease), filter 420ms var(--ease);
}

.news-card:hover .news-card__image img,
.news-card:hover .news-card__thumb img {
    filter: saturate(1.08) contrast(1.04);
    transform: scale(1.045);
}

.news-card__body {
    padding: 16px;
}

.news-card h3 {
    margin: 10px 0 8px;
    font-size: 20px;
    line-height: 1.2;
}

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

.news-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    margin-top: 10px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 650;
}

.news-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.news-card__tags a {
    display: inline-flex;
    min-height: 24px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: color-mix(in srgb, var(--surface-2) 64%, transparent);
    color: var(--muted);
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 900;
}

.news-card__tags a:hover {
    border-color: color-mix(in srgb, var(--brand) 48%, var(--line));
    color: var(--text);
}

.news-card--compact {
    display: grid;
    grid-template-columns: 112px 1fr;
    gap: 12px;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    background: transparent;
    padding: 12px 0;
}

.news-card--compact:hover {
    box-shadow: none;
    transform: translateX(3px);
}

.news-card--compact .news-card__thumb {
    width: 112px;
    aspect-ratio: 1 / 0.76;
    border-radius: var(--radius);
    background: var(--surface-2);
    overflow: hidden;
}

.news-card--compact h3 {
    margin: 6px 0 4px;
    font-size: 15px;
    line-height: 1.28;
}

.news-card--compact .news-card__meta {
    margin-top: 6px;
}

.news-card--overlay {
    min-height: 232px;
    border: 0;
    color: #ffffff;
}

.news-card--overlay:hover {
    box-shadow: var(--shadow);
}

.news-card--overlay .news-card__image {
    position: absolute;
    inset: 0;
    aspect-ratio: auto;
}

.news-card__shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.78));
}

.news-card--overlay .news-card__body {
    position: absolute;
    inset: auto 0 0;
    z-index: 1;
}

.news-card--overlay h3 {
    color: #ffffff;
}

.news-card--overlay .news-card__meta {
    color: rgba(255, 255, 255, 0.78);
}

.card-grid,
.section-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.section-list {
    display: grid;
    gap: 4px;
}

.empty-state {
    color: var(--muted);
}

.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 620ms var(--ease), transform 620ms var(--ease);
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@keyframes page-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 1ms !important;
        scroll-behavior: auto !important;
        transition-duration: 1ms !important;
    }
}

@media (max-width: 980px) {
    .card-grid,
    .section-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .container {
        width: min(100% - 24px, var(--container));
    }

    .card-grid,
    .section-grid {
        grid-template-columns: 1fr;
    }

    .section-heading {
        align-items: start;
        flex-direction: column;
    }

    .section-heading h2 {
        font-size: 21px;
    }

    .section-heading a {
        max-width: 100%;
        white-space: normal;
    }

    .solid-button,
    .text-button {
        max-width: 100%;
    }

    .news-card__body {
        padding: 14px;
    }

    .news-card h3 {
        font-size: 18px;
    }

    .news-card p {
        font-size: 14px;
    }

    .news-card__meta {
        gap: 5px 9px;
    }

    .news-card--compact {
        grid-template-columns: 96px 1fr;
    }

    .news-card--compact .news-card__thumb {
        width: 96px;
    }
}

@media (max-width: 420px) {
    .container {
        width: min(100% - 20px, var(--container));
    }

    .news-card--compact {
        grid-template-columns: 84px minmax(0, 1fr);
        gap: 10px;
    }

    .news-card--compact .news-card__thumb {
        width: 84px;
    }

    .news-card--compact h3 {
        margin-top: 3px;
        font-size: 14px;
    }
}
