/* =========================================================
   Dedex — dark neural theme. No blue. Lime + magenta accents.
   ========================================================= */

:root {
    --bg-0: #07070a;
    --bg-1: #0b0b10;
    --bg-2: #101016;
    --bg-3: #15151d;
    --bg-4: #1c1c26;
    --line: #24242f;
    --line-2: #2e2e3c;
    --text: #e6e6ea;
    --text-dim: #a2a2ad;
    --text-mute: #6c6c77;
    --accent: #b8ff2e;           /* lime */
    --accent-2: #ff2ea8;          /* magenta */
    --accent-3: #8a5cff;          /* violet */
    --warn: #ffb23a;
    --danger: #ff4d5e;
    --ok: #55e6a5;
    --radius: 10px;
    --radius-sm: 6px;
    --shadow: 0 10px 30px rgba(0,0,0,.5);
    --mono: "JetBrains Mono", "SF Mono", ui-monospace, Menlo, Consolas, monospace;
    --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
    background: var(--bg-0);
    color: var(--text);
    font-family: var(--sans);
    font-size: 14px;
    line-height: 1.5;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    background-image:
        radial-gradient(ellipse 80% 50% at 50% -10%, rgba(184,255,46,.06), transparent 60%),
        radial-gradient(ellipse 60% 40% at 100% 10%, rgba(255,46,168,.04), transparent 60%),
        linear-gradient(var(--bg-0), var(--bg-0));
    background-attachment: fixed;
}

/* Subtle neural grid overlay */
body::before {
    content: "";
    position: fixed; inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255,255,255,.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.015) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse at center, black 40%, transparent 85%);
    z-index: 0;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img, svg { display: block; max-width: 100%; }

.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

/* ========== HEADER ========== */
.header {
    position: sticky; top: 0;
    z-index: 50;
    background: rgba(7,7,10,.8);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
}
.header__inner {
    display: flex; align-items: center; gap: 40px;
    height: 64px;
}

/* OS policy strip (under main nav) */
.header-os {
    border-top: 1px solid var(--line);
    background: rgba(11,11,16,.92);
}
.header-os__inner {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 9px 0 11px;
    font-size: 11.5px;
    line-height: 1.5;
    color: var(--text-dim);
    max-width: 1240px;
    margin: 0 auto;
    padding-left: 24px;
    padding-right: 24px;
}
.header-os__label {
    flex-shrink: 0;
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--accent);
    padding-top: 3px;
    white-space: nowrap;
}
.header-os__text { margin: 0; }
@media (max-width: 720px) {
    .header-os__inner {
        flex-direction: column;
        gap: 6px;
        padding-top: 10px;
        padding-bottom: 12px;
    }
    .header-os__label { padding-top: 0; }
}

/* OS strip: hide on scroll-down (see header-os-scroll.js) — mobile only */
@media (max-width: 640px) {
    .header-os {
        overflow: hidden;
        transition: max-height 0.3s ease, opacity 0.2s ease, border-color 0.2s ease, visibility 0.2s;
        max-height: 1000px;
    }
    .header--hide-os .header-os {
        max-height: 0;
        opacity: 0;
        visibility: hidden;
        border-top-color: transparent;
    }
    @media (prefers-reduced-motion: reduce) {
        .header-os { transition: none; }
    }
}
.logo {
    display: inline-flex; align-items: center; gap: 10px;
    font-family: var(--mono); font-weight: 700; font-size: 16px;
    letter-spacing: .02em;
}
.logo__mark {
    width: 26px; height: 26px;
    border-radius: 6px;
    background:
        linear-gradient(135deg, var(--accent) 0%, var(--accent-3) 100%);
    position: relative;
    box-shadow: 0 0 24px rgba(184,255,46,.25);
}
.logo__mark::after {
    content: "";
    position: absolute; inset: 3px;
    border-radius: 4px;
    background: var(--bg-0);
}
.logo__mark::before {
    content: "";
    position: absolute; inset: 0;
    border-radius: 6px;
    background:
        radial-gradient(circle at 30% 30%, rgba(255,255,255,.3), transparent 40%);
    z-index: 1;
}
.logo__text { color: var(--text); }
.logo__text span { color: var(--accent); }

.nav {
    display: flex;
    gap: 20px 28px;
    align-items: center;
    flex: 1;
    min-width: 0;
    flex-wrap: wrap;
}
.nav a {
    color: var(--text-dim);
    font-size: 13px;
    font-weight: 500;
    transition: color .15s;
    flex-shrink: 0;
}
.nav a:hover, .nav a.is-active { color: var(--text); }

.header__right { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.status-pill {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-family: var(--mono);
    font-size: 11px;
    color: var(--text-dim);
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.status-dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--ok);
    box-shadow: 0 0 10px var(--ok);
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .4; }
}

/* ========== BUTTONS ========== */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 13px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text);
    transition: all .15s;
    white-space: nowrap;
    font-family: var(--sans);
}
.btn--primary {
    background: var(--accent);
    color: #0b0b0b;
    border-color: var(--accent);
    box-shadow: 0 0 0 0 rgba(184,255,46,.4);
}
.btn--primary:hover {
    background: #c9ff4d;
    box-shadow: 0 0 22px rgba(184,255,46,.35);
}
.btn--ghost {
    background: var(--bg-2);
    border-color: var(--line);
    color: var(--text);
}
.btn--ghost:hover {
    border-color: var(--line-2);
    background: var(--bg-3);
}
.btn--outline {
    background: transparent;
    border-color: var(--line-2);
    color: var(--text);
}
.btn--outline:hover { border-color: var(--accent); color: var(--accent); }
.btn--sm { padding: 7px 12px; font-size: 12px; }
.btn--lg { padding: 13px 22px; font-size: 14px; }
.btn--block { width: 100%; }
.btn[disabled], .btn.is-disabled {
    opacity: .45;
    cursor: not-allowed;
    pointer-events: none;
}

/* ========== HERO ========== */
.hero { padding: 72px 0 56px; position: relative; }
.hero__grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.hero__eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 5px 10px;
    background: rgba(184,255,46,.06);
    border: 1px solid rgba(184,255,46,.25);
    border-radius: 999px;
    font-family: var(--mono);
    font-size: 11px;
    color: var(--accent);
    margin-bottom: 20px;
}
.hero h1 {
    font-size: 56px;
    line-height: 1.05;
    font-weight: 700;
    letter-spacing: -.02em;
    margin: 0 0 18px;
}
.hero h1 .grad {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-3) 60%, var(--accent-2) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero p.lead {
    font-size: 16px;
    color: var(--text-dim);
    max-width: 540px;
    margin: 0 0 28px;
}
.hero__cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero__meta {
    display: grid; grid-template-columns: repeat(3,1fr); gap: 0;
    margin-top: 40px;
    border-top: 1px solid var(--line);
    padding-top: 24px;
}
.hero__meta > div { padding-right: 16px; }
.hero__meta strong {
    display: block;
    font-family: var(--mono);
    font-size: 22px;
    color: var(--text);
    font-weight: 600;
    margin-bottom: 2px;
}
.hero__meta span { color: var(--text-mute); font-size: 12px; }

/* Hero terminal */
.term {
    background: var(--bg-1);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    font-family: var(--mono);
    font-size: 12.5px;
    overflow: hidden;
    box-shadow: var(--shadow);
    position: relative;
}
.term::before {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: var(--radius);
    padding: 1px;
    background: linear-gradient(135deg, rgba(184,255,46,.35), transparent 40%, rgba(138,92,255,.35));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    pointer-events: none;
}
.term__bar {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 14px;
    background: var(--bg-2);
    border-bottom: 1px solid var(--line);
}
.term__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--bg-4); }
.term__dot:nth-child(1) { background: #ff5f56; }
.term__dot:nth-child(2) { background: #ffbd2e; }
.term__dot:nth-child(3) { background: #27c93f; }
.term__title { margin-left: 8px; color: var(--text-mute); font-size: 11px; }
.term__body { padding: 18px 20px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.term__line {
    color: var(--text-dim);
    white-space: pre-wrap;
    word-break: break-word;
    overflow-wrap: anywhere;
    font-size: 12.5px;
}
@media (max-width: 500px) {
    .term { font-size: 11.5px; }
    .term__body { padding: 14px; }
    .term__line { font-size: 11px; }
}
.term__line .prompt { color: var(--accent); }
.term__line .arg { color: var(--text); }
.term__line .cmt { color: var(--text-mute); }
.term__line .ok { color: var(--ok); }
.term__line .warn { color: var(--warn); }
.term__line .mag { color: var(--accent-2); }
.caret::after {
    content: "▮";
    color: var(--accent);
    animation: blink 1s steps(2) infinite;
    margin-left: 2px;
}
@keyframes blink {
    50% { opacity: 0; }
}

/* ========== SECTION HEADER ========== */
.section { padding: 72px 0; position: relative; }
.section__head {
    display: flex; align-items: flex-end; justify-content: space-between;
    margin-bottom: 28px;
    gap: 24px;
    flex-wrap: wrap;
}
.section__title {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -.015em;
    margin: 0;
}
.section__sub {
    color: var(--text-dim);
    margin: 6px 0 0;
    font-size: 14px;
}

/* ========== TABS ========== */
.tabs {
    display: flex;
    flex-wrap: nowrap;
    padding: 4px;
    background: var(--bg-2);
    border: 1px solid var(--line);
    border-radius: 10px;
    gap: 4px;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
    padding: 9px 18px;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-dim);
    background: transparent;
    border: none;
    display: inline-flex; align-items: center; gap: 8px;
    transition: all .15s;
    flex: 0 0 auto;
}
@media (max-width: 500px) {
    .tab { padding: 8px 14px; font-size: 12px; }
    .tab__icon { width: 12px; height: 12px; }
}
.tab:hover { color: var(--text); }
.tab.is-active {
    background: var(--bg-4);
    color: var(--text);
    box-shadow: inset 0 0 0 1px var(--line-2);
}
.tab__icon { width: 14px; height: 14px; opacity: .9; }
.tab.is-active .tab__icon { color: var(--accent); }

/* ========== COUNTRY SELECTOR ========== */
.country-bar {
    margin: 24px 0 28px;
    padding: 14px 16px;
    background: var(--bg-1);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    display: flex; align-items: center; gap: 14px;
    flex-wrap: wrap;
}
.country-bar__label {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--text-mute);
    letter-spacing: .1em;
    text-transform: uppercase;
    padding-right: 6px;
    border-right: 1px solid var(--line);
    flex-shrink: 0;
}
.country-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    flex: 1;
    min-width: 0;
}
.chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 12px;
    min-height: 40px;
    background: var(--bg-2);
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 12.5px;
    color: var(--text-dim);
    transition: all .15s;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}
.chip:hover { color: var(--text); border-color: var(--line-2); }
.chip.is-active {
    background: rgba(184,255,46,.08);
    border-color: rgba(184,255,46,.4);
    color: var(--text);
}
.chip__flag {
    font-size: 16px;
    line-height: 1;
    filter: saturate(1.1);
}
.chip__vat {
    font-family: var(--mono);
    font-size: 10px;
    color: var(--text-mute);
    background: var(--bg-0);
    padding: 2px 6px;
    border-radius: 4px;
    flex-shrink: 0;
}
.chip.is-active .chip__vat { color: var(--accent); }

/* ========== SERVER LIST (compact rows) ========== */
.server-list {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-1);
}
.server-list__head {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1.3fr .9fr 1fr 160px;
    padding: 12px 20px;
    gap: 16px;
    border-bottom: 1px solid var(--line);
    background: var(--bg-2);
    font-family: var(--mono);
    font-size: 10.5px;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--text-mute);
}

.server-row {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1.3fr .9fr 1fr 160px;
    padding: 18px 20px;
    gap: 16px;
    align-items: center;
    border-bottom: 1px solid var(--line);
    transition: background .15s;
    position: relative;
}
.server-row:last-child { border-bottom: none; }
.server-row:hover { background: var(--bg-2); }

.server-row.is-soldout { opacity: .72; }
.server-row.is-soldout::after {
    content: "";
    position: absolute; inset: 0;
    background-image: repeating-linear-gradient(
        -45deg,
        transparent 0 8px,
        rgba(255,77,94,.03) 8px 16px
    );
    pointer-events: none;
}

.server-row.is-promo {
    background:
        linear-gradient(90deg, rgba(184,255,46,.04), transparent 60%);
}
.server-row.is-featured {
    background:
        linear-gradient(90deg, rgba(138,92,255,.06), transparent 60%);
}

.s-name {
    display: flex; flex-direction: column; gap: 4px;
}
.s-name strong {
    font-family: var(--mono);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .02em;
    color: var(--text);
    display: inline-flex; align-items: center; gap: 8px;
}
.s-tag {
    display: inline-flex; align-items: center;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: var(--mono);
    font-size: 9.5px;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-weight: 600;
}
.s-tag--promo { background: rgba(184,255,46,.12); color: var(--accent); }
.s-tag--new   { background: rgba(138,92,255,.15); color: var(--accent-3); }
.s-tag--hot   { background: rgba(255,46,168,.12); color: var(--accent-2); }
.s-tag--beast { background: rgba(255,178,58,.12); color: var(--warn); }
.s-tag--sold  { background: rgba(255,77,94,.12); color: var(--danger); }
.s-name small { color: var(--text-mute); font-size: 11.5px; }

.spec {
    font-family: var(--mono);
    font-size: 12.5px;
    color: var(--text);
    display: flex; align-items: center; gap: 6px;
}
.spec .k { color: var(--text-mute); font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; margin-right: 4px; }

.price {
    display: flex; flex-direction: column; align-items: flex-end; gap: 2px;
}
.price__val {
    font-family: var(--mono);
    font-size: 20px;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -.01em;
}
.price__val .cur { color: var(--accent); font-weight: 700; }
.price__unit { color: var(--text-mute); font-size: 11px; }
.price__base {
    color: var(--text-mute);
    font-size: 11px;
    text-decoration: line-through;
}

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

@media (max-width: 960px) {
    .server-list__head { display: none; }
    .server-row {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 16px;
    }
    .price { align-items: flex-start; }
    .actions { justify-content: stretch; }
    .actions .btn { width: 100%; max-width: 100%; justify-content: center; }
}

/* Build-your-own tile */
.byo-tile {
    margin-top: 18px;
    padding: 22px;
    border: 1px dashed var(--line-2);
    border-radius: var(--radius);
    background:
        linear-gradient(135deg, rgba(184,255,46,.03), rgba(138,92,255,.03));
    display: flex; align-items: center; gap: 18px;
    flex-wrap: wrap;
}
.byo-tile__icon {
    width: 48px; height: 48px;
    border-radius: 10px;
    background: var(--bg-2);
    border: 1px solid var(--line);
    display: grid; place-items: center;
    color: var(--accent);
    flex-shrink: 0;
}
.byo-tile__txt { flex: 1; min-width: 260px; }
.byo-tile__txt h3 { margin: 0 0 4px; font-size: 16px; }
.byo-tile__txt p { margin: 0; color: var(--text-dim); font-size: 13px; }

/* ========== FEATURE STRIP ========== */
.features {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-top: 18px;
}
.feature {
    padding: 18px;
    background: var(--bg-1);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}
.feature__ico {
    width: 32px; height: 32px;
    border-radius: 8px;
    background: var(--bg-3);
    border: 1px solid var(--line);
    display: grid; place-items: center;
    color: var(--accent);
    margin-bottom: 12px;
}
.feature h4 { margin: 0 0 4px; font-size: 14px; font-weight: 600; }
.feature p { margin: 0; color: var(--text-dim); font-size: 12.5px; line-height: 1.5; }
@media (max-width: 900px) { .features { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 540px) { .features { grid-template-columns: 1fr; } }

/* ========== PAYMENT / CRYPTO ========== */
.pay-row {
    display: grid;
    grid-template-columns: repeat(6,1fr);
    gap: 10px;
    margin-top: 18px;
}
.pay {
    padding: 16px 10px;
    text-align: center;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg-1);
    font-family: var(--mono);
    font-size: 12px;
    color: var(--text-dim);
    transition: all .15s;
}
.pay:hover { color: var(--text); border-color: var(--line-2); }
.pay__sym {
    font-size: 20px;
    display: block;
    margin-bottom: 4px;
    color: var(--accent);
    font-weight: 700;
}
@media (max-width: 720px) { .pay-row { grid-template-columns: repeat(3,1fr); } }

/* ========== FOOTER ========== */
.footer {
    padding: 48px 0 24px;
    border-top: 1px solid var(--line);
    margin-top: 48px;
    color: var(--text-mute);
    font-size: 12.5px;
}
.footer__grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 32px;
    margin-bottom: 32px;
}
.footer h5 {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--text-dim);
    margin: 0 0 14px;
}
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin-bottom: 8px; }
.footer a { color: var(--text-mute); transition: color .15s; }
.footer a:hover { color: var(--text); }
.footer__bottom {
    display: flex; justify-content: space-between; gap: 16px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
    flex-wrap: wrap;
}
@media (max-width: 800px) {
    .footer__grid { grid-template-columns: 1fr 1fr; }
}

/* ========== MODAL ========== */
.modal-backdrop {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.75);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: none;
    align-items: center; justify-content: center;
    z-index: 200;
    padding: max(12px, env(safe-area-inset-top, 0px)) 12px max(12px, env(safe-area-inset-bottom, 0px));
    overflow: hidden;
    box-sizing: border-box;
}
.modal-backdrop.is-open { display: flex; }
.modal {
    width: 100%;
    max-width: 520px;
    max-height: min(90dvh, 100vh);
    max-height: min(90vh, 100vh);
    background: var(--bg-1);
    border: 1px solid var(--line-2);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    margin: 0;
}
.modal__head {
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
    display: flex; justify-content: space-between; align-items: center;
    gap: 12px;
    flex-shrink: 0;
    min-height: 48px;
}
.modal__head h3 {
    margin: 0;
    font-size: 15px;
    line-height: 1.3;
    word-break: break-word;
    padding-right: 8px;
}
.modal__close {
    background: transparent; border: none;
    color: var(--text-mute); font-size: 24px;
    line-height: 1;
    padding: 4px 8px;
    margin: -4px -8px -4px 0;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
}
.modal__close:hover { color: var(--text); }
.modal__body {
    padding: 16px 16px 20px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    flex: 1;
    min-height: 0;
    overscroll-behavior: contain;
    touch-action: pan-y;
}
.modal__body p { color: var(--text-dim); font-size: 13.5px; margin: 0 0 12px; }
.modal__body .btn--primary,
.modal__body .btn--ghost { width: 100%; max-width: 100%; }
.modal__actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
    width: 100%;
}
@media (min-width: 400px) {
    .modal__head { padding: 16px 20px; }
    .modal__body { padding: 20px 22px 22px; }
    .modal__body .btn--primary,
    .modal__body .btn--ghost { width: auto; }
    .modal__actions { flex-direction: row; flex-wrap: wrap; }
}

.order-summary {
    background: var(--bg-2);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 12px 12px 14px;
    margin: 12px 0;
    font-family: var(--mono);
    font-size: 12px;
}
.order-summary .row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px 12px;
    padding: 4px 0;
    color: var(--text-dim);
}
.order-summary .row > span:first-child { flex: 0 1 auto; color: var(--text-mute); }
.order-summary .row > strong { text-align: right; font-weight: 500; color: var(--text); word-break: break-word; min-width: 0; }
.order-summary .total {
    border-top: 1px dashed var(--line-2);
    margin-top: 6px; padding-top: 8px;
    font-size: 14px;
    color: var(--text);
}
.order-summary .total .cur { color: var(--accent); }
@media (max-width: 480px) {
    .order-summary .row:not(.total) { flex-direction: column; align-items: stretch; padding: 6px 0; }
    .order-summary .row:not(.total) > strong { text-align: left; }
    .order-summary .row.total {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding-top: 10px;
    }
}

/* ========== CONFIGURATOR PAGE ========== */
.page-title {
    padding: 48px 0 8px;
}
.page-title h1 {
    font-size: 40px;
    margin: 0 0 8px;
    letter-spacing: -.02em;
}
.page-title p { color: var(--text-dim); margin: 0; max-width: 640px; }

.config-grid {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 28px;
    margin-top: 32px;
}
@media (max-width: 960px) {
    .config-grid { grid-template-columns: 1fr; }
}

.config-card {
    background: var(--bg-1);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 22px;
    margin-bottom: 18px;
}
.config-card__head {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 16px;
}
.config-card h3 { margin: 0; font-size: 16px; }

.opt-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}
.opt {
    position: relative;
    border: 1px solid var(--line);
    background: var(--bg-2);
    border-radius: var(--radius-sm);
    padding: 14px;
    cursor: pointer;
    transition: all .15s;
}
.opt:hover { border-color: var(--line-2); }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt.is-checked {
    border-color: var(--accent);
    background: rgba(184,255,46,.05);
}
.opt__title {
    font-family: var(--mono);
    font-size: 13px;
    color: var(--text);
    margin-bottom: 4px;
    display: flex; justify-content: space-between; align-items: center;
}
.opt__title .tick {
    width: 14px; height: 14px; border-radius: 50%;
    border: 1px solid var(--line-2);
    display: inline-grid; place-items: center;
}
.opt.is-checked .tick { background: var(--accent); border-color: var(--accent); }
.opt.is-checked .tick::after {
    content: "";
    width: 6px; height: 6px;
    background: #0b0b0b; border-radius: 50%;
}
.opt__desc { color: var(--text-mute); font-size: 11.5px; font-family: var(--mono); }
.opt__price { color: var(--accent); font-size: 12px; font-family: var(--mono); margin-top: 6px; }

.summary {
    position: sticky; top: 80px;
    background: var(--bg-1);
    border: 1px solid var(--line-2);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow);
}
.summary h3 {
    margin: 0 0 16px;
    font-size: 15px;
    display: flex; align-items: center; gap: 8px;
}
.summary h3::before {
    content: "";
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent);
}
.summary__rows {
    font-family: var(--mono);
    font-size: 12.5px;
}
.summary__rows .r {
    display: flex; justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px dashed var(--line);
    color: var(--text-dim);
}
.summary__rows .r strong { color: var(--text); font-weight: 500; }
.summary__total {
    display: flex; justify-content: space-between;
    padding: 14px 0 4px;
    font-size: 15px;
    color: var(--text);
    font-family: var(--mono);
    font-weight: 600;
    margin-top: 6px;
    border-top: 1px solid var(--line-2);
}
.summary__total .cur { color: var(--accent); }
.summary__vat {
    font-size: 11px; color: var(--text-mute);
    margin-bottom: 14px;
    font-family: var(--mono);
}

/* ========== TERMS PAGE ========== */
.terms-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 40px;
    margin: 40px 0 80px;
}
@media (max-width: 840px) { .terms-layout { grid-template-columns: 1fr; } }

.terms-toc {
    position: sticky; top: 80px;
    align-self: start;
    border-left: 1px solid var(--line);
    padding-left: 16px;
}
.terms-toc a {
    display: block;
    font-size: 12.5px;
    color: var(--text-mute);
    padding: 5px 0;
    transition: color .15s;
}
.terms-toc a:hover { color: var(--text); }

.terms-content h2 {
    font-size: 20px;
    margin: 40px 0 12px;
    scroll-margin-top: 80px;
}
.terms-content h2:first-child { margin-top: 0; }
.terms-content p, .terms-content li {
    color: var(--text-dim);
    font-size: 13.5px;
    line-height: 1.65;
}
.terms-content li { margin-bottom: 6px; }
.terms-content strong { color: var(--text); }

.notice {
    padding: 14px 16px;
    border-left: 2px solid var(--accent);
    background: rgba(184,255,46,.04);
    border-radius: 6px;
    margin: 18px 0;
    font-size: 13px;
    color: var(--text);
}
.notice.warn { border-color: var(--warn); background: rgba(255,178,58,.05); }
.notice.danger { border-color: var(--danger); background: rgba(255,77,94,.05); }

/* ========== RESPONSIVE HERO & MOBILE ========== */
@media (max-width: 1024px) {
    .header__inner { gap: 10px 12px; flex-wrap: nowrap; align-items: center; }
    .nav {
        flex: 1 1 auto;
        min-width: 0;
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        mask-image: linear-gradient(90deg, #000 0%, #000 88%, transparent 100%);
        padding: 2px 0 4px;
        gap: 12px 18px;
    }
    .nav::-webkit-scrollbar { display: none; }
    .nav a { font-size: 12px; }
    .header__right { margin-left: 0; flex-wrap: nowrap; }
}

@media (max-width: 900px) {
    .hero { padding: 40px 0 24px; }
    .hero__grid { grid-template-columns: 1fr; gap: 32px; }
    .hero h1 { font-size: 38px; }
    .section { padding: 48px 0; }
    .header__inner { min-height: 56px; height: auto; padding: 8px 0; }
    .logo { font-size: 15px; }
    .status-pill { display: none; }
    .header__right .btn--sm { padding: 7px 10px; font-size: 11px; }
    .header-os__text { font-size: 11px; line-height: 1.5; }
}

@media (max-width: 640px) {
    .container { padding: 0 16px; }
    .hero h1 { font-size: 28px; line-height: 1.1; }
    .hero__eyebrow { font-size: 10px; max-width: 100%; white-space: normal; text-align: left; }
    .hero p.lead { font-size: 15px; }
    .section__title { font-size: 22px; }
    .section__head { margin-bottom: 20px; }
    .header__inner {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 8px;
        min-height: 48px;
    }
    .logo { order: 0; }
    .header__right {
        order: 1;
        margin-left: auto;
    }
    .nav {
        order: 3;
        flex: 0 0 100%;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        mask-image: none;
        border-top: 1px solid var(--line);
        margin: 0 -16px 0;
        padding: 8px 16px 2px;
        justify-content: flex-start;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .server-list__head { display: none; }
    .server-row { padding: 16px 14px; }
    .s-name strong { flex-wrap: wrap; row-gap: 4px; }
    .price { align-items: flex-start; }
    .summary { position: static; margin-top: 8px; }
    .page-title h1 { font-size: 28px; }
    .page-title { padding: 28px 0 0; }
    .opt-grid { grid-template-columns: 1fr; }
    .byo-tile { flex-direction: column; align-items: stretch; text-align: left; }
    .byo-tile .btn { width: 100%; }
    .footer__grid { grid-template-columns: 1fr; }
    .config-card { padding: 16px; }
    .terms-toc {
        position: static;
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 0 4px;
        max-width: 100%;
        width: 100%;
        border-left: none;
        border-bottom: 1px solid var(--line);
        padding: 0 0 10px 0;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .terms-toc::-webkit-scrollbar { display: none; }
    .terms-toc a { flex: 0 0 auto; white-space: nowrap; font-size: 12px; padding: 4px 8px; }
    .hero__meta {
        grid-template-columns: 1fr;
        gap: 14px;
        padding-top: 20px;
    }
    .hero__meta > div { padding-right: 0; }
}

@media (max-width: 380px) {
    .header__right .btn--primary { padding-left: 8px; padding-right: 8px; }
    .header__right .btn--outline { padding-left: 8px; padding-right: 8px; }
}

/* Country selector: one horizontal swipe row, label on its own line */
@media (max-width: 600px) {
    .country-bar {
        flex-direction: column;
        align-items: stretch;
        padding: 0;
        margin: 16px 0 20px;
        border-radius: var(--radius);
        overflow: hidden;
    }
    .country-bar__label {
        border-right: 0;
        padding: 10px 14px 0;
        width: 100%;
        display: block;
    }
    .country-chips {
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x proximity;
        gap: 8px;
        padding: 8px 14px 14px;
        margin: 0;
        width: 100%;
        max-width: 100%;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    .country-chips::-webkit-scrollbar { display: none; }
    .chip {
        flex: 0 0 auto;
        scroll-snap-align: start;
        padding: 8px 14px;
    }
}

/* utilities */
.hide { display: none !important; }
.mono { font-family: var(--mono); }
.muted { color: var(--text-mute); }
.dim { color: var(--text-dim); }
.accent { color: var(--accent); }

/* scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-0); }
::-webkit-scrollbar-thumb { background: var(--bg-4); border-radius: 5px; border: 2px solid var(--bg-0); }
::-webkit-scrollbar-thumb:hover { background: var(--line-2); }
