:root {
    --bg: #07080d;
    --bg-2: #0e111b;
    --surface: #141723;
    --surface-2: #1d2130;
    --surface-3: #eef3f8;
    --text: #f4f1ff;
    --text-dark: #111827;
    --muted: #a7adbe;
    --line: rgba(166, 112, 255, .26);
    --line-soft: rgba(255, 255, 255, .075);
    --brand: #8f4dff;
    --brand-2: #26e6ff;
    --accent: #d7b9ff;
    --danger: #ff4d8d;
    --radius: 8px;
    --shadow: 0 20px 54px rgba(0, 0, 0, .34);
    --body-bg:
        linear-gradient(rgba(255, 255, 255, .025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .025) 1px, transparent 1px),
        radial-gradient(circle at 18% 0%, rgba(143, 77, 255, .20), transparent 34rem),
        linear-gradient(135deg, #07080d 0%, #11121e 52%, #080912 100%);
    --header-bg: rgba(7, 8, 13, .82);
    --panel-bg: rgba(18, 20, 31, .82);
    --panel-head-bg: linear-gradient(180deg, rgba(143, 77, 255, .13), rgba(255, 255, 255, 0));
    --soft-bg: rgba(255, 255, 255, .055);
    --hover-bg: rgba(143, 77, 255, .11);
    --input-bg: rgba(8, 10, 18, .82);
    --nav-text: #c4c7d4;
    --nav-hover-text: #ffffff;
    --on-accent: #080912;
    --button-bg: linear-gradient(135deg, #8f4dff, #6234ff);
    --button-hover: linear-gradient(135deg, #a872ff, #7448ff);
    --button-text: #ffffff;
    --auth-bg: linear-gradient(135deg, #8f4dff, #26e6ff);
    --auth-hover-bg: linear-gradient(135deg, #a872ff, #59edff);
    --lead-text: #d9d8e8;
    --rich-text: #e6e4f5;
    --activity-text: #ebe8fa;
    --scroll-track: rgba(6, 8, 14, .92);
    --scroll-thumb-hover: linear-gradient(180deg, #b187ff, #59edff);
    --logo-purple: #9c4dff;
    --logo-purple-2: #d45cff;
    --logo-steel: #f5f7ff;
}

html[data-theme="light"] {
    color-scheme: light;
    --bg: #f4f2fb;
    --bg-2: #fbfbff;
    --surface: #ffffff;
    --surface-2: #f0edf8;
    --surface-3: #ebe7f4;
    --text: #171322;
    --text-dark: #101828;
    --muted: #6f7082;
    --line: rgba(118, 81, 173, .18);
    --line-soft: rgba(23, 19, 34, .085);
    --brand: #7c3aed;
    --brand-2: #0891b2;
    --accent: #5d3fd3;
    --danger: #d94674;
    --shadow: 0 18px 44px rgba(53, 40, 82, .10);
    --body-bg:
        linear-gradient(rgba(23, 19, 34, .035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(23, 19, 34, .035) 1px, transparent 1px),
        radial-gradient(circle at 18% 0%, rgba(124, 58, 237, .12), transparent 34rem),
        linear-gradient(135deg, #fbfbff 0%, #f2effb 58%, #eef8fb 100%);
    --header-bg: rgba(255, 255, 255, .82);
    --panel-bg: rgba(255, 255, 255, .78);
    --panel-head-bg: linear-gradient(180deg, rgba(124, 58, 237, .07), rgba(255, 255, 255, 0));
    --soft-bg: rgba(23, 19, 34, .045);
    --hover-bg: rgba(124, 58, 237, .075);
    --input-bg: rgba(255, 255, 255, .9);
    --nav-text: #4b465f;
    --nav-hover-text: #171322;
    --on-accent: #ffffff;
    --button-bg: linear-gradient(135deg, #7c3aed, #5b35d5);
    --button-hover: linear-gradient(135deg, #6d28d9, #4f32c6);
    --button-text: #ffffff;
    --auth-bg: linear-gradient(135deg, #7c3aed, #0891b2);
    --auth-hover-bg: linear-gradient(135deg, #6d28d9, #087f9c);
    --lead-text: #58566b;
    --rich-text: #242033;
    --activity-text: #2b263c;
    --scroll-track: rgba(231, 226, 242, .92);
    --scroll-thumb-hover: linear-gradient(180deg, #7c3aed, #0891b2);
    --logo-purple: #7c3aed;
    --logo-purple-2: #a855f7;
    --logo-steel: #182235;
}

html {
    color-scheme: dark;
    scrollbar-color: var(--brand) var(--scroll-track);
    scrollbar-width: thin;
}

* {
    box-sizing: border-box;
    scrollbar-color: var(--brand) var(--scroll-track);
    scrollbar-width: thin;
}

*::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

*::-webkit-scrollbar-track {
    background: var(--scroll-track);
}

*::-webkit-scrollbar-thumb {
    min-height: 48px;
    border: 3px solid var(--scroll-track);
    border-radius: 999px;
    background: linear-gradient(180deg, var(--brand), var(--brand-2));
}

*::-webkit-scrollbar-thumb:hover {
    background: var(--scroll-thumb-hover);
}

*::-webkit-scrollbar-corner {
    background: var(--bg);
}

body {
    margin: 0;
    background: var(--body-bg);
    background-size: 72px 72px, 72px 72px, auto, auto;
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
    transition: background-color .2s ease, color .2s ease;
}

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

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent);
    outline-offset: 3px;
}

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

button,
input,
textarea {
    font: inherit;
}

.top-shell {
    position: sticky;
    top: 0;
    z-index: 30;
    border-bottom: 1px solid var(--line);
    background: var(--header-bg);
    backdrop-filter: blur(22px);
    box-shadow: 0 18px 50px rgba(0, 0, 0, .18);
}

.top-shell::after {
    content: "";
    position: absolute;
    inset: auto 0 -1px;
    height: 1px;
    background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--brand) 46%, transparent), color-mix(in srgb, var(--brand-2) 32%, transparent), transparent);
    pointer-events: none;
}

.topbar,
.match-ticker,
.portal-layout,
.section,
.page-head,
.article-detail,
.product-detail {
    width: min(1220px, calc(100% - 32px));
    margin: 0 auto;
}

.topbar {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 20px;
    min-height: 62px;
}

.brand,
.main-nav,
.user-nav,
.match-ticker,
.ticker-list,
.ticker-match,
.hero-actions,
.price-row,
.product-buy,
.section-head,
.panel-head,
.cart-total,
.summary-row,
.summary-total,
.pagination,
.inline-form,
.qty-form,
.match-row,
.ranking-row,
.ranking-line,
.match-line,
.versus,
.order-card {
    display: flex;
    align-items: center;
}

.brand {
    gap: 10px;
    font-weight: 900;
    min-width: 188px;
}

.brand-emblem {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 1px solid color-mix(in srgb, var(--logo-purple) 36%, var(--line));
    border-radius: 50%;
    background:
        radial-gradient(circle at 50% 52%, color-mix(in srgb, var(--logo-purple) 26%, transparent), transparent 56%),
        linear-gradient(145deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .02));
    box-shadow: 0 0 26px color-mix(in srgb, var(--logo-purple) 30%, transparent), 0 10px 22px rgba(0, 0, 0, .18);
    overflow: hidden;
}

.brand-logo {
    width: 38px;
    height: 38px;
    filter: drop-shadow(0 0 9px color-mix(in srgb, var(--logo-purple-2) 56%, transparent));
    transition: transform .18s ease, filter .18s ease;
}

.brand:hover .brand-logo {
    transform: scale(1.05) rotate(-2deg);
    filter: drop-shadow(0 0 13px color-mix(in srgb, var(--logo-purple-2) 72%, transparent));
}

.brand-word {
    display: inline-flex;
    align-items: baseline;
    gap: 1px;
    color: var(--logo-steel);
    font-size: 21px;
    font-style: italic;
    font-weight: 1000;
    letter-spacing: 0;
    line-height: 1;
    text-shadow: 0 8px 22px rgba(0, 0, 0, .28);
}

.brand-word span:last-child {
    color: var(--logo-purple);
    text-shadow: 0 0 18px color-mix(in srgb, var(--logo-purple) 42%, transparent);
}

.main-nav,
.user-nav {
    gap: 6px;
}

.main-nav a,
.user-nav a,
.logout-form button {
    padding: 8px 10px;
    border-radius: var(--radius);
    color: var(--nav-text);
    font-size: 14px;
    font-weight: 700;
    transition: background .16s ease, color .16s ease, transform .16s ease;
}

.main-nav a:hover,
.user-nav a:hover,
.logout-form button:hover {
    color: var(--nav-hover-text);
    background: var(--hover-bg);
}

.nav-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 19px;
    height: 19px;
    margin-left: 5px;
    padding: 0 6px;
    color: var(--on-accent);
    background: var(--accent);
    border-radius: 999px;
    font-size: 12px;
}

.theme-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    padding: 4px 9px 4px 5px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--nav-text);
    background: var(--soft-bg);
    cursor: pointer;
    font-size: 13px;
    font-weight: 800;
    transition: border-color .16s ease, background .16s ease, color .16s ease;
}

.theme-toggle:hover {
    color: var(--nav-hover-text);
    border-color: var(--brand);
    background: var(--hover-bg);
}

.theme-toggle-track {
    position: relative;
    width: 42px;
    height: 24px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(116, 185, 255, .26), rgba(120, 221, 183, .18));
    box-shadow: inset 0 0 0 1px var(--line);
}

.theme-toggle-dot {
    position: absolute;
    top: 4px;
    left: 4px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--brand-2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, .22);
    transition: transform .18s ease, background .18s ease;
}

html[data-theme="light"] .theme-toggle-dot {
    transform: translateX(18px);
    background: var(--brand);
}

.logout-form {
    margin: 0;
}

.logout-form button,
.link-button {
    border: 0;
    background: transparent;
    cursor: pointer;
}

.link-button {
    padding: 0;
    color: var(--danger);
}

.match-ticker {
    gap: 12px;
    min-height: 54px;
    overflow: hidden;
    border-top: 1px solid var(--line-soft);
    position: relative;
}

.match-ticker::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, color-mix(in srgb, var(--brand) 8%, transparent), transparent 34%, color-mix(in srgb, var(--brand-2) 7%, transparent));
    pointer-events: none;
}

.ticker-label {
    flex: 0 0 auto;
    padding: 6px 9px;
    border-radius: var(--radius);
    color: var(--on-accent);
    background: linear-gradient(135deg, var(--brand-2), color-mix(in srgb, var(--brand) 28%, var(--brand-2)));
    box-shadow: 0 0 22px color-mix(in srgb, var(--brand-2) 24%, transparent);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.ticker-list {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    padding-bottom: 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 28px, #000 calc(100% - 28px), transparent);
    mask-image: linear-gradient(90deg, transparent, #000 28px, #000 calc(100% - 28px), transparent);
}

.ticker-track {
    display: flex;
    align-items: center;
    gap: 10px;
    width: max-content;
    will-change: transform;
}

.ticker-list.is-animated .ticker-track {
    animation: ticker-scroll 34s linear infinite;
}

.ticker-list:hover .ticker-track {
    animation-play-state: paused;
}

@keyframes ticker-scroll {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(calc(-50% - 5px));
    }
}

.ticker-list::-webkit-scrollbar,
.table-wrap::-webkit-scrollbar {
    height: 10px;
}

.ticker-list::-webkit-scrollbar {
    display: none;
}

.ticker-list::-webkit-scrollbar-track,
.table-wrap::-webkit-scrollbar-track {
    border-radius: 999px;
    background: var(--soft-bg);
}

.ticker-match {
    flex: 0 0 auto;
    gap: 8px;
    min-width: 250px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .018)),
        var(--soft-bg);
    box-shadow: inset 0 1px rgba(255, 255, 255, .05);
    font-size: 13px;
    transition: border-color .16s ease, background .16s ease, transform .16s ease;
}

.ticker-match:hover {
    border-color: var(--brand);
    background: var(--hover-bg);
    transform: translateY(-1px);
}

.ticker-event {
    max-width: 82px;
    overflow: hidden;
    color: var(--muted);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ticker-score {
    color: var(--accent);
    font-weight: 900;
}

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

.status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    color: var(--on-accent);
    background: #b8c4d3;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.status-pill.live {
    background: var(--danger);
    color: #fff;
}

.status-pill.finished {
    background: var(--accent);
}

.status-pill.scheduled {
    background: var(--brand);
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 16px;
    border: 1px solid color-mix(in srgb, var(--brand) 50%, transparent);
    border-radius: var(--radius);
    color: var(--button-text);
    background: var(--button-bg);
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 12px 28px color-mix(in srgb, var(--brand) 24%, transparent), inset 0 1px rgba(255, 255, 255, .16);
    transition: transform .16s ease, background .16s ease, opacity .16s ease, box-shadow .16s ease;
}

.button:hover {
    background: var(--button-hover);
    box-shadow: 0 14px 28px rgba(0, 0, 0, .2);
    transform: translateY(-1px);
}

.button:disabled {
    cursor: not-allowed;
    opacity: .55;
    transform: none;
}

.button.secondary {
    color: var(--text);
    background: var(--soft-bg);
    border-color: var(--line);
    box-shadow: none;
}

.button.ghost {
    color: var(--text);
    background: color-mix(in srgb, var(--panel-bg) 76%, transparent);
    border-color: var(--line);
    box-shadow: none;
}

.button.ghost:hover {
    border-color: color-mix(in srgb, var(--brand) 46%, var(--line));
    background: var(--soft-bg);
}

.user-nav .auth-button {
    color: var(--on-accent);
    background: var(--auth-bg);
}

.user-nav .auth-button:hover {
    color: var(--on-accent);
    background: var(--auth-hover-bg);
}

.button.small {
    min-height: 34px;
    padding: 0 12px;
    font-size: 13px;
}

.text-link,
.panel-head a {
    color: var(--brand);
    font-weight: 800;
}

.portal-layout {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr) 270px;
    gap: 16px;
    padding: 18px 0 52px;
}

.side-column,
.content-column {
    display: grid;
    align-content: start;
    gap: 16px;
}

.panel,
.article-card,
.product-card,
.order-card,
.stat-card,
.summary-panel,
.form-panel,
.profile-panel,
.list-panel,
.empty-state,
.table-wrap,
.lead-story,
.match-line,
.ranking-line {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .015)),
        var(--panel-bg);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.panel {
    position: relative;
    overflow: hidden;
}

.panel::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 1px;
    background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--brand) 46%, transparent), color-mix(in srgb, var(--brand-2) 34%, transparent), transparent);
    opacity: .8;
    pointer-events: none;
}

.panel-head {
    justify-content: space-between;
    gap: 14px;
    min-height: 42px;
    padding: 0 14px;
    border-bottom: 1px solid var(--line);
    background: var(--panel-head-bg);
}

.panel-head h2 {
    margin: 0;
    font-size: 14px;
    letter-spacing: 0;
    text-transform: uppercase;
}

.lead-story {
    position: relative;
    min-height: 360px;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    padding: 28px;
    background-position: center;
    background-size: cover;
    isolation: isolate;
    transition: border-color .16s ease, transform .16s ease;
}

.lead-story::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background:
        linear-gradient(180deg, rgba(7, 8, 13, .18) 0%, rgba(7, 8, 13, .66) 48%, rgba(7, 8, 13, .94) 100%),
        linear-gradient(90deg, rgba(143, 77, 255, .26), rgba(7, 8, 13, .18) 58%, transparent 100%);
}

.lead-story > * {
    position: relative;
    z-index: 1;
}

.lead-story:hover {
    border-color: color-mix(in srgb, var(--brand) 50%, var(--line));
    transform: translateY(-1px);
}

.lead-story h1 {
    max-width: 780px;
    margin: 8px 0 12px;
    color: #f7f3ff;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.02;
    letter-spacing: 0;
    text-shadow: 0 4px 22px rgba(0, 0, 0, .62), 0 0 26px rgba(143, 77, 255, .28);
}

.lead-story p {
    max-width: 720px;
    color: #dfdced;
    font-size: 17px;
    text-shadow: 0 2px 16px rgba(0, 0, 0, .58);
}

.lead-story .eyebrow {
    color: #66edff;
    text-shadow: 0 0 18px rgba(38, 230, 255, .45), 0 2px 12px rgba(0, 0, 0, .55);
}

.eyebrow,
.meta {
    margin: 0;
    color: var(--brand-2);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

.meta {
    color: var(--muted);
    text-transform: none;
}

.match-list,
.result-list,
.ranking-list,
.news-feed,
.activity-panel,
.store-strip {
    display: grid;
}

.match-card {
    display: grid;
    gap: 8px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
}

.match-card:hover,
.ranking-row:hover,
.activity-panel a:hover,
.feed-item:hover,
.list-panel a:hover {
    background: var(--hover-bg);
}

.match-event,
.match-meta {
    color: var(--muted);
    font-size: 12px;
}

.match-row {
    justify-content: space-between;
    gap: 8px;
}

.match-row strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.result-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 8px;
    padding: 11px 14px;
    border-bottom: 1px solid var(--line);
    color: var(--lead-text);
    font-size: 13px;
}

.result-row span:last-child {
    text-align: right;
}

.result-row strong {
    color: var(--accent);
}

.feed-item {
    display: grid;
    grid-template-columns: 164px minmax(0, 1fr);
    gap: 14px;
    padding: 14px;
    border-bottom: 1px solid var(--line);
    transition: background .16s ease;
}

.feed-item img {
    width: 164px;
    height: 96px;
    object-fit: cover;
    border-radius: var(--radius);
}

.feed-item h3 {
    margin: 3px 0 6px;
    font-size: 20px;
    line-height: 1.18;
}

.feed-item p:last-child {
    margin: 0;
    color: var(--muted);
}

.ranking-row {
    gap: 10px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
}

.rank-number {
    width: 28px;
    color: var(--accent);
    font-weight: 900;
    text-align: center;
}

.team-mark {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border-radius: var(--radius);
    color: var(--on-accent);
    background: linear-gradient(135deg, var(--brand), var(--accent));
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.team-mark.large {
    width: 48px;
    height: 48px;
    font-size: 14px;
}

.ranking-row small {
    display: block;
    color: var(--muted);
}

.activity-panel a {
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
    color: var(--activity-text);
    font-weight: 700;
}

.callback-panel .panel-head {
    border-bottom: 0;
}

.compact-form,
.form-panel {
    padding: 14px;
}

.compact-form p,
.form-panel p {
    margin: 0 0 12px;
}

.compact-form label,
.form-panel label {
    display: block;
    margin-bottom: 6px;
    color: var(--activity-text);
    font-size: 13px;
    font-weight: 800;
}

.compact-form textarea {
    min-height: 92px;
}

.store-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 14px;
}

.store-card {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 12px;
    min-width: 0;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--soft-bg);
    transition: transform .16s ease, border-color .16s ease, background .16s ease;
}

.store-card:hover {
    border-color: var(--brand);
    background: var(--hover-bg);
    transform: translateY(-1px);
}

.store-card img {
    width: 96px;
    height: 96px;
    object-fit: cover;
    border-radius: var(--radius);
}

.store-card h3 {
    margin: 4px 0 10px;
    font-size: 16px;
    line-height: 1.2;
}

.price-row {
    justify-content: space-between;
    gap: 10px;
}

.price-row strong,
.product-buy strong,
.summary-total strong,
.stat-card strong {
    color: var(--accent);
    font-size: 22px;
}

.page-head {
    padding: 42px 0 20px;
}

.page-head h1 {
    margin: 8px 0 12px;
    font-size: clamp(32px, 5vw, 58px);
    line-height: 1.04;
}

.page-head.centered,
.empty-state {
    text-align: center;
}

.page-head .lead,
.lead {
    max-width: 700px;
    color: var(--muted);
    font-size: 17px;
}

.section {
    padding: 18px 0 50px;
}

.section-head {
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
}

.section-head h2,
.article-card h2,
.product-card h2,
.article-card h3,
.product-card h3,
.form-panel h2,
.summary-panel h2,
.profile-panel h2,
.order-card h2 {
    margin: 0;
    line-height: 1.16;
}

.article-grid,
.product-grid,
.stat-grid,
.two-columns,
.checkout-layout,
.profile-grid,
.split {
    display: grid;
    gap: 16px;
}

.article-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.article-grid.compact,
.product-grid.compact {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.product-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.article-card,
.product-card {
    overflow: hidden;
    transition: border-color .16s ease, transform .16s ease, background .16s ease;
}

.article-card:hover,
.product-card:hover {
    border-color: color-mix(in srgb, var(--brand) 50%, var(--line));
    transform: translateY(-2px);
}

.article-card img,
.product-card img {
    width: 100%;
    height: 190px;
    object-fit: cover;
    background: var(--surface-2);
}

.product-card img {
    height: 210px;
}

.card-body {
    padding: 16px;
}

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

.article-card h2,
.product-card h2,
.article-card h3,
.product-card h3 {
    margin-top: 8px;
    font-size: 20px;
}

.article-card p,
.product-card p,
.muted,
.form-note {
    color: var(--muted);
}

.search-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    max-width: 620px;
    margin: 20px 0;
}

.form-control {
    width: 100%;
    min-height: 42px;
    padding: 9px 11px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--input-bg);
    color: var(--text);
    outline: none;
    box-shadow: inset 0 1px rgba(255, 255, 255, .05);
    transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.form-control:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent), inset 0 1px rgba(255, 255, 255, .08);
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.chip {
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--soft-bg);
    color: var(--nav-text);
    font-weight: 800;
    box-shadow: inset 0 1px rgba(255, 255, 255, .04);
    transition: border-color .16s ease, background .16s ease, color .16s ease, transform .16s ease;
}

.chip:hover {
    color: var(--nav-hover-text);
    border-color: color-mix(in srgb, var(--brand) 52%, var(--line));
    background: var(--hover-bg);
    transform: translateY(-1px);
}

.chip.active {
    color: var(--on-accent);
    border-color: transparent;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    box-shadow: 0 12px 26px color-mix(in srgb, var(--brand) 20%, transparent);
}

.article-detail {
    padding: 28px 0 0;
}

.detail-cover {
    width: 100%;
    max-height: 520px;
    object-fit: cover;
    border-radius: var(--radius);
}

.detail-content {
    max-width: 840px;
    padding: 28px 0 22px;
}

.detail-content h1 {
    margin: 10px 0 16px;
    font-size: clamp(34px, 5vw, 62px);
    line-height: 1.06;
}

.rich-text {
    color: var(--rich-text);
    font-size: 18px;
}

.article-social {
    display: grid;
    gap: 12px;
    margin-top: 28px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
}

.reaction-box {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.reaction-box form {
    margin: 0;
}

.reaction-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--text);
    background: var(--soft-bg);
    cursor: pointer;
    font-weight: 900;
    transition: border-color .16s ease, background .16s ease, transform .16s ease;
}

.emoji-reaction {
    min-width: 72px;
    justify-content: center;
}

.reaction-emoji {
    font-size: 22px;
    line-height: 1;
    filter: drop-shadow(0 5px 10px rgba(0, 0, 0, .24));
}

.reaction-button:hover {
    border-color: var(--brand);
    background: var(--hover-bg);
    transform: translateY(-1px);
}

.reaction-button.active {
    color: var(--button-text);
    border-color: var(--brand);
    background: var(--button-bg);
}

.reaction-button:disabled {
    cursor: not-allowed;
    opacity: .58;
    transform: none;
}

.auth-note {
    margin: 0;
    color: var(--muted);
}

.auth-note a {
    color: var(--brand);
    font-weight: 900;
}

.comments-section {
    padding-top: 10px;
}

.comments-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 30px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--accent);
    background: var(--soft-bg);
    font-weight: 900;
}

.comment-form,
.comment-login-panel,
.comment-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel-bg);
    box-shadow: var(--shadow);
}

.comment-form {
    margin-bottom: 16px;
    padding: 18px;
}

.comment-form p {
    margin: 0 0 12px;
}

.comment-form label {
    display: block;
    margin-bottom: 7px;
    color: var(--activity-text);
    font-weight: 900;
}

.comment-login-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
    padding: 16px;
}

.comments-list {
    display: grid;
    gap: 12px;
}

.comment-card {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 12px;
    padding: 15px;
}

.comment-avatar {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    color: var(--on-accent);
    background: var(--auth-bg);
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
}

.comment-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 4px;
}

.comment-meta span {
    color: var(--muted);
    font-size: 13px;
}

.comment-card p {
    margin: 0;
    color: var(--rich-text);
}

.comment-reactions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.comment-reactions form {
    margin: 0;
}

.comment-reaction-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 32px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    background: var(--soft-bg);
    cursor: pointer;
    font-weight: 900;
    transition: border-color .16s ease, color .16s ease, background .16s ease, transform .16s ease;
}

.comment-reaction-button svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.comment-reaction-button:hover {
    color: var(--text);
    border-color: var(--brand);
    transform: translateY(-1px);
}

.comment-reaction-button.active {
    color: var(--button-text);
    border-color: var(--brand);
    background: var(--button-bg);
}

.comment-reaction-button.dislike.active {
    color: #fff;
    border-color: var(--danger);
    background: var(--danger);
}

.comment-reaction-button:disabled {
    cursor: not-allowed;
    opacity: .55;
    transform: none;
}

.empty-state.compact {
    padding: 34px 20px;
}

.auth-shell {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(360px, 460px);
    align-items: center;
    gap: 34px;
    width: min(1040px, calc(100% - 32px));
    min-height: calc(100vh - 210px);
    margin: 0 auto;
    padding: 54px 0;
}

.auth-copy h1,
.auth-result h1 {
    margin: 10px 0 14px;
    font-size: clamp(36px, 5vw, 62px);
    line-height: 1.04;
}

.auth-copy p:not(.eyebrow) {
    max-width: 560px;
    color: var(--lead-text);
    font-size: 18px;
}

.auth-card {
    position: relative;
    display: grid;
    gap: 15px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .025)),
        var(--panel-bg);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
    overflow: hidden;
}

.auth-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 2px;
    background: linear-gradient(90deg, var(--brand), var(--brand-2), var(--accent));
}

.field-group {
    display: grid;
    gap: 7px;
    color: var(--activity-text);
    font-size: 13px;
    font-weight: 900;
}

.field-group input {
    width: 100%;
    min-height: 46px;
    padding: 11px 13px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--text);
    background: var(--input-bg);
    outline: none;
    transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.field-group input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent);
}

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

.password-field input {
    padding-right: 54px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 50%;
    color: var(--nav-text);
    background: var(--soft-bg);
    cursor: pointer;
    transform: translateY(-50%);
    transition: border-color .16s ease, background .16s ease, color .16s ease, transform .16s ease;
}

.password-toggle:hover,
.password-toggle.is-visible {
    color: var(--nav-hover-text);
    border-color: var(--brand);
    background: var(--hover-bg);
}

.password-toggle:hover {
    transform: translateY(-50%) scale(1.04);
}

.eye-icon {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.9;
    overflow: visible;
}

.eye-shape {
    transform-box: fill-box;
    transform-origin: center;
    transition: transform .22s ease, opacity .22s ease;
}

.eye-pupil {
    fill: currentColor;
    stroke: none;
    transform-box: fill-box;
    transform-origin: center;
    opacity: 0;
    transform: scale(.2);
    transition: opacity .2s ease, transform .2s ease;
}

.password-toggle.is-visible .eye-pupil {
    opacity: 1;
    transform: scale(1);
}

.eye-lashes {
    opacity: 1;
    transform-box: fill-box;
    transform-origin: center;
    transition: opacity .18s ease, transform .18s ease;
}

.lash {
    transition: transform .18s ease, opacity .18s ease;
}

.password-toggle.is-visible .eye-lashes-top .lash-left {
    animation: lash-top-left .36s ease forwards;
}

.password-toggle.is-visible .eye-lashes-top .lash-center {
    animation: lash-top-center .36s ease forwards;
}

.password-toggle.is-visible .eye-lashes-top .lash-right {
    animation: lash-top-right .36s ease forwards;
}

.password-toggle.is-visible .eye-lashes-bottom .lash-left {
    animation: lash-bottom-left .36s ease forwards;
}

.password-toggle.is-visible .eye-lashes-bottom .lash-center {
    animation: lash-bottom-center .36s ease forwards;
}

.password-toggle.is-visible .eye-lashes-bottom .lash-right {
    animation: lash-bottom-right .36s ease forwards;
}

.password-toggle.is-visible .eye-shape {
    animation: eye-open .32s ease both;
}

.password-toggle:not(.is-visible) .eye-shape {
    transform: scaleY(.68);
}

.password-field.is-switching input {
    animation: password-reveal .36s ease both;
}

.password-field.is-revealed input {
    border-color: color-mix(in srgb, var(--brand) 70%, var(--line));
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 14%, transparent);
}

@keyframes eye-open {
    0% {
        transform: scaleY(.25);
    }

    62% {
        transform: scaleY(1.16);
    }

    100% {
        transform: scaleY(1);
    }
}

@keyframes password-reveal {
    0% {
        filter: blur(2px);
        letter-spacing: .12em;
        opacity: .7;
        transform: translateY(1px);
    }

    100% {
        filter: blur(0);
        letter-spacing: 0;
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes lash-top-left {
    100% {
        opacity: 0;
        transform: translate(-2px, -4px) rotate(-16deg);
    }
}

@keyframes lash-top-center {
    100% {
        opacity: 0;
        transform: translateY(-5px);
    }
}

@keyframes lash-top-right {
    100% {
        opacity: 0;
        transform: translate(2px, -4px) rotate(16deg);
    }
}

@keyframes lash-bottom-left {
    100% {
        opacity: 0;
        transform: translate(-2px, 4px) rotate(16deg);
    }
}

@keyframes lash-bottom-center {
    100% {
        opacity: 0;
        transform: translateY(5px);
    }
}

@keyframes lash-bottom-right {
    100% {
        opacity: 0;
        transform: translate(2px, 4px) rotate(-16deg);
    }
}

.field-group .errorlist,
.form-errors .errorlist {
    margin: 0;
    padding: 0;
    list-style: none;
    color: var(--danger);
    font-size: 13px;
    font-weight: 800;
}

.form-errors {
    padding: 12px 13px;
    border: 1px solid color-mix(in srgb, var(--danger) 55%, var(--line));
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--danger) 13%, transparent);
}

.auth-actions {
    display: flex;
    justify-content: flex-end;
}

.auth-actions a,
.auth-switch a {
    color: var(--brand);
    font-weight: 900;
}

.auth-submit {
    width: 100%;
}

.auth-switch {
    margin: 0;
    color: var(--muted);
    text-align: center;
}

.demo-credentials {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--muted);
    background: var(--soft-bg);
    font-size: 13px;
}

.demo-credentials code {
    padding: 3px 7px;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--text);
    background: var(--input-bg);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12px;
}

.demo-credentials a {
    color: var(--brand);
    font-weight: 900;
}

.auth-result {
    width: min(760px, calc(100% - 32px));
    min-height: calc(100vh - 240px);
    display: grid;
    align-content: center;
    justify-items: center;
    margin: 0 auto;
    padding: 60px 0;
    text-align: center;
}

.control-head {
    width: min(1220px, calc(100% - 32px));
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin: 0 auto;
    padding: 42px 0 18px;
}

.control-head h1 {
    margin: 8px 0 10px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.04;
}

.control-nav {
    width: min(1220px, calc(100% - 32px));
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 auto 12px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel-bg);
    box-shadow: var(--shadow);
}

.control-nav a {
    padding: 8px 11px;
    border-radius: var(--radius);
    color: var(--nav-text);
    font-size: 14px;
    font-weight: 900;
}

.control-nav a:hover {
    color: var(--nav-hover-text);
    background: var(--hover-bg);
}

.control-stats {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    padding-top: 10px;
    padding-bottom: 20px;
}

.control-stat,
.control-panel,
.control-row,
.control-form {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .015)),
        var(--panel-bg);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.control-stat {
    display: grid;
    gap: 8px;
    padding: 18px;
    transition: border-color .16s ease, transform .16s ease;
}

.control-stat:hover {
    border-color: var(--brand);
    transform: translateY(-1px);
}

.control-stat span {
    color: var(--muted);
    font-weight: 800;
}

.control-stat strong {
    color: var(--brand-2);
    font-size: 30px;
    line-height: 1;
    text-shadow: 0 0 18px color-mix(in srgb, var(--brand-2) 24%, transparent);
}

.control-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.control-panel {
    overflow: hidden;
}

.control-list {
    display: grid;
}

.control-list a,
.control-list .muted {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
}

.control-list a:hover {
    background: var(--hover-bg);
}

.control-list a:last-child {
    border-bottom: 0;
}

.control-list strong {
    color: var(--accent);
    white-space: nowrap;
}

.control-table {
    display: grid;
    gap: 12px;
}

.control-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 20px;
    padding: 16px;
}

.control-row h2 {
    margin: 4px 0 6px;
    font-size: 22px;
    line-height: 1.18;
}

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

.control-row-actions,
.status-form,
.control-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.status-form .form-control {
    width: 170px;
    min-height: 36px;
}

.control-form {
    display: grid;
    gap: 14px;
    max-width: 860px;
    padding: 22px;
}

.control-form p {
    display: grid;
    gap: 7px;
    margin: 0;
}

.control-form label {
    color: var(--activity-text);
    font-weight: 900;
}

.control-form textarea {
    resize: vertical;
}

.control-form input[type="checkbox"] {
    width: auto;
    min-height: auto;
    justify-self: start;
}

.product-detail {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 430px;
    gap: 28px;
    padding: 34px 0;
}

.product-photo {
    width: 100%;
    aspect-ratio: 1.15;
    object-fit: cover;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-2);
}

.product-info {
    align-self: center;
}

.product-info h1 {
    margin: 10px 0 16px;
    font-size: clamp(34px, 4vw, 54px);
    line-height: 1.06;
}

.product-buy {
    justify-content: space-between;
    gap: 18px;
    margin: 24px 0;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .018)),
        var(--panel-bg);
    box-shadow: inset 0 1px rgba(255, 255, 255, .05);
}

.stock {
    color: var(--muted);
}

.inline-form {
    gap: 12px;
    align-items: end;
}

.qty-input {
    width: 92px;
}

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

.cart-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

.cart-table th,
.cart-table td {
    padding: 15px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: middle;
}

.cart-table th {
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
}

.qty-form {
    gap: 8px;
}

.cart-total {
    justify-content: flex-end;
    gap: 18px;
    margin-top: 18px;
}

.empty-state {
    padding: 64px 24px;
}

.checkout-layout {
    grid-template-columns: minmax(0, 1fr) 380px;
    align-items: start;
}

.form-panel,
.summary-panel,
.profile-panel {
    padding: 22px;
}

.profile-grid {
    grid-template-columns: minmax(0, 1fr) 320px;
    align-items: start;
}

.profile-panel {
    position: relative;
    overflow: hidden;
}

.profile-summary {
    min-height: 100%;
}

.profile-summary h2 {
    margin: 6px 0;
    color: var(--accent);
    font-size: 48px;
}

.profile-total {
    display: inline-flex;
    gap: 8px;
    margin-top: 12px;
    color: var(--muted);
}

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

.section-title.compact h2 {
    margin: 0;
}

.form-grid {
    display: grid;
    gap: 14px;
}

.form-grid label {
    display: grid;
    gap: 7px;
    color: var(--activity-text);
    font-size: 13px;
    font-weight: 800;
}

.form-error {
    color: var(--danger);
    font-weight: 700;
}

.summary-row,
.summary-total {
    justify-content: space-between;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
}

.summary-total {
    border-bottom: 0;
}

.split {
    grid-template-columns: .8fr 1fr;
    align-items: start;
}

.narrow {
    max-width: 640px;
}

.order-list {
    display: grid;
    gap: 14px;
}

.order-card {
    justify-content: space-between;
    gap: 18px;
    padding: 18px;
}

.stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-top: 10px;
    padding-bottom: 20px;
}

.stat-card {
    padding: 20px;
}

.stat-card span {
    display: block;
    color: var(--muted);
}

.two-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
}

.list-panel {
    overflow: hidden;
}

.list-panel a {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 15px 16px;
    border-bottom: 1px solid var(--line);
}

.list-panel a:last-child {
    border-bottom: 0;
}

.match-board,
.ranking-table {
    display: grid;
    gap: 12px;
}

.match-line {
    justify-content: space-between;
    gap: 20px;
    padding: 16px;
}

.versus {
    flex: 1;
    justify-content: center;
    gap: 18px;
    min-width: 0;
    font-size: 20px;
}

.versus span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.versus strong {
    color: var(--accent);
}

.ranking-line {
    display: grid;
    grid-template-columns: 40px 48px minmax(0, 1fr) auto auto;
    gap: 16px;
    padding: 16px;
}

.ranking-line h2 {
    margin: 0 0 3px;
}

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

.form-line {
    color: var(--brand-2);
    font-weight: 900;
}

.pagination {
    justify-content: center;
    gap: 12px;
    margin-top: 24px;
}

.pagination a,
.pagination span {
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
}

.messages {
    position: fixed;
    right: 18px;
    top: 128px;
    z-index: 40;
    display: grid;
    gap: 10px;
}

.message {
    max-width: 360px;
    padding: 12px 15px;
    border-radius: var(--radius);
    color: #061018;
    background: var(--accent);
    box-shadow: var(--shadow);
    font-weight: 800;
}

.message.success {
    background: var(--brand-2);
}

.message.error {
    color: #fff;
    background: var(--danger);
}

.message.info {
    background: var(--brand);
}

.site-footer {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    width: min(1220px, calc(100% - 32px));
    margin: 0 auto;
    padding: 28px 0 34px;
    color: var(--muted);
    border-top: 1px solid var(--line);
    background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--brand) 4%, transparent), transparent);
}

.error-body {
    min-height: 100vh;
}

.error-shell {
    width: min(900px, calc(100% - 32px));
    min-height: 100vh;
    display: grid;
    align-content: center;
    gap: 22px;
    margin: 0 auto;
    padding: 42px 0;
}

.error-brand {
    justify-self: center;
}

.error-card {
    position: relative;
    overflow: hidden;
    padding: clamp(28px, 6vw, 54px);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel-bg);
    box-shadow: var(--shadow);
    text-align: center;
}

.error-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 2px;
    background: linear-gradient(90deg, var(--brand), var(--logo-purple), var(--accent));
}

.error-code {
    margin: 0;
    color: var(--logo-purple);
    font-size: clamp(64px, 14vw, 132px);
    font-style: italic;
    font-weight: 1000;
    line-height: .86;
    text-shadow: 0 0 26px color-mix(in srgb, var(--logo-purple) 38%, transparent);
}

.error-card h1 {
    margin: 18px 0 12px;
    font-size: clamp(30px, 5vw, 52px);
    line-height: 1.06;
}

.error-card p:not(.error-code) {
    max-width: 620px;
    margin: 0 auto;
    color: var(--lead-text);
    font-size: 18px;
}

.error-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 26px;
}

.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
    font-weight: 900;
}

.footer-brand img {
    width: 26px;
    height: 26px;
    filter: drop-shadow(0 0 7px color-mix(in srgb, var(--logo-purple) 46%, transparent));
}

@media (max-width: 1080px) {
    .topbar {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 12px 0;
    }

    .main-nav,
    .user-nav {
        flex-wrap: wrap;
    }

    .brand {
        min-width: 0;
    }

    .portal-layout {
        grid-template-columns: minmax(0, 1fr) 300px;
    }

    .side-column:first-child {
        grid-column: 1 / -1;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .article-grid,
    .product-grid,
    .article-grid.compact,
    .product-grid.compact,
    .product-detail,
    .checkout-layout,
    .profile-grid,
    .split,
    .two-columns,
    .auth-shell,
    .control-stats,
    .control-grid {
        grid-template-columns: 1fr 1fr;
    }

    .product-detail,
    .checkout-layout,
    .profile-grid,
    .split,
    .auth-shell {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .topbar,
    .match-ticker,
    .portal-layout,
    .section,
    .page-head,
    .article-detail,
    .product-detail,
    .site-footer {
        width: min(100% - 24px, 1220px);
    }

    .topbar {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 7px 10px;
        min-height: auto;
        padding: 8px 0;
    }

    .brand {
        grid-column: 1;
        grid-row: 1;
        min-width: 0;
        gap: 8px;
    }

    .brand-emblem {
        width: 36px;
        height: 36px;
    }

    .brand-logo {
        width: 31px;
        height: 31px;
    }

    .brand-word {
        font-size: 18px;
    }

    .user-nav {
        grid-column: 2;
        grid-row: 1;
        min-width: 0;
        justify-content: flex-end;
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .user-nav::-webkit-scrollbar {
        display: none;
    }

    .main-nav {
        grid-column: 1 / -1;
        grid-row: 2;
        min-width: 0;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding: 1px 0 3px;
        scrollbar-width: none;
        -ms-overflow-style: none;
        -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 22px), transparent);
        mask-image: linear-gradient(90deg, #000 calc(100% - 22px), transparent);
    }

    .main-nav::-webkit-scrollbar {
        display: none;
    }

    .main-nav a,
    .user-nav a,
    .logout-form button {
        flex: 0 0 auto;
        padding: 7px 8px;
        font-size: 12px;
        white-space: nowrap;
    }

    .nav-count {
        min-width: 17px;
        height: 17px;
        margin-left: 3px;
        padding: 0 5px;
        font-size: 10px;
    }

    .theme-toggle {
        min-height: 30px;
        gap: 6px;
        padding: 3px 7px 3px 4px;
    }

    .theme-toggle-track {
        width: 36px;
        height: 22px;
    }

    .theme-toggle-dot {
        top: 4px;
        left: 4px;
        width: 14px;
        height: 14px;
    }

    html[data-theme="light"] .theme-toggle-dot {
        transform: translateX(14px);
    }

    .theme-toggle-text {
        display: none;
    }

    .match-ticker {
        gap: 8px;
        min-height: 42px;
        padding: 6px 0;
    }

    .ticker-label {
        padding: 5px 7px;
        font-size: 10px;
    }

    .ticker-track {
        gap: 8px;
    }

    .ticker-match {
        min-width: 205px;
        gap: 6px;
        padding: 6px 8px;
        font-size: 12px;
    }

    .ticker-event {
        max-width: 62px;
    }

    .status-pill {
        min-height: 20px;
        padding: 0 6px;
        font-size: 9px;
    }

    .portal-layout,
    .side-column:first-child,
    .article-grid,
    .product-grid,
    .article-grid.compact,
    .product-grid.compact,
    .stat-grid,
    .profile-grid,
    .two-columns,
    .store-strip,
    .control-stats,
    .control-grid,
    .control-row {
        grid-template-columns: 1fr;
    }

    .control-head {
        width: min(100% - 24px, 1220px);
        align-items: stretch;
        flex-direction: column;
        padding-top: 30px;
    }

    .control-nav {
        width: min(100% - 24px, 1220px);
    }

    .control-row-actions,
    .status-form,
    .control-actions {
        justify-content: flex-start;
    }

    .auth-shell {
        width: min(100% - 24px, 1040px);
        min-height: auto;
        padding: 34px 0;
    }

    .auth-card {
        padding: 20px;
    }

    .lead-story {
        min-height: 430px;
        padding: 22px;
    }

    .feed-item,
    .store-card,
    .match-line,
    .ranking-line {
        grid-template-columns: 1fr;
    }

    .feed-item img,
    .store-card img {
        width: 100%;
        height: 170px;
    }

    .section-head,
    .cart-total,
    .order-card,
    .site-footer,
    .inline-form,
    .search-form,
    .match-line,
    .versus {
        align-items: stretch;
        flex-direction: column;
    }

    .search-form {
        display: flex;
    }

    .versus {
        gap: 8px;
        text-align: center;
    }

    .messages {
        right: 12px;
        left: 12px;
        top: 140px;
    }

    .message {
        max-width: none;
    }
}

@media (max-width: 520px) {
    .topbar,
    .match-ticker,
    .portal-layout,
    .section,
    .page-head,
    .article-detail,
    .product-detail,
    .site-footer {
        width: min(100% - 18px, 1220px);
    }

    .brand-word {
        display: none;
    }

    .brand {
        flex: 0 0 auto;
    }

    .user-nav {
        max-width: calc(100vw - 68px);
    }

    .main-nav {
        gap: 4px;
    }

    .main-nav a,
    .user-nav a,
    .logout-form button {
        padding: 6px 7px;
        font-size: 11px;
    }

    .auth-button {
        min-height: 30px;
    }

    .match-ticker {
        min-height: 38px;
    }

    .ticker-match {
        min-width: 188px;
    }
}
