/* Страница Magic Packet Server и /download/. Поверх site.css и landing.css главной:
   оттуда берутся карточки бенто, иконки команд .cmd, глифы .glyph, плитки хостов и цветные панели. */

/* ===== Общие блоки страницы ===== */

.page-section {
    max-width: 1024px;
    margin: 0 auto;
    padding: 56px 20px 8px;
}

.page-section > .section-title {
    padding-left: 14px;
}

.section-lead {
    max-width: 640px;
    margin: 8px 0 28px;
    padding-left: 14px;
    font-size: 19px;
    line-height: 1.45;
    color: #6E6E73;
}

.card {
    background-color: #FFF;
    border-radius: 28px;
}

/* Цветная панель с фоном кейарта и кругами «пакета», как карточки .is-vivid на главной */
.vivid {
    position: relative;
    overflow: hidden;
    border-radius: 36px;
    background: #3E4BF0 url("../../../../shared/images/art/keyart-bg.webp") center / cover no-repeat;
    color: #FFF;
}

.vivid::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 1400px;
    height: 1400px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: repeating-radial-gradient(circle, transparent 0 70px, rgba(255, 255, 255, 0.22) 70px 71.5px);
    -webkit-mask-image: radial-gradient(circle, #000 8%, transparent 52%);
    mask-image: radial-gradient(circle, #000 8%, transparent 52%);
    pointer-events: none;
}

.vivid > * {
    position: relative;
}

/* Иконка команды в потоке, а не поверх рендера */
.cmd.is-static {
    position: relative;
    display: block;
}

@media (max-width: 768px) {
    .page-section {
        padding: 40px 16px 4px;
    }

    .page-section > .section-title,
    .section-lead {
        padding-left: 8px;
    }

    .section-lead {
        font-size: 17px;
    }

    .vivid {
        border-radius: 28px;
    }
}

/* ===== Hero ===== */

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    height: 28px;
    padding: 0 12px;
    border-radius: 9999px;
    background-color: rgba(0, 122, 255, 0.1);
    color: #007AFF;
    font-size: 13px;
    font-weight: 600;
}

.hero .hero-name {
    margin-top: 12px;
}

.hero-name .text-gray {
    color: #86868B;
}

/* Кнопки скачивания. Без JS видны обе — Mac и Windows; скрипт оставляет кнопку системы посетителя. */
.dl-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.dl-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: 54px;
    padding: 0 26px;
    border-radius: 9999px;
    background-color: #007AFF;
    color: #FFF;
    font-size: 17px;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 12px 28px rgba(0, 122, 255, 0.28);
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.dl-button:hover {
    background-color: #0062D1;
}

.dl-button:active {
    transform: scale(0.98);
}

.dl-button:focus-visible {
    outline: 2px solid #007AFF;
    outline-offset: 3px;
}

.dl-button img {
    width: 20px;
    height: 20px;
    filter: brightness(0) invert(1);
}

.dl-button.is-secondary {
    background-color: #FFF;
    color: #1D1D1F;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1);
}

.dl-button.is-secondary img {
    filter: none;
}

.dl-button.is-secondary:hover {
    background-color: #F5F5F7;
}

.dl-linux,
.mobile-note {
    display: none;
}

[data-os="mac"] .hero .dl-win,
[data-os="windows"] .hero .dl-mac,
[data-os="linux"] .hero .dl-mac,
[data-os="linux"] .hero .dl-win,
[data-os="mobile"] .hero .dl-buttons {
    display: none;
}

[data-os="linux"] .hero .dl-linux {
    display: inline-flex;
}

.dl-caption {
    margin: 2px 0 0;
    font-size: 13px;
    color: #86868B;
    text-align: center;
}

.dl-caption span {
    display: none;
}

/* Подпись под кнопкой — требования той системы, для которой кнопка */
html:not([data-os]) .dl-caption .is-any,
[data-os="mobile"] .dl-caption .is-any,
[data-os="mac"] .dl-caption .is-mac,
[data-os="windows"] .dl-caption .is-win,
[data-os="linux"] .dl-caption .is-linux {
    display: inline;
}

[data-os="mobile"] .dl-caption {
    display: none;
}

.dl-more {
    font-size: 15px;
    color: #007AFF;
    text-decoration: none;
}

.dl-more:hover {
    text-decoration: underline;
}

/* Посетитель с телефона: сервер ставится на компьютер */
[data-os="mobile"] .mobile-note {
    display: flex;
}

.mobile-note {
    flex-direction: column;
    align-items: center;
    gap: 14px;
    max-width: 460px;
    margin: 0 16px;
    padding: 20px 22px;
    box-sizing: border-box;
    border-radius: 24px;
    background-color: #FFF;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.04);
    text-align: center;
}

.mobile-note-icons {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mobile-note-icons .glyph {
    width: 40px;
    height: 40px;
}

.mobile-note-icons .glyph::before {
    inset: 10px;
}

.mobile-note-arrow {
    width: 28px;
    height: 2px;
    background-image: linear-gradient(90deg, #007AFF 50%, transparent 50%);
    background-size: 6px 2px;
}

.mobile-note p {
    margin: 0;
    font-size: 15px;
    line-height: 1.45;
    color: #1D1D1F;
}

.mobile-note p b {
    font-weight: 600;
}

.share-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 44px;
    padding: 0 20px;
    border: none;
    border-radius: 9999px;
    background-color: #007AFF;
    color: #FFF;
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
}

.share-button:focus-visible {
    outline: 2px solid #007AFF;
    outline-offset: 3px;
}

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

/* ===== Что добавляет сервер ===== */

/* Спокойное сравнение на белой карточке: слева то, что Magic Packet умеет сам, справа — с сервером */
.adds {
    display: grid;
    grid-template-columns: auto 1px minmax(0, 1fr);
    align-items: start;
    gap: 0 36px;
    padding: 32px 36px 34px;
}

.adds-label {
    margin: 0 0 18px;
    font-size: 13px;
    font-weight: 600;
    color: #86868B;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.adds-divider {
    align-self: stretch;
    background-color: rgba(0, 0, 0, 0.08);
}

.cmd-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 18px 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.adds-group.is-core .cmd-grid {
    grid-template-columns: minmax(0, 1fr);
}

.cmd-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.25;
    text-align: center;
    color: #1D1D1F;
}

.cmd-tile .cmd {
    width: 56px;
    height: 56px;
    box-shadow: 0 8px 18px color-mix(in srgb, var(--c) 25%, transparent);
}

@media (max-width: 900px) {
    .adds {
        grid-template-columns: minmax(0, 1fr);
        gap: 22px;
    }

    .adds-divider {
        height: 1px;
    }

    /* Колонки фиксированной ширины: «Разбудить» стоит ровно над первой командой сервера */
    .cmd-grid,
    .adds-group.is-core .cmd-grid {
        grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
    }
}

@media (max-width: 768px) {
    .adds {
        padding: 24px 16px 26px;
        border-radius: 24px;
    }

    .adds-label {
        padding-left: 4px;
    }

    .cmd-tile {
        font-size: 12px;
    }

    .cmd-tile .cmd {
        width: 52px;
        height: 52px;
    }
}

/* ===== Как это работает ===== */

.flow {
    padding: 40px 28px 34px;
}

.flow-track {
    display: grid;
    grid-template-columns: auto 1fr auto 1fr auto;
    align-items: center;
    max-width: 760px;
    margin: 0 auto;
}

.flow-node {
    width: 88px;
    height: 88px;
    border-radius: 26px;
    background-color: #F5F5F7;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
}

.flow-node .glyph {
    width: 56px;
    height: 56px;
    background: none;
}

.flow-node .glyph::before {
    inset: 8px;
}

.flow-node.is-server {
    position: relative;
    background: linear-gradient(160deg, #5AC8FA, #007AFF);
    box-shadow: 0 14px 30px rgba(0, 122, 255, 0.3);
}

.flow-node.is-server .glyph::before {
    background-color: #FFF;
}

/* Значок сервера на компьютере */
.flow-node.is-server img {
    position: absolute;
    right: -8px;
    bottom: -8px;
    width: 34px;
    height: 34px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.25));
}

.flow-wire {
    position: relative;
    height: 2px;
    margin: 0 10px;
    background-image: linear-gradient(90deg, #007AFF 50%, transparent 50%);
    background-size: 8px 2px;
}

/* «Пакет» бежит по проводу слева направо */
.flow-wire::after {
    content: "";
    position: absolute;
    top: -4px;
    left: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #007AFF;
    box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.18), 0 0 14px rgba(0, 122, 255, 0.6);
    animation: packet 2.4s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

.flow-wire.is-second::after {
    animation-delay: 1.2s;
}

@keyframes packet {
    0% { left: 0; opacity: 0; }
    10% { opacity: 1; }
    45% { left: calc(100% - 10px); opacity: 1; }
    55%, 100% { left: calc(100% - 10px); opacity: 0; }
}

.flow-port {
    position: absolute;
    left: 50%;
    top: -34px;
    transform: translateX(-50%);
    height: 24px;
    padding: 0 10px;
    border-radius: 9999px;
    background-color: rgba(0, 122, 255, 0.1);
    color: #007AFF;
    font-family: "SF Mono", ui-monospace, Menlo, monospace;
    font-size: 12px;
    font-weight: 600;
    line-height: 24px;
    white-space: nowrap;
}

.flow-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 860px;
    margin: 28px auto 0;
    padding: 0;
    list-style: none;
    counter-reset: flow;
}

.flow-steps li {
    text-align: center;
    font-size: 15px;
    line-height: 1.45;
    color: #6E6E73;
}

.flow-steps b {
    display: block;
    margin-bottom: 4px;
    font-size: 17px;
    font-weight: 600;
    color: #1D1D1F;
}

@media (max-width: 768px) {
    .flow {
        padding: 44px 16px 26px;
    }

    .flow-node {
        width: 64px;
        height: 64px;
        border-radius: 20px;
    }

    .flow-node .glyph {
        width: 42px;
        height: 42px;
    }

    .flow-node.is-server img {
        width: 26px;
        height: 26px;
    }

    .flow-wire {
        margin: 0 6px;
    }

    .flow-port {
        display: none;
    }

    .flow-steps {
        grid-template-columns: 1fr;
        gap: 14px;
        text-align: left;
    }
}

@media (prefers-reduced-motion: reduce) {
    .flow-wire::after {
        animation: none;
        left: calc(50% - 5px);
    }
}

/* ===== Настройка ===== */

.steps {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.step {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    gap: 32px;
    padding: 32px;
    border-radius: 28px;
    background-color: #FFF;
}

.step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(160deg, #5AC8FA, #007AFF);
    color: #FFF;
    font-size: 15px;
    font-weight: 700;
    box-shadow: 0 6px 14px rgba(0, 122, 255, 0.3);
}

.step-title {
    margin: 14px 0 8px;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.2;
}

.step-text {
    margin: 0;
    font-size: 17px;
    line-height: 1.5;
    color: #6E6E73;
}

.step-text + .step-text {
    margin-top: 10px;
}

.step-text code,
.faq code,
.net-card code {
    padding: 1px 6px;
    border-radius: 6px;
    background-color: #F2F2F7;
    color: #1D1D1F;
    font-size: 0.9em;
    font-weight: 500;
}

.step-art {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 220px;
    padding: 24px;
    border-radius: 22px;
    background-color: #F5F5F7;
}

/* Вкладки платформ */
.tabs {
    display: inline-flex;
    gap: 4px;
    margin: 18px 0 14px;
    padding: 4px;
    border-radius: 9999px;
    background-color: #F2F2F7;
}

.tab {
    height: 34px;
    padding: 0 16px;
    border: none;
    border-radius: 9999px;
    background: none;
    color: #6E6E73;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.tab[aria-selected="true"] {
    background-color: #FFF;
    color: #1D1D1F;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.tab:focus-visible {
    outline: 2px solid #007AFF;
    outline-offset: 2px;
}

.tab-panel ol {
    margin: 0;
    padding-left: 20px;
    font-size: 16px;
    line-height: 1.5;
    color: #1D1D1F;
}

.tab-panel li + li {
    margin-top: 6px;
}

.step a {
    color: #007AFF;
    text-decoration: none;
}

.step a:hover {
    text-decoration: underline;
}

.tab-panel .step-text {
    margin-top: 12px;
    font-size: 15px;
}

/* Рендер шага 1: установщик и служба */
.install-art {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.install-art img {
    width: 96px;
    height: 96px;
    filter: drop-shadow(0 16px 30px rgba(0, 0, 0, 0.2));
}

.service-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 34px;
    padding: 0 14px;
    border-radius: 9999px;
    background-color: #FFF;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(0, 0, 0, 0.04);
    font-size: 13px;
    font-weight: 600;
}

.dot {
    width: 8px;
    height: 8px;
    flex-shrink: 0;
    border-radius: 50%;
    background-color: #34C759;
    box-shadow: 0 0 0 3px rgba(52, 199, 89, 0.18);
}

/* Рендер шага 2: поле «Адрес MPS» как в приложении */
.mps-field {
    width: 100%;
    max-width: 330px;
    border-radius: 18px;
    background-color: #FFF;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.04);
    overflow: hidden;
}

.mps-field-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    font-size: 15px;
    font-weight: 600;
}

.mps-field-head img {
    width: 22px;
    height: 22px;
}

.mps-field-head .autofill {
    margin-left: auto;
    color: #FF9500;
    font-size: 14px;
    font-weight: 500;
}

/* Нажатие на «Автоподстановку»: подсветка, пока адрес впечатывается */
.mps-field.is-typing .autofill {
    opacity: 0.5;
}

.mps-field-value {
    display: flex;
    align-items: center;
    min-height: 24px;
    padding: 14px;
    font-size: 17px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.mps-field-value::after {
    content: "";
    width: 2px;
    height: 20px;
    margin-left: 1px;
    background-color: #007AFF;
    animation: caret 1s steps(1) infinite;
}

@keyframes caret {
    50% { opacity: 0; }
}

.mps-field-hint {
    padding: 0 14px 14px;
    font-size: 12px;
    line-height: 1.4;
    color: #86868B;
}

/* Рендер шага 3: плитка хоста с командами */
.check-art {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.check-art .host-tile {
    max-width: 320px;
}

.check-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.check-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 32px;
    padding: 0 12px 0 6px;
    border-radius: 9999px;
    background-color: #FFF;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(0, 0, 0, 0.04);
    font-size: 13px;
    font-weight: 600;
}

.check-action .cmd {
    width: 22px;
    height: 22px;
    box-shadow: none;
}

.check-action .cmd::after {
    display: none;
}

@media (max-width: 768px) {
    .step {
        grid-template-columns: minmax(0, 1fr);
        gap: 20px;
        padding: 24px 20px;
        border-radius: 24px;
    }

    .step-title {
        font-size: 21px;
    }

    .step-text {
        font-size: 16px;
    }

    .step-art {
        min-height: 180px;
        padding: 20px 14px;
    }

    .tabs {
        display: flex;
    }

    .tab {
        flex: 1;
        padding: 0 8px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .mps-field-value::after {
        animation: none;
    }
}

/* ===== Приложение сервера ===== */

.desk {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    align-items: center;
    gap: 32px;
    padding: 44px 40px;
}

.desk-title {
    margin: 0 0 10px;
    font-size: 32px;
    font-weight: 700;
    line-height: 1.15;
}

.desk-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.desk-list li {
    position: relative;
    padding-left: 28px;
    font-size: 16px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.86);
}

.desk-list li + li {
    margin-top: 10px;
}

.desk-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 3px;
    width: 18px;
    height: 18px;
    background-color: #FFF;
    -webkit-mask: url("/shared/images/art/sf-checkmark.circle.fill.png") center / contain no-repeat;
    mask: url("/shared/images/art/sf-checkmark.circle.fill.png") center / contain no-repeat;
}

.desk-list b {
    color: #FFF;
    font-weight: 600;
}

.desk-stage {
    position: relative;
    padding: 128px 0 0;
}

/* Окно в стиле macOS */
.mac-window {
    width: 100%;
    max-width: 420px;
    margin-left: auto;
    border-radius: 14px;
    background-color: #F6F6F6;
    color: #1D1D1F;
    box-shadow: 0 40px 80px rgba(10, 10, 80, 0.45), 0 0 0 1px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.mac-titlebar {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    padding: 0 14px;
    background-color: #ECECEC;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.mac-titlebar i {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #FF5F57;
}

.mac-titlebar i:nth-child(2) {
    background-color: #FEBC2E;
}

.mac-titlebar i:nth-child(3) {
    background-color: #28C840;
}

.mac-tabs {
    display: flex;
    gap: 2px;
    margin: 0 auto;
    padding: 2px;
    border-radius: 8px;
    background-color: rgba(0, 0, 0, 0.06);
    font-size: 12px;
    font-weight: 500;
}

.mac-tabs span {
    padding: 3px 12px;
    border-radius: 6px;
}

.mac-tabs span:first-child {
    background-color: #FFF;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}

/* Отступ под светофор слева, чтобы вкладки стояли по центру окна */
.mac-titlebar::after {
    content: "";
    width: 52px;
}

.mac-body {
    padding: 22px 22px 16px;
}

.mac-app {
    display: flex;
    align-items: center;
    gap: 14px;
}

.mac-app img {
    width: 52px;
    height: 52px;
}

.mac-app b {
    display: block;
    font-size: 17px;
}

.mac-app span {
    font-size: 12px;
    color: #86868B;
}

.mac-rows {
    margin: 18px 0 14px;
    border-radius: 10px;
    background-color: #FFF;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.mac-row {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    padding: 0 12px;
    font-size: 13px;
}

.mac-row + .mac-row {
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.mac-row em {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-style: normal;
    color: #6E6E73;
}

.mac-row .dot {
    width: 7px;
    height: 7px;
    box-shadow: none;
}

.mac-switch {
    position: relative;
    margin-left: auto;
    width: 32px;
    height: 18px;
    border-radius: 9999px;
    background-color: #34C759;
}

.mac-switch::after {
    content: "";
    position: absolute;
    right: 2px;
    top: 2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: #FFF;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

.mac-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
    color: #86868B;
}

/* Меню из строки меню — поверх угла окна */
.menu-extra {
    position: absolute;
    top: 0;
    left: 0;
    width: 220px;
    padding: 6px;
    border-radius: 12px;
    background-color: rgba(246, 246, 246, 0.86);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    color: #1D1D1F;
    font-size: 13px;
    box-shadow: 0 24px 50px rgba(10, 10, 80, 0.4), 0 0 0 1px rgba(0, 0, 0, 0.12);
}

.menu-extra div {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 26px;
    padding: 0 8px;
    border-radius: 6px;
}

.menu-extra div:first-child {
    color: #6E6E73;
}

.menu-extra div.is-hover {
    background-color: #007AFF;
    color: #FFF;
}

.menu-extra kbd {
    margin-left: auto;
    font: inherit;
    opacity: 0.6;
}

.menu-extra hr {
    margin: 4px 8px;
    border: none;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

@media (max-width: 900px) {
    .desk {
        grid-template-columns: minmax(0, 1fr);
        padding: 36px 24px;
    }

    .mac-window {
        margin: 0 auto;
    }

    .menu-extra {
        left: -6px;
    }
}

@media (max-width: 768px) {
    .desk {
        padding: 32px 16px 28px;
    }

    .desk-title {
        font-size: 26px;
    }

    .desk-stage {
        padding-top: 150px;
    }

    .menu-extra {
        left: 50%;
        transform: translateX(-50%);
    }
}

/* ===== Бенто сервера ===== */

/* Автопоиск: найденный сервер в списке «В этой сети» */
.found {
    width: 100%;
    max-width: 330px;
    padding: 12px 12px 6px;
    box-sizing: border-box;
    border-radius: 18px;
    background-color: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.3);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}

.found-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 4px 8px;
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Радар: расходящиеся круги у заголовка */
.found-head i {
    position: relative;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #FFF;
}

.found-head i::after {
    content: "";
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    border: 2px solid #FFF;
    animation: radar 1.8s ease-out infinite;
}

@keyframes radar {
    from { transform: scale(0.4); opacity: 1; }
    to { transform: scale(1.8); opacity: 0; }
}

.found .host-tile {
    max-width: none;
    margin-bottom: 6px;
}

.found .host-tile:nth-child(2) {
    transform: none;
}

.found-fill {
    margin-left: auto;
    height: 28px;
    padding: 0 12px;
    border-radius: 9999px;
    background-color: #007AFF;
    color: #FFF;
    font-size: 12px;
    font-weight: 600;
    line-height: 28px;
    white-space: nowrap;
}

/* Пароль */
.password-art {
    flex-direction: column;
    gap: 14px;
}

.password-field {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    max-width: 300px;
    box-sizing: border-box;
    padding: 14px 16px;
    border-radius: 16px;
    background-color: #FFF;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.04);
}

.password-field .cmd {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

.password-field small {
    display: block;
    font-size: 12px;
    color: #86868B;
}

.password-dots {
    display: flex;
    gap: 6px;
    margin-top: 4px;
}

.password-dots i {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background-color: #1D1D1F;
}

.hash {
    max-width: 300px;
    overflow: hidden;
    font-family: "SF Mono", ui-monospace, Menlo, monospace;
    font-size: 11px;
    color: #86868B;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* Пульт для музыки */
.remote {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    width: 100%;
    max-width: 240px;
}

.remote-buttons {
    display: flex;
    align-items: center;
    gap: 14px;
}

.remote-buttons span {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: #F2F2F7;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remote-buttons span.is-main {
    width: 64px;
    height: 64px;
    background: linear-gradient(180deg, #5EE07F, #28B44B);
    box-shadow: 0 12px 26px rgba(52, 199, 89, 0.35);
}

.remote-buttons svg {
    width: 20px;
    height: 20px;
    fill: #1D1D1F;
}

.remote-buttons .is-main svg {
    width: 24px;
    height: 24px;
    fill: #FFF;
}

.volume {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.volume .glyph {
    width: 18px;
    height: 18px;
    background: none;
}

.volume .glyph::before {
    inset: 0;
}

.volume i {
    flex: 1;
    height: 6px;
    border-radius: 9999px;
    background: linear-gradient(90deg, #34C759 0 64%, #E5E5EA 64%);
}

/* ===== Через интернет ===== */

.net {
    padding: 36px 32px 32px;
}

.net-track {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 0;
    max-width: 760px;
    margin: 0 auto 30px;
}

.net-track .flow-node {
    width: 72px;
    height: 72px;
    border-radius: 22px;
}

.net-track .flow-node .glyph {
    width: 46px;
    height: 46px;
}

/* Туннель VPN — светящаяся труба с подписью */
.tunnel {
    position: relative;
    height: 22px;
    margin: 0 12px;
    border-radius: 9999px;
    background: linear-gradient(90deg, rgba(52, 199, 89, 0.15), rgba(52, 199, 89, 0.3));
    box-shadow: inset 0 0 0 1.5px rgba(52, 199, 89, 0.6);
}

.tunnel::after {
    content: "";
    position: absolute;
    top: 6px;
    left: 6px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #34C759;
    box-shadow: 0 0 12px #34C759;
    animation: tunnel 2.6s ease-in-out infinite;
}

@keyframes tunnel {
    0% { left: 6px; opacity: 0; }
    15% { opacity: 1; }
    85% { opacity: 1; }
    100% { left: calc(100% - 16px); opacity: 0; }
}

.tunnel span {
    position: absolute;
    left: 50%;
    top: -30px;
    transform: translateX(-50%);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 24px;
    padding: 0 10px;
    border-radius: 9999px;
    background-color: rgba(52, 199, 89, 0.12);
    color: #248A3D;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.home {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 28px;
    border: 1.5px dashed rgba(0, 0, 0, 0.14);
}

.home-label {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #86868B;
    text-align: center;
}

.net-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.net-card {
    padding: 22px 22px 24px;
    border-radius: 22px;
    background-color: #F5F5F7;
}

.net-card h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 8px;
    font-size: 19px;
    font-weight: 600;
}

.net-card p {
    margin: 0;
    font-size: 15px;
    line-height: 1.5;
    color: #6E6E73;
}

.net-card p + p {
    margin-top: 8px;
}

.badge {
    display: inline-flex;
    align-items: center;
    height: 22px;
    padding: 0 9px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 700;
}

.badge.is-good {
    background-color: rgba(52, 199, 89, 0.15);
    color: #248A3D;
}

.badge.is-warn {
    background-color: rgba(255, 149, 0, 0.15);
    color: #C93400;
}

@media (max-width: 768px) {
    .net {
        padding: 44px 16px 20px;
    }

    .net-track .flow-node {
        width: 52px;
        height: 52px;
        border-radius: 16px;
    }

    .net-track .flow-node .glyph {
        width: 34px;
        height: 34px;
    }

    .home {
        gap: 6px;
        padding: 6px;
        border-radius: 22px;
    }

    .tunnel {
        margin: 0 6px;
    }

    .net-cards {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tunnel::after,
    .found-head i::after {
        animation: none;
    }
}

/* ===== Вопросы и ответы ===== */

.faq {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.faq details {
    border-radius: 20px;
    background-color: #FFF;
}

.faq summary {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 22px;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
}

.faq summary::-webkit-details-marker {
    display: none;
}

/* Плюс, который поворачивается в крестик */
.faq summary::after {
    content: "";
    flex-shrink: 0;
    margin-left: auto;
    width: 14px;
    height: 14px;
    background:
        linear-gradient(#007AFF, #007AFF) center / 14px 2px no-repeat,
        linear-gradient(#007AFF, #007AFF) center / 2px 14px no-repeat;
    transition: transform 0.25s ease;
}

.faq details[open] summary::after {
    transform: rotate(45deg);
}

.faq summary:focus-visible {
    outline: 2px solid #007AFF;
    outline-offset: -2px;
    border-radius: 20px;
}

.faq-body {
    padding: 0 22px 20px;
    font-size: 16px;
    line-height: 1.55;
    color: #6E6E73;
}

.faq-body p {
    margin: 0;
}

.faq-body p + p,
.faq-body ul {
    margin-top: 8px;
}

.faq-body ul {
    margin-bottom: 0;
    padding-left: 20px;
}

.faq-body a {
    color: #007AFF;
    text-decoration: none;
}

/* ===== Загрузки ===== */

.downloads {
    padding: 48px 32px 36px;
    text-align: center;
}

.downloads-title {
    margin: 0;
    font-size: 40px;
    font-weight: 700;
    line-height: 1.1;
}

.downloads-lead {
    margin: 10px auto 30px;
    max-width: 520px;
    font-size: 17px;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.84);
}

.dl-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    text-align: left;
}

.dl-card {
    display: flex;
    flex-direction: column;
    padding: 24px;
    border-radius: 24px;
    background-color: #FFF;
    color: #1D1D1F;
    box-shadow: 0 24px 50px rgba(10, 10, 80, 0.25);
}

/* Карточка системы посетителя выделена рамкой */
[data-os="mac"] .dl-card.is-mac,
[data-os="windows"] .dl-card.is-win,
[data-os="linux"] .dl-card.is-linux {
    box-shadow: 0 24px 50px rgba(10, 10, 80, 0.25), 0 0 0 3px #5AC8FA;
}

.dl-card-head {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dl-card-head img {
    width: 34px;
    height: 34px;
}

.dl-card-head h3 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
}

.dl-version {
    margin-left: auto;
    height: 24px;
    padding: 0 10px;
    border-radius: 9999px;
    background-color: rgba(0, 122, 255, 0.1);
    color: #007AFF;
    font-size: 12px;
    font-weight: 700;
    line-height: 24px;
}

.dl-version.is-soon {
    background-color: #F2F2F7;
    color: #6E6E73;
}

.dl-specs {
    flex: 1;
    margin: 16px 0 20px;
    padding: 0;
    list-style: none;
    font-size: 14px;
    line-height: 1.5;
    color: #6E6E73;
}

.dl-specs li + li {
    margin-top: 4px;
}

.dl-specs b {
    color: #1D1D1F;
    font-weight: 600;
}

.dl-card .dl-button {
    justify-content: center;
    height: 46px;
    padding: 0 18px;
    font-size: 16px;
    box-shadow: none;
}

.dl-card .dl-button.is-secondary {
    background-color: rgba(0, 122, 255, 0.1);
    color: #007AFF;
}

.dl-card .dl-button.is-secondary:hover {
    background-color: rgba(0, 122, 255, 0.16);
}

.downloads-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 24px;
    margin-top: 26px;
    font-size: 15px;
}

.downloads-links a {
    color: #FFF;
    text-decoration: none;
    font-weight: 600;
}

.downloads-links a:hover {
    text-decoration: underline;
}

.downloads-warning {
    max-width: 620px;
    margin: 16px auto 0;
    font-size: 13px;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.78);
}

.downloads-warning a {
    color: #FFF;
}

@media (max-width: 900px) {
    .dl-cards {
        grid-template-columns: 1fr;
        max-width: 420px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .downloads {
        padding: 36px 16px 28px;
    }

    .downloads-title {
        font-size: 30px;
    }
}

/* ===== RTL (ar, fa) ===== */

/* Схемы «телефон → сеть → компьютер»: пакет бежит слева направо, порядок узлов не зеркалится */
[dir="rtl"] .flow-track,
[dir="rtl"] .net-track {
    direction: ltr;
}

/* Подписи — в том же порядке, что узлы над ними; иначе «Вы нажимаете» встаёт под компьютер */
[dir="rtl"] .flow-steps {
    direction: ltr;
}

[dir="rtl"] .flow-steps li {
    direction: rtl;
}

/* Светофор окна в macOS слева и при арабском интерфейсе; вкладки же отзеркалены, как в SwiftUI */
[dir="rtl"] .mac-titlebar {
    direction: ltr;
}

[dir="rtl"] .mac-tabs {
    direction: rtl;
}

[dir="rtl"] .section-lead,
[dir="rtl"] .page-section > .section-title {
    text-align: right;
}

[dir="rtl"] .desk-list li {
    padding-left: 0;
    padding-right: 28px;
}

[dir="rtl"] .desk-list li::before {
    left: auto;
    right: 0;
}

[dir="rtl"] .tab-panel ol,
[dir="rtl"] .faq-body ul {
    padding-left: 0;
    padding-right: 20px;
}

[dir="rtl"] .faq summary::after {
    margin-left: 0;
    margin-right: auto;
}
