/* Community page only: reuse the approved product-shell tokens. */
body[data-ui-version="new"] .links-main {
    min-width: 0;
    overflow: auto;
    overscroll-behavior: contain;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--panel-bg);
}

body[data-ui-version="new"] .links-main > .product-workspace-toolbar {
    background: var(--panel-bg);
}

.links-content {
    max-width: 960px;
    margin: 0 auto;
    padding: clamp(28px, 5vw, 64px) clamp(20px, 4vw, 56px);
}

.links-body .learning-header > button {
    flex: 0 0 auto;
    width: auto;
    min-width: 44px;
}

.links-intro {
    max-width: 720px;
    margin-bottom: 32px;
}

.links-eyebrow {
    margin: 0 0 12px;
    color: var(--accent);
    font-size: 13px;
    font-weight: 650;
}

.links-intro h1 {
    margin: 0 0 16px;
    color: var(--text);
    font-size: clamp(30px, 3.5vw, 44px);
    font-weight: 750;
    line-height: 1.15;
    letter-spacing: -0.025em;
}

.links-intro > p:last-child {
    margin: 0;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.6;
}

.links-registration {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 24px;
    padding: 20px;
    border: 1px solid var(--accent-border);
    border-radius: 10px;
    background: var(--accent-soft);
}

.links-registration > svg {
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    color: var(--accent);
}

.links-registration h2 {
    margin: 0 0 8px;
    color: var(--text);
    font-size: 16px;
    font-weight: 650;
    line-height: 1.4;
}

.links-registration p {
    margin: 0;
    color: var(--text-soft);
    font-size: 14px;
    line-height: 1.6;
}

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

.links-community {
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: flex-start;
    padding: 28px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    color: var(--text);
    text-decoration: none;
    transition: border-color 150ms ease, background-color 150ms ease;
}

.links-community:hover {
    border-color: var(--accent-border);
    background: var(--surface-active);
}

.links-network-mark {
    display: grid;
    width: 48px;
    height: 48px;
    margin-bottom: 24px;
    place-items: center;
    border: 1px solid var(--accent-border);
    border-radius: 12px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 19px;
    font-weight: 800;
    letter-spacing: -0.04em;
}

html[data-theme="light"] .links-network-mark {
    color: #1d4ed8;
}

.links-network-mark svg {
    width: 24px;
    height: 24px;
}

.links-community h2 {
    margin: 0 0 8px;
    color: var(--text);
    font-size: 22px;
    font-weight: 700;
    line-height: 1.3;
}

.links-address {
    margin: 0;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.5;
}

.links-open {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 28px;
    color: var(--accent);
    font-size: 14px;
    font-weight: 650;
    line-height: 1.4;
}

.links-open svg,
.links-next svg,
.links-body .learning-header button svg {
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
}

.links-note {
    margin: 16px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
}

.links-next {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 32px;
    padding-top: 28px;
    border-top: 1px solid var(--border);
}

body[data-ui-version="new"] .links-next a {
    min-height: 44px;
    white-space: normal;
    text-decoration: none;
}

.links-next p {
    flex-basis: 100%;
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
}

.links-skip {
    position: fixed;
    z-index: 100;
    top: 8px;
    left: 8px;
    padding: 12px 16px;
    transform: translateY(-160%);
    border-radius: 8px;
    background: var(--panel-bg);
    color: var(--text);
}

.links-skip:focus {
    transform: none;
}

.native-download-content {
    max-width: 1040px;
}

.native-download-intro {
    margin-bottom: 24px;
}

.native-download-notice {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 20px;
    padding: 18px 20px;
    border: 1px solid var(--accent-border);
    border-radius: 10px;
    background: var(--accent-soft);
}

.native-download-notice > svg {
    flex: 0 0 21px;
    width: 21px;
    height: 21px;
    color: var(--accent);
}

.native-download-notice h2,
.native-download-notice p {
    margin: 0;
}

.install-native-actions {
    display: flex;
    margin-top: 12px;
}

.install-native-actions .native-download-action {
    border: 0;
    cursor: pointer;
}

.install-native-actions .native-download-action:disabled {
    cursor: wait;
    opacity: 0.65;
}

.native-download-notice h2 {
    color: var(--text);
    font-size: 15px;
    font-weight: 700;
}

.native-download-notice p {
    margin-top: 5px;
    color: var(--text-soft);
    font-size: 13px;
    line-height: 1.55;
}

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

.native-download-card {
    display: grid;
    min-width: 0;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
}

.native-download-card.is-available {
    border-color: var(--accent-border);
}

.native-download-icon {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface-muted);
    color: var(--accent);
}

.native-download-icon svg {
    width: 21px;
    height: 21px;
}

.native-download-copy {
    min-width: 0;
}

.native-download-copy h2,
.native-download-copy p {
    margin: 0;
}

.native-download-copy h2 {
    color: var(--text);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
}

.native-download-copy p {
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
}

.native-download-save-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 10px;
    color: var(--accent);
    font-size: 12px;
    font-weight: 650;
    text-decoration: none;
}

.native-download-save-link:hover,
.native-download-save-link:focus-visible {
    text-decoration: underline;
}

.native-download-save-link svg {
    width: 14px;
    height: 14px;
}

body[data-ui-version="new"] .native-download-action {
    min-height: 40px;
    padding: 0 13px;
    white-space: nowrap;
    text-decoration: none;
}

.native-download-action svg {
    width: 16px;
    height: 16px;
}

.native-download-unavailable {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    padding: 0 13px;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 650;
}

.native-download-footer {
    margin-top: 24px;
}

@media (max-width: 960px) {
    body[data-ui-version="new"] .links-main {
        border: 0;
        border-radius: 0;
    }
}

@media (max-width: 640px) {
    .links-content {
        padding: 28px 20px;
    }

    .links-communities {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
    }

    .links-community {
        padding: 24px;
    }

    .links-network-mark {
        margin-bottom: 16px;
    }

    .links-open {
        margin-top: 20px;
    }

    .links-registration {
        gap: 12px;
        padding: 16px;
    }

    .native-download-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .native-download-card {
        grid-template-columns: 40px minmax(0, 1fr);
        padding: 16px;
    }

    .native-download-icon {
        width: 40px;
        height: 40px;
    }

    body[data-ui-version="new"] .native-download-action,
    .native-download-unavailable {
        grid-column: 1 / -1;
        justify-content: center;
    }

    .links-next a {
        width: 100%;
        justify-content: center;
        text-align: center;
    }
}
.links-ranking { margin-top: 2rem; }
.links-ranking h2 { font-size: 1.35rem; font-weight: 700; }
.links-ranking p { margin: .5rem 0 1rem; color: var(--muted-strong, var(--text-muted, #94a3b8)); }
.links-ranking-scroll { overflow-x: auto; border: 1px solid var(--border, #334155); border-radius: .75rem; }
.links-ranking table { width: 100%; min-width: 650px; border-collapse: collapse; text-align: left; }
.links-ranking th, .links-ranking td { padding: .65rem .85rem; border-bottom: 1px solid var(--border, #334155); white-space: nowrap; }
.links-ranking th { color: var(--muted-strong, var(--text-muted, #94a3b8)); font-weight: 600; }
.links-ranking tr:last-child td { border-bottom: 0; }
