/* NIGHTFOREST — темна вітрина в дусі маркетплейсів ігрових товарів: плаваюча шапка, банер з рваними краями, картки з обкладинками */

@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url("fonts/inter-cyrillic.de93fdc85e3d.woff2") format("woff2");
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url("fonts/inter-latin.260c81a4759b.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "Unbounded";
    font-style: normal;
    font-weight: 600 800;
    font-display: swap;
    src: url("fonts/unbounded-cyrillic.3a5ed4d11365.woff2") format("woff2");
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
    font-family: "Unbounded";
    font-style: normal;
    font-weight: 600 800;
    font-display: swap;
    src: url("fonts/unbounded-latin.8616dc355070.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    color-scheme: dark;

    --bg: #121417;
    --surface: #1a1d22;
    --surface-2: #22262c;
    --surface-3: #2c3139;
    --line: #2a2f37;
    --text: #eceef1;
    --muted: #9ba2ac;
    --dim: #737a85;

    --green: #2ccf6e;
    --violet: #a587ff;
    --violet-strong: #8b66ff;
    --violet-bg: #1b1631;
    --violet-surface: #282048;
    --pink: #f6a8ff;
    --pink-bg: #4a1460;
    --amber: #f2c46b;
    --red: #f47a6a;

    --grad-buy: linear-gradient(100deg, #18a84f 0%, #10b98a 50%, #0bb4d6 100%);
    --grad-brand: linear-gradient(90deg, #3ddc84, #22d3c5);

    --r-s: 8px;
    --r: 12px;
    --r-l: 20px;
    --r-xl: 28px;

    --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-display: "Unbounded", "Inter", system-ui, sans-serif;

    --page: 1200px;
    --gutter: 20px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; }
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 16px/1.5 var(--font);
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: var(--violet); text-decoration: none; }
a:hover { color: #c3b0ff; }
h1, h2, h3 { line-height: 1.2; margin: 0; }
p { margin: 0; }
code {
    font: 600 0.92em/1 var(--font);
    background: rgba(165, 135, 255, 0.14);
    color: #cdbcff;
    padding: 2px 6px;
    border-radius: 6px;
    white-space: nowrap;
}
:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; border-radius: 6px; }

.visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}
.muted { color: var(--muted); }

.icon {
    width: 1.25em;
    height: 1.25em;
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ---- шапка */

.topbar-wrap {
    position: sticky;
    top: 0;
    z-index: 20;
    padding: 14px var(--gutter) 0;
    background: linear-gradient(var(--bg) 60%, rgba(18, 20, 23, 0));
}
.topbar {
    max-width: var(--page);
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 14px 10px 22px;
    background: var(--surface);
    border-radius: var(--r-l);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.brand {
    font: 800 21px/1 var(--font-display);
    letter-spacing: 0.02em;
    color: var(--text);
    white-space: nowrap;
}
.brand span {
    background: var(--grad-brand);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.brand:hover { color: var(--text); }

.nav { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    min-width: 72px;
    padding: 6px 10px;
    border-radius: var(--r);
    color: var(--muted);
    font-size: 13px;
    font-weight: 500;
    transition: color 0.15s, background-color 0.15s;
}
.nav-item .icon { width: 24px; height: 24px; }
.nav-item:hover { color: var(--text); background: var(--surface-2); }
.nav-item.is-active { color: var(--text); }
.nav-item.is-active .icon { color: var(--violet); }

.profile {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 6px;
    padding: 6px 6px 6px 8px;
    background: var(--surface-2);
    border-radius: 999px;
}
.avatar {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--grad-brand);
    color: #04150c;
    font: 800 14px/1 var(--font-display);
}
.profile-name { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 600; }
.profile form { display: flex; }

.icon-button {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: var(--surface-3);
    color: var(--muted);
    cursor: pointer;
    transition: color 0.15s, background-color 0.15s;
}
.icon-button:hover { color: var(--text); background: #363c46; }
.icon-button .icon { width: 18px; height: 18px; }

.test-mode {
    max-width: var(--page);
    margin: 10px auto 0;
    padding: 0 var(--gutter);
    text-align: center;
    font-size: 13px;
    color: var(--amber);
}

/* ---- кнопки */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 0 22px;
    border: 0;
    border-radius: var(--r-s);
    font: 700 16px/1.2 var(--font);
    cursor: pointer;
    text-align: center;
    transition: filter 0.15s, transform 0.15s, background-color 0.15s;
}
.btn:active { transform: translateY(1px); }
.btn--buy { background: var(--grad-buy); color: #03140b; }
.btn--buy:hover { color: #03140b; filter: brightness(1.08); }
.btn--violet { background: var(--violet-strong); color: #fff; }
.btn--violet:hover { color: #fff; background: #9a7bff; }
.btn--ghost { background: var(--surface-2); color: var(--text); }
.btn--ghost:hover { color: var(--text); background: var(--surface-3); }
.btn--small { min-height: 40px; padding: 0 16px; font-size: 14px; }
.btn--block { width: 100%; min-height: 54px; font-size: 18px; }

.link-button {
    border: 0;
    background: none;
    padding: 0;
    color: var(--violet);
    font: inherit;
    cursor: pointer;
}
.link-button:hover { text-decoration: underline; }
.link-button--danger { color: var(--red); white-space: nowrap; }

/* ---- сторінка */

.page {
    flex: 1;
    width: 100%;
    max-width: calc(var(--page) + 2 * var(--gutter));
    margin: 0 auto;
    padding: 18px var(--gutter) 64px;
}
.page-title { font: 700 30px/1.2 var(--font-display); margin: 12px 0 20px; }

.flash {
    margin-bottom: 16px;
    padding: 14px 18px;
    border-radius: var(--r);
    background: var(--surface);
    border-left: 4px solid var(--violet);
    font-weight: 500;
}
.flash--success { border-left-color: var(--green); }
.flash--error { border-left-color: var(--red); }

/* рвані краї — маски з art/torn*.svg */
.hero, .cover {
    -webkit-mask: url("art/torn.5321cc064715.svg") center / 100% 100% no-repeat;
    mask: url("art/torn.5321cc064715.svg") center / 100% 100% no-repeat;
}

/* ---- банер */

.hero {
    -webkit-mask-image: url("art/torn-wide.73ac9ebf6fdb.svg");
    mask-image: url("art/torn-wide.73ac9ebf6fdb.svg");
    position: relative;
    display: flex;
    align-items: center;
    min-height: 320px;
    padding: 44px 52px;
    background:
        linear-gradient(90deg, rgba(8, 11, 14, 0.92) 0%, rgba(8, 11, 14, 0.7) 38%, rgba(8, 11, 14, 0) 68%),
        url("art/forest.9fb37f5cf263.svg") center bottom / cover no-repeat,
        #0b1b25;
}
.hero-text { max-width: 560px; }
.chip {
    display: inline-block;
    margin-bottom: 14px;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #cfd8d3;
    font-size: 13px;
    font-weight: 600;
}
.hero h1 { font: 800 40px/1.12 var(--font-display); letter-spacing: -0.01em; margin-bottom: 14px; }
.gradient-text {
    background: var(--grad-brand);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.hero p { color: #c5cdc9; font-size: 17px; max-width: 480px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.hero .btn--ghost { background: rgba(255, 255, 255, 0.1); }
.hero .btn--ghost:hover { background: rgba(255, 255, 255, 0.16); }

/* ---- як отримати */

.how {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 24px;
    margin-top: 28px;
    padding: 18px;
    background: var(--violet-bg);
    border-radius: var(--r-xl);
    scroll-margin-top: 110px;
}
.how-tile {
    display: grid;
    place-items: center;
    aspect-ratio: 1;
    border-radius: var(--r-l);
    background:
        radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.18), transparent 55%),
        linear-gradient(145deg, #7a55ff, #3b2391);
    color: #fff;
}
.how-tile .icon { width: 46%; height: 46%; stroke-width: 1.3; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.35)); }
.how-body { display: flex; flex-direction: column; justify-content: center; gap: 16px; padding-right: 8px; }
.how-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.how-head h2 { font-size: 22px; font-weight: 700; }
.how-steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}
.how-steps li {
    display: flex;
    gap: 12px;
    padding: 14px;
    background: var(--violet-surface);
    border-radius: var(--r);
    color: #c9c2e4;
    font-size: 14px;
}
.how-steps strong { display: block; margin-bottom: 2px; color: var(--text); font-size: 16px; }
.step-num {
    display: grid;
    place-items: center;
    flex: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--violet-strong);
    color: #fff;
    font: 800 14px/1 var(--font-display);
}

/* ---- бейджі */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 9px 4px 7px;
    border-radius: var(--r-s);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
}
.badge .icon { width: 13px; height: 13px; stroke-width: 2.2; }
.badge--pink { background: var(--pink-bg); color: var(--pink); }

/* ---- вкладки категорій */

.catalog { margin-top: 32px; scroll-margin-top: 110px; }
.tabs {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
    border-bottom: 1px solid var(--line);
    margin-bottom: 22px;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: none;
    padding: 10px 12px 12px;
    border: 0;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    background: none;
    color: var(--muted);
    font: 500 17px/1.2 var(--font);
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
}
.tab:hover { color: var(--text); }
.tab[aria-pressed="true"] { color: var(--violet); border-bottom-color: var(--violet); }
.tab-count {
    padding: 1px 7px;
    border-radius: 999px;
    background: var(--surface-2);
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

/* ---- картки товарів */

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 28px 20px;
}
.card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: var(--text);
    min-width: 0;
}
.card:hover { color: var(--text); }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.card-head-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.card-head-text strong { font-size: 15px; font-weight: 600; }
.card-head-text span { font-size: 13px; color: var(--muted); }

.tile {
    display: grid;
    place-items: center;
    flex: none;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    color: #fff;
}
.tile .icon { width: 20px; height: 20px; }
.tile--priority { background: linear-gradient(145deg, #8b66ff, #4b2fb0); }
.tile--build { background: linear-gradient(145deg, #f0a43c, #9c4f12); }
.tile--gear { background: linear-gradient(145deg, #8fbf4a, #3f6a1e); }
.tile--supplies { background: linear-gradient(145deg, #5fb3d6, #24597a); }
.tile--transport { background: linear-gradient(145deg, #ee7462, #8f2c22); }
.tile--storage { background: linear-gradient(145deg, #4fc7ad, #1a6458); }

.card .cover { transition: transform 0.2s ease, filter 0.2s ease; }
.card:hover .cover { transform: translateY(-3px); filter: brightness(1.08); }
.card:hover .card-title { color: #fff; }

.price { color: var(--green); font: 700 19px/1.3 var(--font); margin-top: 6px; }
.price--large { font-size: 30px; margin: 0; }
.card-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: #dfe2e7;
    font-size: 16px;
}

/* ---- обкладинка товару */

.cover {
    position: relative;
    container-type: inline-size;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    color: #fff;
}
.cover--priority {
    background:
        radial-gradient(circle at 12% 18%, rgba(255, 255, 255, 0.5) 0 1px, transparent 2px),
        radial-gradient(circle at 34% 9%, rgba(255, 255, 255, 0.45) 0 1px, transparent 2px),
        radial-gradient(circle at 58% 22%, rgba(255, 255, 255, 0.35) 0 1px, transparent 2px),
        radial-gradient(120% 95% at 85% 0%, #9a7bff 0%, #5532c9 42%, #1d1250 100%);
}
.cover--build {
    background:
        repeating-linear-gradient(115deg, rgba(0, 0, 0, 0) 0 22px, rgba(0, 0, 0, 0.07) 22px 24px),
        radial-gradient(120% 95% at 85% 0%, #ffb455 0%, #c0631a 45%, #3e1c06 100%);
}
.cover--gear {
    background:
        repeating-linear-gradient(35deg, rgba(0, 0, 0, 0) 0 18px, rgba(0, 0, 0, 0.08) 18px 20px),
        radial-gradient(120% 95% at 85% 0%, #a9d062 0%, #557f29 45%, #142409 100%);
}
.cover--supplies {
    background:
        repeating-linear-gradient(90deg, rgba(0, 0, 0, 0) 0 26px, rgba(0, 0, 0, 0.08) 26px 28px),
        radial-gradient(120% 95% at 85% 0%, #72c4e6 0%, #2b6a8f 45%, #0b2131 100%);
}
.cover--transport {
    background:
        repeating-linear-gradient(135deg, rgba(0, 0, 0, 0) 0 20px, rgba(0, 0, 0, 0.08) 20px 22px),
        radial-gradient(120% 95% at 85% 0%, #ff8a73 0%, #a8352a 45%, #2e0b07 100%);
}
.cover--storage {
    background:
        repeating-linear-gradient(0deg, rgba(0, 0, 0, 0) 0 24px, rgba(0, 0, 0, 0.08) 24px 26px),
        radial-gradient(120% 95% at 85% 0%, #63d6bd 0%, #1f7a6a 45%, #062320 100%);
}
.cover-icon.icon {
    position: absolute;
    right: 5%;
    top: 13%;
    width: 50%;
    height: 50%;
    stroke-width: 1.15;
    opacity: 0.92;
    transform: rotate(-10deg);
    filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.35));
}
/* Колаж із предметами на всю обкладинку (880×660): місце під напис знизу ліворуч закладене в самому колажі */
.cover-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s ease;
}
.card:hover .cover-img { transform: scale(1.04); }
.cover--image .cover-title { font-size: 22px; font-size: 10cqi; }
.cover--image .cover-title--long { font-size: 18px; font-size: 8.5cqi; }

.cover-text {
    position: absolute;
    left: 7%;
    right: 7%;
    bottom: 9%;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.cover-title {
    font: 800 26px/1 var(--font-display);
    font-size: 12.5cqi;
    text-transform: uppercase;
    letter-spacing: -0.01em;
    text-shadow: 0 3px 14px rgba(0, 0, 0, 0.45);
    white-space: nowrap;
}
.cover-title--long { font-size: 22px; font-size: 10cqi; }
.cover-sub {
    font-size: 13px;
    font-size: max(11px, 4.6cqi);
    font-weight: 600;
    opacity: 0.85;
    text-transform: lowercase;
}
.cover .badge { position: absolute; top: 7%; right: 5%; }
.cover--large .badge { font-size: 14px; padding: 6px 12px 6px 9px; }
.cover--large .badge .icon { width: 16px; height: 16px; }

/* ---- сторінка товару */

.crumbs { display: flex; align-items: center; gap: 12px; margin: 10px 0 18px; }
.crumbs .icon-button { background: none; }
.crumbs .icon-button .icon { width: 22px; height: 22px; }

.product {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(300px, 1fr);
    gap: 48px;
    align-items: start;
}
.product-side { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 110px; }
.product-title { font-size: 20px; font-weight: 600; line-height: 1.35; }
.info-box {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 14px 16px;
    border-radius: var(--r);
    background: var(--surface);
}
.info-box strong { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; font-size: 16px; }
.info-box strong .icon { color: var(--amber); }
.info-box small { color: var(--muted); font-size: 13px; line-height: 1.45; }

.buy-form { display: flex; flex-direction: column; gap: 12px; }
.consent { display: flex; align-items: flex-start; gap: 10px; color: #cdd2d9; font-size: 14px; line-height: 1.45; cursor: pointer; }
.consent input { flex: none; width: 20px; height: 20px; margin: 0; accent-color: var(--green); cursor: pointer; }

.assurances { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; color: #cdd2d9; font-size: 14px; }
.assurances li { display: flex; align-items: center; gap: 10px; }
.assurances .icon { color: var(--green); width: 20px; height: 20px; }

.product-desc { max-width: 760px; margin-top: 40px; }
.product-desc h2, .related h2 { font-size: 22px; font-weight: 700; margin-bottom: 12px; }
.product-desc p { color: #d5d9df; font-size: 17px; line-height: 1.6; }
.related { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--line); }
.related h2 { margin-bottom: 20px; }

/* ---- мої покупки */

.note {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
    padding: 14px 18px;
    border-radius: var(--r);
    background: var(--surface);
    color: #cdd2d9;
}
.note .icon { color: var(--amber); margin-top: 1px; }
.note--violet { background: var(--violet-bg); color: #ddd5f7; }
.note--violet .icon { color: var(--violet); }

.order-list { list-style: none; margin: 20px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.order {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 16px;
    padding: 14px 18px;
    border-radius: var(--r);
    background: var(--surface);
}
.order .tile { width: 44px; height: 44px; border-radius: 12px; }
.order .tile .icon { width: 24px; height: 24px; }
.order-main { display: flex; flex-direction: column; min-width: 0; }
.order-main strong { font-size: 16px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.order-main span { color: var(--muted); font-size: 13px; }
.order-sum { font-weight: 700; white-space: nowrap; }
.order-states { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }

.pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--surface-3);
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}
.pill code { background: none; padding: 0; color: inherit; }
.pill--paid, .pill--done { background: rgba(44, 207, 110, 0.14); color: var(--green); }
.pill--created, .pill--pending, .pill--wait { background: rgba(242, 196, 107, 0.14); color: var(--amber); }
.pill--failed, .pill--expired, .pill--refunded { background: rgba(244, 122, 106, 0.14); color: var(--red); }
.pill--violet { background: rgba(165, 135, 255, 0.16); color: var(--violet); }

.empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 56px 20px;
    border-radius: var(--r-l);
    background: var(--surface);
    color: var(--muted);
    text-align: center;
}
.empty > .icon { width: 44px; height: 44px; stroke-width: 1.4; color: var(--dim); }

/* ---- тестова оплата */

.checkout {
    max-width: 520px;
    margin: 32px auto 0;
    padding: 28px;
    border-radius: var(--r-l);
    background: var(--surface);
}
.checkout h1 { font: 700 24px/1.2 var(--font-display); margin-bottom: 8px; }
.checkout .order { margin-top: 20px; padding: 14px; background: var(--surface-2); grid-template-columns: auto minmax(0, 1fr) auto; }
.checkout-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.checkout-actions .btn--buy { flex: 1; }

/* ---- адмінка */

.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.stat { display: flex; flex-direction: column; padding: 16px 18px; border-radius: var(--r); background: var(--surface); }
.stat span { color: var(--muted); font-size: 14px; }
.stat strong { font: 700 26px/1.3 var(--font-display); }
.stat small { color: var(--dim); font-size: 12px; }

.panel { margin-top: 18px; padding: 20px; border-radius: var(--r-l); background: var(--surface); }
.panel h2 { font-size: 19px; font-weight: 700; margin-bottom: 14px; }
.grant { display: flex; flex-wrap: wrap; gap: 10px; }
.field {
    min-height: 48px;
    padding: 0 14px;
    border: 1px solid transparent;
    border-radius: var(--r-s);
    background: var(--bg);
    color: var(--text);
    font: inherit;
}
.field:focus { border-color: var(--violet); outline: none; }
.grant .field { flex: 1 1 200px; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; white-space: nowrap; }
td code { background: none; padding: 0; color: var(--muted); font-weight: 500; }

/* ---- документи */

.legal { max-width: 800px; color: #d5d9df; }
.legal h1 { font: 700 30px/1.2 var(--font-display); margin: 12px 0 18px; color: var(--text); }
.legal h2 { font-size: 19px; margin: 28px 0 10px; color: var(--text); }
.legal p, .legal ul { line-height: 1.65; margin: 0 0 10px; }
.draft { padding: 12px 16px; border-radius: var(--r); background: rgba(242, 196, 107, 0.12); color: var(--amber); }

/* ---- підвал */

.footer { margin-top: auto; border-top: 1px solid var(--line); background: #0f1114; }
.footer-inner {
    max-width: calc(var(--page) + 2 * var(--gutter));
    margin: 0 auto;
    padding: 28px var(--gutter) 36px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 20px 40px;
}
.footer-brand p { margin-top: 6px; color: var(--dim); font-size: 13px; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px 22px; font-size: 14px; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--text); }
.pay-methods {
    flex-basis: 100%;
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}
.pay-methods li { display: flex; align-items: center; height: 40px; padding: 0 14px; border-radius: 8px; background: var(--surface-2); }
.pay-methods img { display: block; width: auto; height: 22px; }
.pay-methods .pay-visa { height: 15px; }

/* ---- адаптив */

@media (max-width: 960px) {
    .how { grid-template-columns: 1fr; }
    .how-tile { display: none; }
    .how-body { padding: 6px; }
    .product { grid-template-columns: 1fr; gap: 28px; }
    .product-side { position: static; }
}

@media (max-width: 760px) {
    :root { --gutter: 16px; }
    .footer-inner, .footer-links { justify-content: center; }
    .footer-brand { flex-basis: 100%; text-align: center; }
    .topbar { padding: 8px 8px 8px 16px; gap: 8px; }
    .brand { font-size: 17px; }
    .nav { gap: 2px; }
    .nav-item { min-width: 0; padding: 6px 8px; }
    .nav-item span { display: none; }
    .profile { margin-left: 2px; padding: 4px; }
    .profile-name { display: none; }
    .btn--small { padding: 0 12px; }

    /* місяць праворуч і нижче за кнопки */
    .hero { min-height: 0; padding: 36px 24px 215px; background:
        linear-gradient(180deg, rgba(8, 11, 14, 0.9) 0%, rgba(8, 11, 14, 0.55) 55%, rgba(8, 11, 14, 0) 80%),
        url("art/forest.9fb37f5cf263.svg") 88% bottom / auto 230px no-repeat,
        #0b1b25; }
    .hero h1 { font-size: 27px; }
    .hero p { font-size: 15px; }
    .how-steps { grid-template-columns: 1fr; }
    .how-head h2 { font-size: 19px; }

    .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 12px; }
    .card-head .tile { width: 30px; height: 30px; border-radius: 8px; }
    .card-head .tile .icon { width: 17px; height: 17px; }
    .card-head-text strong { font-size: 14px; }
    .card-head-text span { font-size: 12px; }
    .price { font-size: 17px; }
    .price--large { font-size: 26px; }
    .card-title { font-size: 14px; }
    .checkout { padding: 22px 18px; }
    .checkout-actions .btn { flex: 1 1 100%; }
    .cover .badge { font-size: 11px; padding: 3px 7px 3px 5px; }

    .page-title, .legal h1 { font-size: 24px; }
    .order { grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; padding: 12px 14px; }
    .order-states { grid-column: 2 / -1; justify-content: flex-start; }
}

@media (max-width: 480px) {
    /* логотип і так веде в магазин, а місця в шапці телефона замало */
    .nav-item--home { display: none; }
}

@media (max-width: 420px) {
    .btn--small .icon { display: none; }
    .tab { font-size: 15px; padding: 10px 8px 12px; }
}
