/* ChillProxy — светлый SaaS-скин с тёмным hero и неон-зелёным акцентом.
 * Перевод дизайн-токенов из tokens.jsx в CSS-переменные + layout.
 */

/* ─── Tokens ──────────────────────────────────────────────────────────── */
:root {
    --bg:          #fafaf9;
    --panel:       #ffffff;
    --panel-alt:   #f5f5f4;
    --border:      #ececec;
    --border-strong: #e0e0df;
    --text:        #0c0c0c;
    --text-dim:    #6b6b68;
    --text-mute:   #9a9a95;

    --hero-bg:     #0a0a0a;
    --hero-text:   #fafaf9;
    --hero-dim:    rgba(250, 250, 249, 0.55);
    --hero-border: rgba(255, 255, 255, 0.08);

    --accent:      #00ff88;
    --accent-on:   #001a0e;
    --accent-soft: #00c46a;
    --accent-bg:   #e6fff2;

    --ping-good:   #00c46a;
    --ping-ok:     #e0b400;
    --ping-bad:    #f15b3a;

    --mask-dd-bg:  #eef4ff;
    --mask-dd-fg:  #3563c9;
    --mask-ee-bg:  #e6fff2;
    --mask-ee-fg:  #008a4d;

    --font-sans:    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
    --font-display: "Inter Tight", -apple-system, "Inter", system-ui, sans-serif;
    --font-mono:    "JetBrains Mono", ui-monospace, SF Mono, Menlo, monospace;

    --r-xs: 4px;
    --r-sm: 6px;
    --r-md: 10px;
    --r-lg: 14px;
    --r-xl: 20px;

    --shadow-card:  0 20px 50px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.04);
    --shadow-sheet: 0 -10px 40px rgba(0, 0, 0, 0.15);
}

/* ─── Reset ───────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }

/* ─── Header ──────────────────────────────────────────────────────────── */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--panel);
    border-bottom: 1px solid var(--border);
}
.site-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 40px;
    max-width: 1320px;
    margin: 0 auto;
}
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
}
.brand-mark {
    width: 22px;
    height: 22px;
    border-radius: 5px;
    background: var(--text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-weight: 700;
    flex-shrink: 0;
}
.brand-mark svg { width: 14px; height: 14px; }
.brand-name {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 17px;
    letter-spacing: -0.3px;
}
.brand-version {
    font-size: 12px;
    color: var(--text-mute);
    font-variant-numeric: tabular-nums;
    margin-left: 4px;
}
.site-nav {
    display: flex;
    gap: 28px;
    font-size: 14px;
    color: var(--text-dim);
}
.site-nav a {
    cursor: pointer;
    transition: color .12s;
}
.site-nav a:hover { color: var(--text); }
.site-nav a.active { color: var(--text); font-weight: 500; }

.header-actions { display: flex; gap: 12px; align-items: center; }
.live-count {
    font-size: 13px;
    color: var(--text-dim);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-variant-numeric: tabular-nums;
}
.live-pulse {
    width: 8px; height: 8px;
    position: relative;
    display: inline-block;
}
.live-pulse::before,
.live-pulse::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    background: var(--ping-good);
}
.live-pulse::before {
    inset: 0;
    animation: chillpulse 1.6s ease-out infinite;
}
.live-pulse::after {
    inset: 2px;
}
@keyframes chillpulse {
    0%   { opacity: 0.75; transform: scale(1); }
    70%  { opacity: 0; transform: scale(2.2); }
    100% { opacity: 0; transform: scale(2.2); }
}

.btn-primary {
    background: var(--text);
    color: var(--bg);
    border: none;
    padding: 9px 14px;
    border-radius: var(--r-sm);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition: background .12s, transform .12s;
}
.btn-primary:hover { background: #1f1f1f; }
.btn-primary:active { transform: translateY(1px); }

.btn-secondary {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border-strong);
    padding: 8px 13px;
    border-radius: var(--r-sm);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-family: inherit;
    transition: background .12s, border-color .12s;
}
.btn-secondary:hover { background: var(--panel-alt); border-color: var(--text-mute); }
.btn-secondary:active { transform: translateY(1px); }
.btn-secondary i { font-size: 11px; }

/* ─── Hero ────────────────────────────────────────────────────────────── */
.hero {
    background: var(--hero-bg);
    color: var(--hero-text);
    padding: 64px 40px 72px;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: "";
    position: absolute;
    top: 0; right: 0; bottom: 0;
    width: 45%;
    background-image: radial-gradient(circle at 70% 50%, rgba(0, 255, 136, 0.10), transparent 60%);
    pointer-events: none;
}
.hero::after {
    content: "";
    position: absolute; inset: 0;
    background-image:
        linear-gradient(to right, rgba(255,255,255,0.05) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255,255,255,0.05) 1px, transparent 1px);
    background-size: 32px 32px;
    opacity: 0.5;
    pointer-events: none;
}
.hero-inner {
    max-width: 1320px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}
.hero-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 10px 4px 8px;
    border-radius: 999px;
    border: 1px solid var(--hero-border);
    background: rgba(255, 255, 255, 0.03);
    font-size: 12px;
    color: var(--hero-dim);
    font-variant-numeric: tabular-nums;
    margin-bottom: 24px;
}
.hero-chip-dot {
    width: 6px; height: 6px;
    border-radius: 3px;
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent);
}
.hero h1 {
    font-family: var(--font-display);
    font-size: 68px;
    line-height: 1.02;
    font-weight: 600;
    letter-spacing: -2px;
    margin: 0;
    color: var(--hero-text);
    text-wrap: balance;
}
.hero h1 .accent { color: var(--accent); }
.hero p {
    font-size: 18px;
    line-height: 1.5;
    color: var(--hero-dim);
    max-width: 560px;
    margin: 22px 0 0;
    text-wrap: pretty;
}

/* ─── Filter panel (наложение на hero) ────────────────────────────────── */
.filter-wrap {
    padding: 0 40px;
    margin: -28px auto 0;
    position: relative;
    z-index: 30;
    max-width: 1320px;
}
.filter-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-card);
    padding: 4px;
}
.filter-grid {
    display: grid;
    grid-template-columns: 1.8fr 1fr 1fr 1fr auto;
    gap: 1px;
    background: var(--border);
    border-radius: calc(var(--r-md) - 2px);
    /* overflow:hidden раньше обрезал выпадающий список стран;
       скругление выехавших по углам ячеек маскируется матчингом фонов .filter-card → .filter-field (var(--panel)). */
}
.filter-grid > .filter-field:first-child { border-top-left-radius: calc(var(--r-md) - 2px); border-bottom-left-radius: calc(var(--r-md) - 2px); }
.filter-grid > .filter-field:nth-last-child(2) { border-top-right-radius: calc(var(--r-md) - 2px); border-bottom-right-radius: calc(var(--r-md) - 2px); }
.country-picker[open] { z-index: 40; }
.filter-field {
    background: var(--panel);
    padding: 10px 16px 12px;
    min-height: 60px;
    display: flex;
    flex-direction: column;
}
.filter-label {
    font-size: 10.5px;
    color: var(--text-mute);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.filter-input {
    border: none;
    background: transparent;
    outline: none;
    font-size: 14px;
    color: var(--text);
    font-family: var(--font-sans);
    width: 100%;
    padding: 0;
}
.filter-mask-group {
    display: flex;
    gap: 4px;
}
.filter-mask-chip {
    flex: 1;
    padding: 5px 8px;
    border-radius: var(--r-xs);
    border: 1px solid var(--border);
    background: var(--panel);
    font-size: 12px;
    color: var(--text-dim);
    cursor: pointer;
    transition: background .12s, color .12s, border-color .12s;
    text-align: center;
    font-family: var(--font-mono);
}
.filter-mask-chip:hover { color: var(--text); border-color: var(--border-strong); }
.filter-mask-chip.active {
    background: var(--text);
    color: var(--bg);
    border-color: var(--text);
}

.filter-range {
    width: 100%;
    accent-color: var(--accent-soft);
}
.filter-cta {
    background: var(--text);
    color: var(--bg);
    border: none;
    padding: 0 22px;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.2px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background .12s, transform .08s;
    min-height: 60px;
    /* Rounded right corners to match the .filter-card radius */
    border-top-right-radius: calc(var(--r-lg) - 1px);
    border-bottom-right-radius: calc(var(--r-lg) - 1px);
    white-space: nowrap;
    font-family: inherit;
}
.filter-cta:hover { background: #1f1f1f; }
.filter-cta:active { transform: translateY(1px); }
.filter-cta i { font-size: 13px; }

/* ─── Country picker (single-trigger dropdown with multi-check inside) ── */
.country-picker {
    position: relative;
    width: 100%;
}
.country-picker > summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--text);
    padding: 0;
}
.country-picker > summary::-webkit-details-marker { display: none; }
.country-picker-trigger-text {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.country-picker-sub {
    display: block;
    font-size: 11px;
    color: var(--text-mute);
    text-transform: none;
    letter-spacing: 0;
    font-weight: 400;
    margin-top: 1px;
}
.country-picker-chevron {
    color: var(--text-mute);
    font-size: 10px;
}
.country-picker-panel {
    position: absolute;
    top: calc(100% + 10px);
    left: -16px;
    right: -16px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    box-shadow: var(--shadow-card);
    padding: 12px;
    z-index: 20;
    min-width: 280px;
    max-height: 360px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.country-search-input {
    width: 100%;
    border: 1px solid var(--border);
    background: var(--panel-alt);
    border-radius: var(--r-sm);
    padding: 8px 10px;
    font-size: 13px;
    margin-bottom: 8px;
    outline: none;
}
.country-search-input:focus { border-color: var(--text); background: var(--panel); }
.country-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: var(--r-sm);
    cursor: pointer;
    font-size: 13px;
    color: var(--text);
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
}
.country-option:hover { background: var(--panel-alt); }
.country-option-all { margin-bottom: 4px; }
.country-options-list {
    overflow: auto;
    flex: 1;
    scrollbar-width: thin;
}
.country-option-flag {
    width: 20px; height: 14px;
    border-radius: 2px;
    object-fit: cover;
    flex-shrink: 0;
}
.country-option-label { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.country-option-title { font-size: 13px; color: var(--text); }
.country-option-hint { font-size: 10.5px; color: var(--text-mute); font-family: var(--font-mono); }
.country-option-icon {
    width: 20px; height: 14px;
    display: inline-flex;
    align-items: center; justify-content: center;
    color: var(--text-mute);
    flex-shrink: 0;
}
.country-cb {
    width: 14px; height: 14px;
    accent-color: var(--accent-soft);
    margin: 0;
}
.country-load-error { color: var(--ping-bad); font-size: 12px; margin: 6px 0 0; }

/* ─── Промо премиум-бота ──────────────────────────────────────────────── */
.promo-bot {
    max-width: 1320px;
    margin: 28px auto 0;
    padding: 0 40px;
}
.promo-bot-link {
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 18px;
    padding: 18px 22px;
    border-radius: var(--r-lg);
    background: linear-gradient(135deg, #0a0a0a 0%, #141414 100%);
    color: #fafaf9;
    overflow: hidden;
    transition: transform .16s, box-shadow .16s;
    box-shadow: 0 8px 24px rgba(0,0,0,0.16);
    border: 1px solid rgba(0, 255, 136, 0.18);
}
.promo-bot-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 32px rgba(0, 255, 136, 0.18);
    border-color: rgba(0, 255, 136, 0.45);
}
.promo-bot-glow {
    position: absolute;
    top: -60%;
    right: -10%;
    width: 340px;
    height: 340px;
    background: radial-gradient(circle, rgba(0,255,136,0.22) 0%, rgba(0,255,136,0) 60%);
    pointer-events: none;
}
.promo-bot-icon {
    position: relative;
    z-index: 1;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: var(--accent);
    color: #0a0a0a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
    box-shadow: 0 0 0 4px rgba(0,255,136,0.12);
}
.promo-bot-copy {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}
.promo-bot-title {
    font-family: 'Inter Tight', Inter, sans-serif;
    font-size: 15.5px;
    font-weight: 600;
    letter-spacing: -0.1px;
}
.promo-bot-handle {
    color: var(--accent);
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    font-weight: 500;
    margin-left: 4px;
}
.promo-bot-sub {
    font-size: 13px;
    color: rgba(250,250,249,0.62);
    line-height: 1.4;
}
.promo-bot-cta {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: var(--accent);
    color: #0a0a0a;
    border-radius: var(--r-sm);
    font-weight: 600;
    font-size: 13.5px;
    white-space: nowrap;
    flex-shrink: 0;
}
@media (max-width: 780px) {
    .promo-bot { padding: 0 16px; margin-top: 20px; }
    .promo-bot-link {
        grid-template-columns: auto 1fr;
        grid-template-areas: "icon copy" "cta cta";
        gap: 12px 14px;
        padding: 16px;
    }
    .promo-bot-icon { grid-area: icon; width: 40px; height: 40px; font-size: 18px; }
    .promo-bot-copy { grid-area: copy; }
    .promo-bot-cta { grid-area: cta; justify-content: center; padding: 12px; }
    .promo-bot-title { font-size: 14.5px; }
    .promo-bot-sub { font-size: 12.5px; }
    .promo-bot-glow { width: 220px; height: 220px; top: -40%; right: -20%; }
}

/* ─── Results toolbar ─────────────────────────────────────────────────── */
.results-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 32px 40px 12px;
    max-width: 1320px;
    margin: 0 auto;
    gap: 16px;
    flex-wrap: wrap;
}
.results-count {
    display: flex;
    align-items: baseline;
    gap: 12px;
}
.results-count h2 {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 600;
    margin: 0;
    letter-spacing: -0.5px;
}
.results-count-sub { font-size: 13px; color: var(--text-mute); }
.sort-group {
    display: flex;
    gap: 4px;
    align-items: center;
    font-size: 13px;
    color: var(--text-dim);
}
.sort-group > span { margin-right: 6px; }
.sort-chip {
    border: none;
    padding: 5px 10px;
    border-radius: var(--r-xs);
    cursor: pointer;
    background: transparent;
    color: var(--text-dim);
    font-size: 13px;
    font-weight: 400;
    transition: background .12s, color .12s;
}
.sort-chip:hover { color: var(--text); }
.sort-chip.active {
    background: var(--panel-alt);
    color: var(--text);
    font-weight: 500;
}

/* ─── Results table ───────────────────────────────────────────────────── */
.results-wrap {
    padding: 0 40px 60px;
    max-width: 1320px;
    margin: 0 auto;
}
.results-table {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    overflow: hidden;
}
.results-head {
    display: grid;
    grid-template-columns: 240px 1fr 130px 110px 110px 140px;
    padding: 12px 20px;
    border-bottom: 1px solid var(--border);
    font-size: 11px;
    font-weight: 500;
    color: var(--text-mute);
    text-transform: uppercase;
    letter-spacing: 0.6px;
}
.results-head > div:last-child { text-align: right; }

.row {
    display: grid;
    grid-template-columns: 240px 1fr 130px 110px 110px 140px;
    align-items: center;
    padding: 0 20px;
    height: 68px;
    border-bottom: 1px solid var(--border);
    background: transparent;
    transition: background .12s ease;
}
.row:last-child { border-bottom: none; }
.row:hover { background: var(--panel-alt); }

.row-addr {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}
.flag-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px; height: 16px;
    border-radius: 2px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--panel-alt);
}
.flag-box img { width: 100%; height: 100%; object-fit: cover; display: block; }
.addr-code {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.addr-code .port { color: var(--text-mute); }

.row-loc-title { font-size: 14px; font-weight: 500; line-height: 1.25; }
.row-loc-sub { font-size: 12px; color: var(--text-mute); line-height: 1.25; margin-top: 2px; }

.mask-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: var(--r-xs);
    font-size: 11.5px;
    font-weight: 500;
    font-family: var(--font-mono);
    background: var(--panel-alt);
    color: var(--text-dim);
    width: max-content;
}
.mask-badge.dd { background: var(--mask-dd-bg); color: var(--mask-dd-fg); }
.mask-badge.ee { background: var(--mask-ee-bg); color: var(--mask-ee-fg); }

.ping-cell {
    display: flex;
    align-items: center;
    gap: 8px;
}
.ping-bars {
    display: inline-flex;
    align-items: flex-end;
    gap: 2px;
    height: 12px;
}
.ping-bars span {
    width: 2.5px;
    background: var(--border);
    border-radius: 1px;
}
.ping-bars span:nth-child(1) { height: 3.6px; }
.ping-bars span:nth-child(2) { height: 6.2px; }
.ping-bars span:nth-child(3) { height: 8.8px; }
.ping-bars span:nth-child(4) { height: 11.4px; }
.ping-cell.good .ping-bars span { background: var(--ping-good); }
.ping-cell.ok   .ping-bars span:nth-child(-n+3) { background: var(--ping-ok); }
.ping-cell.slow .ping-bars span:nth-child(-n+2) { background: var(--ping-bad); }
.ping-cell.bad  .ping-bars span { background: var(--border); }
.ping-cell.bad  .ping-bars span:nth-child(1) { background: var(--ping-bad); }

.ping-value {
    font-family: var(--font-mono);
    font-size: 13px;
    font-variant-numeric: tabular-nums;
}
.ping-value .unit { color: var(--text-mute); margin-left: 3px; font-size: 11px; }
.ping-value.na { color: var(--text-mute); }

.uptime-value {
    font-family: var(--font-mono);
    font-size: 13px;
    font-variant-numeric: tabular-nums;
    color: var(--text-dim);
}
.uptime-value.low { color: var(--ping-bad); }

.row-actions {
    display: flex;
    gap: 6px;
    justify-content: flex-end;
    align-items: center;
}
.copy-btn {
    background: var(--text);
    color: var(--bg);
    border: none;
    padding: 7px 14px;
    border-radius: var(--r-sm);
    font-size: 12.5px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background .12s;
    white-space: nowrap;
}
.copy-btn:hover { background: #1f1f1f; }
.copy-btn.copied {
    background: var(--accent);
    color: var(--accent-on);
}
.icon-btn {
    background: transparent;
    color: var(--text-mute);
    border: 1px solid var(--border);
    width: 32px; height: 32px;
    padding: 0;
    border-radius: var(--r-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .12s, color .12s, border-color .12s;
}
.icon-btn:hover { color: var(--text); border-color: var(--border-strong); background: var(--panel-alt); }

/* ─── Load more button ────────────────────────────────────────────────── */
.load-more-wrap {
    display: flex;
    justify-content: center;
    margin-top: 24px;
}
.load-more-btn {
    background: var(--panel);
    border: 1px solid var(--border);
    padding: 10px 18px;
    border-radius: var(--r-sm);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
    transition: background .12s, border-color .12s;
}
.load-more-btn:hover { background: var(--panel-alt); border-color: var(--border-strong); }
.load-more-btn:disabled { opacity: 0.6; cursor: default; }

/* ─── How it works + FAQ ──────────────────────────────────────────────── */
.hiw-section,
.faq-section {
    padding: 60px 40px;
}
.hiw-section {
    border-top: 1px solid var(--border);
    background: var(--panel);
}
.hiw-inner,
.faq-inner {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 48px;
    max-width: 1320px;
    margin: 0 auto;
}
.section-eyebrow {
    font-size: 11px;
    color: var(--text-mute);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 12px;
}
.section-title {
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 600;
    margin: 0;
    letter-spacing: -0.8px;
    text-wrap: balance;
}
.hiw-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.hiw-step-num {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--accent-soft);
    margin-bottom: 14px;
}
.hiw-step-title {
    font-weight: 500;
    font-size: 16px;
    margin-bottom: 6px;
}
.hiw-step-text {
    font-size: 14px;
    color: var(--text-dim);
    line-height: 1.5;
}

.faq-list { border-top: 1px solid var(--border); }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: none;
    background: transparent;
    padding: 18px 0;
    cursor: pointer;
    text-align: left;
    font-size: 15px;
    font-weight: 500;
    color: var(--text);
    font-family: inherit;
}
.faq-question .chev {
    color: var(--text-mute);
    transition: transform .15s;
    font-size: 11px;
}
.faq-item.open .faq-question .chev { transform: rotate(180deg); }
.faq-answer {
    padding: 0 0 20px;
    font-size: 14px;
    color: var(--text-dim);
    line-height: 1.55;
    max-width: 640px;
    display: none;
}
.faq-item.open .faq-answer { display: block; }

/* ─── Footer ──────────────────────────────────────────────────────────── */
.site-footer {
    padding: 28px 40px;
    border-top: 1px solid var(--border);
    background: var(--panel);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--text-mute);
    gap: 16px;
    flex-wrap: wrap;
}
.site-footer .brand { color: var(--text-mute); }
.site-footer .brand-mark {
    background: transparent;
    border: 1px solid var(--border-strong);
}
.footer-links {
    display: flex;
    gap: 20px;
}
.footer-links a { cursor: pointer; transition: color .12s; }
.footer-links a:hover { color: var(--text); }

/* ─── Empty / error states ────────────────────────────────────────────── */
.empty-state,
.error-state {
    padding: 60px 20px;
    text-align: center;
}
.empty-state-title {
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 6px;
}
.empty-state-text {
    font-size: 13px;
    color: var(--text-dim);
}
.error-state i { color: var(--ping-bad); font-size: 18px; margin-right: 6px; }

/* ─── Skeleton placeholder ────────────────────────────────────────────── */
.row.skel {
    pointer-events: none;
}
.row.skel .shim {
    background: linear-gradient(90deg, var(--panel-alt) 0%, #ececeb 50%, var(--panel-alt) 100%);
    background-size: 200% 100%;
    animation: skel 1.2s linear infinite;
    color: transparent !important;
    border-radius: 4px;
    display: inline-block;
}
.row.skel .shim-sm { width: 60px; height: 12px; }
.row.skel .shim-md { width: 100px; height: 14px; }
.row.skel .shim-lg { width: 160px; height: 14px; }
@keyframes skel {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ─── Toast ───────────────────────────────────────────────────────────── */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--text);
    color: var(--bg);
    padding: 10px 18px;
    border-radius: var(--r-sm);
    font-size: 13px;
    font-weight: 500;
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s, transform .18s;
    z-index: 200;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}
.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.toast.success { background: var(--accent-soft); color: var(--accent-on); }
.toast.error { background: var(--ping-bad); color: #fff; }

/* ─── Mobile (≤ 780px) ────────────────────────────────────────────────── */
@media (max-width: 780px) {
    .site-header-inner { padding: 14px 16px; }
    .site-nav { display: none; }
    .brand-version { display: none; }
    .header-actions .live-count { display: none; }
    .header-actions .btn-primary { padding: 7px 11px; font-size: 12px; }

    .hero {
        padding: 20px 20px 36px;
    }
    .hero-chip { margin-bottom: 16px; font-size: 11px; }
    .hero h1 { font-size: 30px; letter-spacing: -0.8px; }
    .hero p { font-size: 15px; margin-top: 14px; }

    .filter-wrap { padding: 0 16px; margin-top: -18px; }
    .filter-grid {
        grid-template-columns: 1fr;
    }
    .filter-field { padding: 10px 14px 12px; min-height: 54px; }
    .filter-cta {
        padding: 14px 16px;
        justify-content: center;
        min-height: 48px;
        border-radius: 0 0 calc(var(--r-lg) - 1px) calc(var(--r-lg) - 1px);
    }

    .results-toolbar { padding: 20px 16px 10px; }
    .results-count h2 { font-size: 18px; }
    .sort-group { font-size: 12px; flex-wrap: wrap; }
    .sort-group > span { display: none; }

    .results-wrap { padding: 0 16px 32px; }
    .results-head { display: none; }
    .results-table { background: transparent; border: none; }

    .row {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        height: auto;
        padding: 14px;
        border: 1px solid var(--border);
        border-radius: var(--r-md);
        background: var(--panel);
        margin-bottom: 8px;
    }
    .row:hover { background: var(--panel); }
    .row-head {
        display: flex;
        align-items: center;
        gap: 10px;
    }
    .row-head .flag-box { width: 26px; height: 19px; }
    .row-head-body { flex: 1; min-width: 0; }
    .row-head-body .row-loc-title { font-size: 14px; font-weight: 500; }
    .row-head-body .row-loc-sub { font-size: 11.5px; color: var(--text-mute); }

    .row-addr-mobile {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 8px 10px;
        background: var(--panel-alt);
        border-radius: var(--r-sm);
    }
    .row-addr-mobile .addr-code { flex: 1; font-size: 12px; }
    .row-addr-mobile .ping-group {
        display: flex;
        align-items: center;
        gap: 5px;
        font-size: 11.5px;
        color: var(--text-dim);
        font-variant-numeric: tabular-nums;
    }

    .row-actions {
        justify-content: stretch;
    }
    .row .copy-btn {
        width: 100%;
        padding: 11px;
        font-size: 14px;
        justify-content: center;
    }
    .row .icon-btn { display: none; }

    .hiw-section, .faq-section { padding: 40px 16px; }
    .hiw-inner, .faq-inner {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .section-title { font-size: 24px; }
    .hiw-grid { grid-template-columns: 1fr; gap: 16px; }
    .site-footer { padding: 20px 16px; flex-direction: column; align-items: flex-start; gap: 10px; }

    /* Desktop-only cells to hide on mobile */
    .row > .row-addr,
    .row > .ping-cell,
    .row > .uptime-value,
    .row > .mask-badge { display: none; }
}

@media (min-width: 781px) {
    /* Mobile-only rows hidden on desktop */
    .row-head,
    .row-addr-mobile { display: none; }
}

/* Reduced motion respect */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ══════════════════════════════════════════════════════════════════════════
   КАРТОЧКА ПРОКСИ (/proxy/{id}) — двухколоночный layout + поток копирования
   ══════════════════════════════════════════════════════════════════════════ */
.detail-page-body { background: var(--bg); }

.detail-layout {
    display: grid;
    grid-template-columns: 360px 1fr;
    min-height: calc(100vh - 64px);
    max-width: 1320px;
    margin: 0 auto;
}

/* Левая колонка */
.detail-sidebar {
    border-right: 1px solid var(--border);
    background: var(--panel);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 64px;
    height: calc(100vh - 64px);
}
.detail-sidebar-head {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.detail-sidebar-title {
    font-family: 'Inter Tight', Inter, sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-mute);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}
.detail-sidebar-all {
    font-size: 12px;
    color: var(--text-mute);
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.detail-sidebar-all:hover { color: var(--text); }
.detail-sidebar-list { overflow-y: auto; flex: 1; }

.detail-sidebar-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    border-bottom: 1px solid var(--border);
    border-left: 2px solid transparent;
    color: inherit;
    transition: background .12s;
}
.detail-sidebar-row:hover { background: var(--panel-alt); }
.detail-sidebar-row.active {
    background: var(--panel-alt);
    border-left-color: var(--text);
}
.detail-sidebar-body { flex: 1; min-width: 0; }
.detail-sidebar-city {
    display: block;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.3;
}
.detail-sidebar-addr {
    display: block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--text-mute);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.detail-sidebar-meta {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}
.detail-sidebar-ping {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}

/* Правая колонка — детали */
.detail-main {
    padding: 36px 48px 60px;
    min-width: 0;
}
.detail-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-mute);
    margin-bottom: 22px;
    transition: color .12s;
}
.detail-back:hover { color: var(--text); }

.detail-hero {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 26px;
}
.detail-flag {
    width: 60px;
    height: 60px;
    border-radius: var(--r-md);
    background: var(--panel);
    border: 1px solid var(--border);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.detail-flag img { width: 36px; height: 24px; object-fit: cover; border-radius: 2px; }
.detail-hero-copy h1 {
    font-family: 'Inter Tight', Inter, sans-serif;
    font-size: 28px;
    font-weight: 600;
    letter-spacing: -0.6px;
    margin: 0;
    line-height: 1.1;
}
.detail-hero-sub {
    font-size: 14px;
    color: var(--text-dim);
    margin-top: 4px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.live-dot-inline {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--ping-good);
    box-shadow: 0 0 0 3px rgba(0, 196, 106, 0.18);
    animation: live-pulse 1.6s ease-in-out infinite;
}
@keyframes live-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.55; transform: scale(0.85); }
}

/* Метрики 4 в ряд */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 28px;
}
.metric-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 14px 16px;
}
.metric-label {
    font-size: 10.5px;
    color: var(--text-mute);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
}
.metric-value-row {
    display: flex;
    align-items: baseline;
    gap: 6px;
}
.metric-value {
    font-family: 'Inter Tight', Inter, sans-serif;
    font-size: 26px;
    font-weight: 600;
    letter-spacing: -0.8px;
    color: var(--text);
    font-variant-numeric: tabular-nums;
    line-height: 1;
}
.metric-value.good { color: var(--ping-good); }
.metric-value.ok   { color: var(--ping-ok); }
.metric-value.slow { color: var(--ping-ok); }
.metric-value.bad  { color: var(--ping-bad); }
.metric-unit {
    font-size: 12px;
    color: var(--text-mute);
    font-family: 'JetBrains Mono', monospace;
}

/* Поток копирования */
.steps-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    overflow: hidden;
    margin-bottom: 24px;
}
.steps-card-head {
    padding: 18px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.steps-title {
    font-family: 'Inter Tight', Inter, sans-serif;
    font-size: 18px;
    font-weight: 600;
}
.steps-sub {
    font-size: 13px;
    color: var(--text-dim);
    margin-top: 2px;
}
.steps-progress { display: flex; gap: 6px; }
.steps-dot {
    width: 26px;
    height: 6px;
    border-radius: 3px;
    background: var(--border);
    transition: background .18s;
}
.steps-dot.active { background: var(--text); }

.steps-grid {
    padding: 24px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Шаг 1 — тёмный (hero-стиль) */
.step-pane {
    border-radius: var(--r-md);
    padding: 18px 20px;
    transition: background .2s, color .2s, opacity .2s;
}
.step-1 {
    background: var(--hero-bg, #0a0a0a);
    color: #fafaf9;
    position: relative;
    overflow: hidden;
}
.step-heading {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}
.step-num {
    width: 22px;
    height: 22px;
    border-radius: 11px;
    background: var(--accent);
    color: var(--accent-on);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
    flex-shrink: 0;
}
.step-title {
    font-size: 13px;
    font-weight: 500;
}
.step-link {
    display: block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11.5px;
    line-height: 1.5;
    word-break: break-all;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--r-sm);
    color: rgba(250, 250, 249, 0.72);
    margin-bottom: 12px;
    max-height: 120px;
    overflow-y: auto;
}
.step-copy-btn {
    width: 100%;
    background: #fafaf9;
    color: #0a0a0a;
    border: none;
    padding: 11px;
    border-radius: var(--r-sm);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background .15s, color .15s, transform .1s;
    font-family: inherit;
}
.step-copy-btn:hover { background: #fff; }
.step-copy-btn:active { transform: translateY(1px); }
.step-copy-btn.copied { background: var(--accent); color: var(--accent-on); }

/* Шаг 2 — светлый, разблокируется после копирования */
.step-2 {
    background: var(--panel-alt);
    opacity: 0.55;
    transition: opacity .25s;
}
.steps-card[data-step="2"] .step-2 { opacity: 1; }
.step-2 .step-num { background: var(--border); color: var(--text); }
.steps-card[data-step="2"] .step-2 .step-num { background: var(--text); color: var(--bg); }
.step-desc {
    font-size: 13px;
    color: var(--text-dim);
    line-height: 1.5;
    margin: 0 0 12px;
}
.step-open-btn {
    width: 100%;
    background: var(--text);
    color: var(--bg);
    border: none;
    padding: 11px;
    border-radius: var(--r-sm);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: 'JetBrains Mono', monospace;
    transition: background .15s;
}
.step-open-btn:hover { background: #1f1f1f; color: var(--bg); }
.step-privacy {
    margin-top: 10px;
    font-size: 11px;
    color: var(--text-mute);
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Технические параметры */
.details-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 18px 24px;
    margin-bottom: 28px;
}
.details-card-label {
    font-size: 11px;
    color: var(--text-mute);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 12px;
    font-weight: 500;
}
.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
    gap: 16px;
}
.detail-row-last { border-bottom: none; }
.detail-row-k { color: var(--text-dim); flex-shrink: 0; }
.detail-row-v {
    color: var(--text);
    text-align: right;
    max-width: 65%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.detail-row-v.mono {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
}
.detail-row-v-wrap { word-break: break-all; white-space: normal; max-width: 70%; }
.badge-v {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    background: var(--panel-alt);
    padding: 3px 8px;
    border-radius: var(--r-xs, 4px);
}

/* Мобилка */
@media (max-width: 900px) {
    .detail-layout { grid-template-columns: 1fr; }
    .detail-sidebar {
        position: static;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border);
        max-height: 240px;
    }
    .detail-sidebar-list { flex: initial; }
    .detail-main { padding: 24px 16px 40px; }
    .metrics-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .steps-grid { grid-template-columns: 1fr; gap: 12px; padding: 16px; }
    .detail-hero h1 { font-size: 22px; }
    .detail-flag { width: 50px; height: 50px; }
    .detail-flag img { width: 30px; height: 20px; }
}


/* ==========================================================
   SEO-статьи — /proxy-telegram-{windows,macos,linux}
   ========================================================== */

.article-page {
    --art-accent: #3b82f6;
    --art-accent-bg: #eef4ff;
    background: var(--bg);
}

.article-crumbs {
    max-width: 1080px;
    margin: 0 auto;
    padding: 18px 40px 0;
    font-size: 13px;
    color: var(--text-mute);
    display: flex;
    align-items: center;
    gap: 8px;
}
.article-crumbs a {
    color: var(--text-dim);
    text-decoration: none;
}
.article-crumbs a:hover { color: var(--text); }
.article-crumbs .crumb-sep { color: var(--text-mute); }
.article-crumbs .crumb-current { color: var(--text); font-weight: 500; }

.article-hero {
    background: var(--panel);
    border-bottom: 1px solid var(--border);
    padding: 48px 40px 44px;
}
.article-hero-inner {
    max-width: 920px;
    margin: 0 auto;
}
.article-chip-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 12px;
    color: var(--text-mute);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 18px;
}
.article-platform-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px;
    border-radius: 999px;
    background: var(--art-accent-bg);
    color: var(--art-accent);
    font-weight: 500;
    letter-spacing: 0.4px;
}
.article-chip-logo svg {
    width: 16px;
    height: 16px;
    display: block;
}
.article-meta-sep { color: var(--border-strong); }

.article-h1 {
    font-family: 'Inter Tight', 'Inter', sans-serif;
    font-size: 56px;
    line-height: 1.05;
    font-weight: 600;
    letter-spacing: -1.5px;
    margin: 0;
    color: var(--text);
    text-wrap: balance;
}
.article-lead {
    font-size: 19px;
    line-height: 1.55;
    color: var(--text-dim);
    margin: 20px 0 0;
    max-width: 680px;
    text-wrap: pretty;
}
.article-hero-ctas {
    display: flex;
    gap: 8px;
    margin-top: 28px;
    flex-wrap: wrap;
}
.art-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 11px 18px;
    border-radius: var(--r-sm);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    transition: transform .08s ease;
}
.art-btn:active { transform: translateY(1px); }
.art-btn-dark {
    background: var(--text);
    color: var(--bg);
}
.art-btn-dark:hover { background: #1f1f1f; }
.art-btn-ghost {
    background: transparent;
    color: var(--text);
    border-color: var(--border-strong);
}
.art-btn-ghost:hover { background: var(--panel-alt); }

.article-body {
    padding: 48px 40px 72px;
}
.article-body-inner {
    max-width: 1080px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 48px;
}

.article-toc {
    position: sticky;
    top: 100px;
    align-self: start;
}
.article-toc-eyebrow {
    font-size: 11px;
    color: var(--text-mute);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 12px;
}
.article-toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.article-toc-item {
    font-size: 13px;
    color: var(--text-dim);
    border-left: 2px solid var(--border);
    padding-left: 12px;
    line-height: 1.4;
    cursor: default;
}
.article-toc-item.active {
    color: var(--text);
    border-left-color: var(--art-accent);
}
.article-toc-card {
    margin-top: 28px;
    padding: 14px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
}
.article-toc-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    font-size: 13px;
    color: var(--text);
    font-weight: 500;
    text-decoration: none;
}
.article-toc-link:hover { color: var(--art-accent); }
.article-toc-link-logo svg {
    width: 16px;
    height: 16px;
    color: var(--text-dim);
    display: block;
}
.article-toc-link i {
    margin-left: auto;
    color: var(--text-mute);
    font-size: 11px;
}

.article-content {
    max-width: 720px;
    min-width: 0;
}
.article-content p {
    font-size: 15.5px;
    line-height: 1.7;
    color: var(--text);
    margin: 12px 0 0;
}
.article-intro {
    font-size: 16px;
    line-height: 1.7;
    color: var(--text);
    margin-bottom: 32px;
}
.article-h2 {
    font-family: 'Inter Tight', 'Inter', sans-serif;
    font-size: 26px;
    font-weight: 600;
    letter-spacing: -0.5px;
    margin: 32px 0 0;
    color: var(--text);
    text-wrap: balance;
}
.art-code-inline {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    background: var(--panel-alt);
    padding: 1px 6px;
    border-radius: 4px;
}

.article-steps {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 16px 0 40px;
}
.article-step {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 20px 22px;
    display: grid;
    grid-template-columns: 56px 1fr;
    gap: 18px;
}
.article-step-num {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    font-weight: 500;
    color: var(--art-accent);
    background: var(--art-accent-bg);
    height: 32px;
    border-radius: var(--r-xs);
    display: flex;
    align-items: center;
    justify-content: center;
}
.article-step-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 6px;
    letter-spacing: -0.2px;
    color: var(--text);
}
.article-step-text {
    font-size: 14.5px;
    color: var(--text-dim);
    line-height: 1.6;
}
.article-step-code {
    margin-top: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: #0c0c0c;
    color: #fafaf9;
    border-radius: var(--r-sm);
    padding: 10px 14px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12.5px;
}
.art-code-dollar { color: #6b6b68; }
.article-step-code code {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.art-code-copy {
    background: rgba(255, 255, 255, 0.08);
    color: #fafaf9;
    border: none;
    padding: 4px 10px;
    border-radius: var(--r-xs);
    font-size: 11px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-family: inherit;
}
.art-code-copy:hover { background: rgba(255, 255, 255, 0.14); }

.article-table-wrap {
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    overflow: hidden;
    margin: 16px 0 40px;
}
.article-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}
.article-table thead tr {
    background: var(--panel-alt);
}
.article-table th {
    text-align: left;
    padding: 10px 14px;
    font-size: 11px;
    color: var(--text-mute);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    font-weight: 500;
    border-bottom: 1px solid var(--border);
}
.article-table td {
    padding: 12px 14px;
    font-size: 13.5px;
    color: var(--text);
    vertical-align: middle;
    border-bottom: 1px solid var(--border);
}
.article-table tbody tr:last-child td { border-bottom: none; }
.art-mask-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: var(--r-xs);
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.4px;
    background: var(--panel-alt);
    color: var(--text);
}
.art-mask-badge.ee { background: #e6fff2; color: #006b38; }
.art-mask-badge.dd { background: #fff5e5; color: #8a4d00; }
.art-mask-badge.no { background: #f0f0ef; color: var(--text-dim); }

.article-callout {
    background: var(--art-accent-bg);
    border-left: 3px solid var(--art-accent);
    padding: 16px 20px;
    border-radius: 0 var(--r-sm) var(--r-sm) 0;
    margin-bottom: 40px;
    display: flex;
    gap: 14px;
    align-items: flex-start;
}
.article-callout > i {
    color: var(--art-accent);
    font-size: 16px;
    margin-top: 3px;
}
.article-callout-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text);
}
.article-callout-text {
    font-size: 13.5px;
    color: var(--text-dim);
    line-height: 1.6;
}

.article-faq {
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    margin: 16px 0 40px;
    background: var(--panel);
    overflow: hidden;
}
.article-faq-item { border-bottom: 1px solid var(--border); }
.article-faq-item:last-child { border-bottom: none; }
.article-faq-item summary {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    color: var(--text);
    list-style: none;
}
.article-faq-item summary::-webkit-details-marker { display: none; }
.article-faq-item summary i {
    color: var(--text-mute);
    transition: transform .15s ease;
    font-size: 13px;
}
.article-faq-item[open] summary i { transform: rotate(180deg); }
.article-faq-answer {
    padding: 0 20px 18px;
    font-size: 14px;
    color: var(--text-dim);
    line-height: 1.6;
}

.article-cta {
    background: #0c0c0c;
    color: #fafaf9;
    border-radius: var(--r-lg);
    padding: 28px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}
.article-cta-title {
    font-family: 'Inter Tight', 'Inter', sans-serif;
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.4px;
    margin-bottom: 4px;
}
.article-cta-sub {
    font-size: 14px;
    color: rgba(250, 250, 249, 0.65);
}
.article-cta-btn {
    background: var(--accent);
    color: var(--accent-on);
    border: none;
    padding: 12px 22px;
    border-radius: var(--r-sm);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}
.article-cta-btn:hover { background: var(--accent-soft); }

.article-related {
    padding: 40px 40px 72px;
    background: var(--panel);
    border-top: 1px solid var(--border);
}
.article-related-inner {
    max-width: 1080px;
    margin: 0 auto;
}
.article-related-title {
    font-family: 'Inter Tight', 'Inter', sans-serif;
    font-size: 26px;
    font-weight: 600;
    letter-spacing: -0.5px;
    margin: 0 0 24px;
    color: var(--text);
}
.article-related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}
.article-related-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 20px;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
    transition: border-color .12s ease, transform .12s ease;
}
.article-related-card:hover {
    border-color: var(--art-accent);
    transform: translateY(-2px);
}
.article-related-card.current {
    background: var(--panel-alt);
    border-color: var(--art-accent);
}
.article-related-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--r-sm);
    background: var(--art-accent-bg);
    color: var(--art-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
}
.article-related-icon svg {
    width: 20px;
    height: 20px;
}
.article-related-h {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text);
    line-height: 1.3;
}
.article-related-sub {
    font-size: 12.5px;
    color: var(--text-dim);
    line-height: 1.5;
    margin-bottom: 14px;
}
.article-related-arrow {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--art-accent);
    font-weight: 500;
}

/* Мобилка — статьи */
@media (max-width: 900px) {
    .article-crumbs { padding: 14px 16px 0; }
    .article-hero { padding: 32px 16px 32px; }
    .article-h1 { font-size: 36px; letter-spacing: -1px; }
    .article-lead { font-size: 16px; }
    .article-body { padding: 32px 16px 48px; }
    .article-body-inner {
        grid-template-columns: 1fr;
        gap: 28px;
    }
    .article-toc {
        position: static;
        top: auto;
    }
    .article-toc-card { display: none; }
    .article-content { max-width: 100%; }
    .article-step {
        grid-template-columns: 44px 1fr;
        gap: 14px;
        padding: 16px;
    }
    .article-h2 { font-size: 22px; }
    .article-related { padding: 32px 16px 56px; }
    .article-related-grid { grid-template-columns: 1fr; }
    .article-cta {
        padding: 22px;
        flex-direction: column;
        align-items: flex-start;
    }
}


/* ==========================================================
   Попап «Поделиться прокси»
   ========================================================== */

@keyframes share-spin {
    to { transform: rotate(360deg); }
}
@keyframes share-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes share-pop-in {
    from { opacity: 0; transform: translateY(8px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes share-sheet-up {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}

.share-modal[hidden] { display: none; }
.share-modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    animation: share-fade-in .15s ease-out;
}
.share-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(12, 12, 12, 0.55);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}
.share-modal-panel {
    position: relative;
    width: 560px;
    max-width: 100%;
    max-height: calc(100vh - 80px);
    background: var(--panel);
    border-radius: var(--r-lg);
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.3), 0 1px 4px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: share-pop-in .18s ease-out;
}

.share-modal-grabber { display: none; }

.share-modal-header {
    padding: 20px 24px 16px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: flex-start;
    gap: 16px;
}
.share-modal-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--r-md);
    background: var(--accent-bg);
    color: var(--accent-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 15px;
}
.share-modal-titlewrap { flex: 1; min-width: 0; }
.share-modal-title {
    font-family: 'Inter Tight', 'Inter', sans-serif;
    font-size: 19px;
    font-weight: 600;
    letter-spacing: -0.3px;
    color: var(--text);
}
.share-modal-sub {
    font-size: 13.5px;
    color: var(--text-dim);
    margin-top: 3px;
    line-height: 1.4;
}
.share-modal-close {
    background: transparent;
    border: none;
    padding: 6px;
    cursor: pointer;
    color: var(--text-mute);
    border-radius: var(--r-xs);
    margin-top: -2px;
    font-size: 14px;
}
.share-modal-close:hover { background: var(--panel-alt); color: var(--text); }

.share-modal-body {
    padding: 16px 24px 8px;
    overflow-y: auto;
    flex: 1;
}

.share-paste-hint {
    padding: 10px 12px;
    background: var(--panel-alt);
    border: 1px dashed var(--border-strong);
    border-radius: var(--r-sm);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12.5px;
    color: var(--text-dim);
}
.share-paste-hint code {
    font-family: 'JetBrains Mono', monospace;
    color: var(--text);
    font-size: 12px;
}
.share-paste-icon { color: var(--text-mute); }
.share-paste-hint > span:nth-child(2) { flex: 1; }
.share-paste-btn {
    background: var(--panel);
    border: 1px solid var(--border-strong);
    padding: 5px 10px;
    border-radius: var(--r-xs);
    font-size: 12px;
    font-weight: 500;
    color: var(--text);
    cursor: pointer;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}
.share-paste-btn:hover { background: var(--bg); border-color: var(--text-mute); }

.share-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 18px;
}
.share-row { display: grid; gap: 12px; }
.share-row-2-1 { grid-template-columns: 2fr 1fr; }
.share-row-1-1 { grid-template-columns: 1fr 1fr; }

.share-field { display: flex; flex-direction: column; min-width: 0; }
.share-field label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text);
    letter-spacing: 0.1px;
    margin-bottom: 6px;
}
.share-field-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 6px;
}
.share-field-row label { margin-bottom: 0; }
.share-field-hint {
    font-size: 11.5px;
    color: var(--text-mute);
}

.share-input {
    width: 100%;
    padding: 10px 12px;
    font-size: 13px;
    font-family: inherit;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    color: var(--text);
    outline: none;
    transition: border-color .12s, box-shadow .12s;
}
.share-input.mono { font-family: 'JetBrains Mono', monospace; }
.share-input:focus {
    border-color: var(--text);
    box-shadow: 0 0 0 3px rgba(12, 12, 12, 0.06);
}
.share-input.invalid {
    border-color: #d05050;
    box-shadow: 0 0 0 3px rgba(208, 80, 80, 0.12);
}
select.share-input {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'><path fill='none' stroke='%236b6b68' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' d='M3 4.5 6 7.5 9 4.5'/></svg>");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 30px;
}

.share-mask-group {
    display: flex;
    gap: 4px;
    background: var(--panel-alt);
    border-radius: var(--r-sm);
    padding: 3px;
    border: 1px solid var(--border);
}
.share-mask-chip {
    flex: 1;
    padding: 7px 4px;
    font-size: 12.5px;
    font-weight: 500;
    border: none;
    border-radius: calc(var(--r-xs) - 1px);
    cursor: pointer;
    background: transparent;
    color: var(--text-dim);
    font-family: 'JetBrains Mono', monospace;
    transition: background .12s, color .12s, box-shadow .12s;
}
.share-mask-chip:hover { color: var(--text); }
.share-mask-chip.active {
    background: var(--panel);
    color: var(--text);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.share-precheck {
    padding: 14px;
    background: var(--panel-alt);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
}
.share-precheck-title {
    font-size: 11px;
    color: var(--text-mute);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
    font-weight: 500;
}
.share-precheck-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
.check-row { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.check-row-label {
    font-size: 11px;
    color: var(--text-mute);
    letter-spacing: 0.2px;
}
.check-row-value {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-dim);
    font-weight: 500;
}
.check-row-dot {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--border);
    color: var(--text-mute);
    font-size: 9px;
}
.check-row[data-state="ok"] .check-row-value { color: var(--accent-soft); }
.check-row[data-state="ok"] .check-row-dot::before {
    content: "\2713";
    color: #fff;
    font-weight: 700;
    font-size: 9px;
    line-height: 1;
}
.check-row[data-state="ok"] .check-row-dot { background: var(--accent-soft); }
.check-row[data-state="bad"] .check-row-value { color: #d05050; }
.check-row[data-state="bad"] .check-row-dot { background: #d05050; }
.check-row[data-state="bad"] .check-row-dot::before {
    content: "\00d7";
    color: #fff;
    font-weight: 700;
    font-size: 11px;
    line-height: 1;
}
.check-row[data-state="loading"] .check-row-dot {
    background: transparent;
    border: 1.5px solid var(--border);
    border-top-color: var(--text-dim);
    animation: share-spin 0.8s linear infinite;
}

.share-agree {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    color: var(--text-dim);
    line-height: 1.5;
    cursor: pointer;
}
.share-agree input[type="checkbox"] {
    margin-top: 2px;
    accent-color: var(--text);
    flex-shrink: 0;
}

.share-error {
    padding: 10px 12px;
    background: #fef1f1;
    border: 1px solid #f3c9c9;
    color: #8a2727;
    border-radius: var(--r-sm);
    font-size: 13px;
}

.share-success {
    padding: 40px 24px 32px;
    text-align: center;
}
.share-success-icon {
    width: 56px;
    height: 56px;
    border-radius: 28px;
    background: var(--accent-bg);
    color: var(--accent-soft);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    font-size: 22px;
}
.share-success-title {
    font-family: 'Inter Tight', 'Inter', sans-serif;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.3px;
    color: var(--text);
    margin-bottom: 8px;
}
.share-success-text {
    font-size: 14px;
    color: var(--text-dim);
    max-width: 380px;
    margin: 0 auto 24px;
    line-height: 1.5;
}
.share-success-text b { color: var(--text); }
.share-success-id {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--panel-alt);
    border-radius: var(--r-sm);
    font-size: 13px;
    color: var(--text-dim);
    font-family: 'JetBrains Mono', monospace;
}
.share-success-id-label { color: var(--text-mute); }
.share-success-id b { color: var(--text); }

.share-modal-footer {
    padding: 14px 24px;
    border-top: 1px solid var(--border);
    background: var(--panel-alt);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.share-modal-footer-center {
    justify-content: center;
    background: var(--panel);
}
.share-footer-note {
    font-size: 12px;
    color: var(--text-mute);
    display: flex;
    align-items: center;
    gap: 6px;
}
.share-footer-actions { display: flex; gap: 8px; }
.share-btn {
    padding: 9px 18px;
    border-radius: var(--r-sm);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background .12s, transform .12s;
}
.share-btn-ghost {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-dim);
}
.share-btn-ghost:hover { background: var(--panel); color: var(--text); }
.share-btn-dark {
    background: var(--text);
    border: none;
    color: var(--bg);
}
.share-btn-dark:hover:not(:disabled) { background: #1f1f1f; }
.share-btn-dark:active { transform: translateY(1px); }
.share-btn-dark:disabled {
    background: var(--panel-alt);
    color: var(--text-mute);
    cursor: not-allowed;
    border: 1px solid var(--border);
}

body.share-open { overflow: hidden; }

/* Мобилка — bottom sheet */
@media (max-width: 640px) {
    .share-modal {
        padding: 0;
        align-items: flex-end;
        justify-content: stretch;
    }
    .share-modal-panel {
        width: 100%;
        max-width: 100%;
        max-height: 92vh;
        border-radius: 20px 20px 0 0;
        animation: share-sheet-up .22s ease-out;
    }
    .share-modal-grabber {
        display: flex;
        justify-content: center;
        padding: 8px 0 4px;
    }
    .share-modal-grabber span {
        width: 40px;
        height: 4px;
        background: var(--border-strong);
        border-radius: 2px;
    }
    .share-modal-header { padding: 6px 20px 14px; gap: 12px; }
    .share-modal-icon { width: 34px; height: 34px; font-size: 13px; }
    .share-modal-title { font-size: 17px; }
    .share-modal-sub { font-size: 12.5px; }
    .share-modal-close {
        background: var(--panel-alt);
        width: 30px;
        height: 30px;
        border-radius: 15px;
        padding: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        color: var(--text-dim);
        margin-top: 0;
    }
    .share-modal-body { padding: 14px 20px 8px; }
    .share-precheck-grid { grid-template-columns: 1fr; gap: 8px; }
    .share-row-2-1 { grid-template-columns: 1.5fr 1fr; gap: 10px; }
    .share-row-1-1 { grid-template-columns: 1fr; gap: 10px; }
    .share-modal-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    .share-footer-actions { width: 100%; }
    .share-footer-actions .share-btn { flex: 1; justify-content: center; }
    .share-footer-note { justify-content: center; order: 2; }
    .share-modal-footer-center { flex-direction: row; }
}
