/* 未登录 / OAuth 域名首页 */

:root {
    --lp-bg: #f4f4f2;
    --lp-panel: #ffffff;
    --lp-ink: #141414;
    --lp-ink-soft: #3a3a3a;
    --lp-muted: #6b6b6b;
    --lp-line: #e4e4e0;
    --lp-line-strong: #d4d4ce;
    --lp-wash: #ebebe7;
    --lp-radius: 4px;
    --lp-font: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
    --lp-ease: 180ms cubic-bezier(0.22, 1, 0.36, 1);
    --lp-max: 960px;
}

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

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--lp-font);
    color: var(--lp-ink);
    line-height: 1.6;
    min-height: 100vh;
    background: var(--lp-bg);
    -webkit-font-smoothing: antialiased;
}

/* —— Guest atmosphere —— */
body.is-guest {
    background:
        radial-gradient(ellipse 90% 55% at 12% -8%, rgba(20, 20, 20, 0.055), transparent 52%),
        radial-gradient(ellipse 70% 45% at 100% 8%, rgba(20, 20, 20, 0.03), transparent 48%),
        linear-gradient(180deg, #f7f7f5 0%, var(--lp-bg) 42%, #f1f1ee 100%);
}

body.is-logged-in {
    background: var(--lp-bg);
}

.container {
    max-width: var(--lp-max);
    margin: 0 auto;
    padding: 0 24px 72px;
}

.muted { color: var(--lp-muted); }

/* —— Navigation —— */
.lp-nav {
    border-bottom: 1px solid var(--lp-line);
    background: rgba(247, 247, 245, 0.92);
}

body.is-logged-in .lp-nav {
    background: var(--lp-bg);
}

.lp-nav__inner {
    max-width: var(--lp-max);
    margin: 0 auto;
    padding: 0 24px;
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.lp-nav__brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    text-decoration: none;
    color: inherit;
}

.lp-nav__logo {
    display: block;
    height: 28px;
    width: auto;
    max-width: 132px;
    object-fit: contain;
}

.lp-nav__name {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: -0.015em;
    color: var(--lp-ink);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lp-nav__actions {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.lp-nav__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0 12px;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--lp-ink-soft);
    text-decoration: none;
    border-radius: var(--lp-radius);
    transition: color var(--lp-ease), background var(--lp-ease);
}

.lp-nav__link:hover {
    color: var(--lp-ink);
    background: rgba(20, 20, 20, 0.04);
}

.lp-nav__signup {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    margin-left: 4px;
    padding: 0 14px;
    font-size: 13.5px;
    font-weight: 550;
    color: var(--lp-ink);
    text-decoration: none;
    border: 1px solid var(--lp-line-strong);
    border-radius: var(--lp-radius);
    background: transparent;
    transition: background var(--lp-ease), border-color var(--lp-ease), color var(--lp-ease);
}

.lp-nav__signup:hover {
    background: var(--lp-ink);
    border-color: var(--lp-ink);
    color: #fff;
}

.lp-nav__link:focus-visible,
.lp-nav__signup:focus-visible,
.lp-nav__brand:focus-visible,
.btn:focus-visible,
.lp-cta__btn:focus-visible,
.featured-card:focus-visible {
    outline: 2px solid var(--lp-ink);
    outline-offset: 2px;
}

/* —— Buttons —— */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    padding: 10px 16px;
    border-radius: var(--lp-radius);
    text-decoration: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 550;
    font-family: inherit;
    transition: background var(--lp-ease), border-color var(--lp-ease), color var(--lp-ease), transform var(--lp-ease);
}

.btn-compact {
    min-height: 36px;
    padding: 0 14px;
    font-size: 13px;
}

.btn-lg {
    min-height: 44px;
    padding: 0 20px;
    font-size: 14px;
}

.btn-primary {
    background: var(--lp-ink);
    color: #fff;
    border-color: var(--lp-ink);
}

.btn-primary:hover {
    background: #2a2a2a;
    border-color: #2a2a2a;
}

.btn-secondary,
.btn-ghost {
    background: transparent;
    color: var(--lp-ink);
    border-color: var(--lp-line-strong);
}

.btn-secondary:hover,
.btn-ghost:hover {
    background: rgba(20, 20, 20, 0.04);
}

.btn-account {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 34px;
    padding: 0 12px;
    border-radius: var(--lp-radius);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    background: var(--lp-panel);
    color: var(--lp-ink);
    border: 1px solid var(--lp-line);
}

.btn-account:hover { background: #fafafa; }

/* —— Guest hero (one composition) —— */
.lp-hero {
    position: relative;
    padding: 56px 0 64px;
    margin-bottom: 8px;
    animation: lp-rise 520ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.lp-hero__brand {
    margin: 0 0 28px;
    font-size: clamp(2.6rem, 7vw, 4.25rem);
    font-weight: 650;
    letter-spacing: -0.055em;
    line-height: 0.95;
    color: var(--lp-ink);
}

.lp-hero__site {
    display: block;
    margin-top: 10px;
    font-size: 0.28em;
    font-weight: 500;
    letter-spacing: 0.02em;
    line-height: 1.35;
    color: var(--lp-muted);
}

.lp-hero__title {
    margin: 0 0 14px;
    max-width: 18em;
    font-size: clamp(1.15rem, 2.4vw, 1.45rem);
    font-weight: 550;
    letter-spacing: -0.025em;
    line-height: 1.35;
    color: var(--lp-ink-soft);
}

.lp-hero__tagline {
    margin: -4px 0 12px;
    max-width: 34rem;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: -0.01em;
    line-height: 1.5;
    color: var(--lp-ink-soft);
}

.lp-hero__lead {
    margin: 0;
    max-width: 34rem;
    font-size: 15px;
    line-height: 1.7;
    color: var(--lp-muted);
}

.lp-hero__meta {
    margin: 18px 0 0;
    font-size: 12.5px;
    letter-spacing: 0.01em;
    color: var(--lp-muted);
    font-variant-numeric: tabular-nums;
}

.lp-cta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 32px;
}

.lp-cta__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 20px;
    border-radius: var(--lp-radius);
    font-size: 14px;
    font-weight: 550;
    text-decoration: none;
    transition: background var(--lp-ease), color var(--lp-ease), border-color var(--lp-ease), transform var(--lp-ease);
}

.lp-cta__btn--primary {
    background: var(--lp-ink);
    color: #fff;
    border: 1px solid var(--lp-ink);
}

.lp-cta__btn--primary:hover {
    background: #2a2a2a;
    border-color: #2a2a2a;
}

.lp-cta__btn--primary .lp-cta__arrow {
    transition: transform var(--lp-ease);
}

.lp-cta__btn--primary:hover .lp-cta__arrow {
    transform: translateX(3px);
}

.lp-cta__btn--ghost {
    background: transparent;
    color: var(--lp-ink-soft);
    border: 1px solid var(--lp-line-strong);
}

.lp-cta__btn--ghost:hover {
    color: var(--lp-ink);
    background: rgba(20, 20, 20, 0.035);
}

/* —— Capabilities (below fold, no cards) —— */
.lp-section {
    padding: 40px 0 8px;
    border-top: 1px solid var(--lp-line);
    animation: lp-rise 560ms cubic-bezier(0.22, 1, 0.36, 1) 80ms both;
}

.lp-section__head {
    margin-bottom: 28px;
}

.lp-section__kicker {
    margin: 0 0 8px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--lp-muted);
}

.lp-section__title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--lp-ink);
}

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

.lp-capability {
    display: grid;
    grid-template-columns: 2.5rem minmax(0, 1fr);
    gap: 16px 20px;
    padding: 22px 0;
    border-top: 1px solid var(--lp-line);
}

.lp-capability:last-child {
    border-bottom: 1px solid var(--lp-line);
}

.lp-capability__num {
    font-size: 12px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.08em;
    color: var(--lp-muted);
    padding-top: 3px;
}

.lp-capability__title {
    margin: 0 0 6px;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.015em;
    color: var(--lp-ink);
}

.lp-capability__desc {
    margin: 0;
    max-width: 36rem;
    font-size: 13.5px;
    line-height: 1.65;
    color: var(--lp-muted);
}

/* —— Featured apps —— */
.featured-block {
    margin: 0;
    padding: 40px 0 8px;
    border-top: 1px solid var(--lp-line);
    animation: lp-rise 600ms cubic-bezier(0.22, 1, 0.36, 1) 120ms both;
}

.featured-head { margin-bottom: 20px; }

.featured-head__kicker {
    margin: 0 0 8px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--lp-muted);
}

.featured-head__title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--lp-ink);
    line-height: 1.3;
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1px;
    background: var(--lp-line);
    border: 1px solid var(--lp-line);
    border-radius: 6px;
    overflow: hidden;
}

.featured-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    text-decoration: none;
    color: inherit;
    background: var(--lp-panel);
    border: 0;
    border-radius: 0;
    transition: background var(--lp-ease);
}

.featured-card--link:hover {
    background: #fafaf8;
}

.featured-card--static {
    cursor: default;
    background: #fafaf8;
}

.featured-card__media {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid var(--lp-line);
}

.featured-card__icon {
    width: 28px;
    height: 28px;
    object-fit: contain;
    border-radius: 4px;
}

.featured-card__body {
    flex: 1;
    min-width: 0;
    text-align: left;
}

.featured-card__name {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--lp-ink);
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.featured-card__cta {
    display: inline-block;
    margin-top: 5px;
    font-size: 12px;
    font-weight: 500;
    color: var(--lp-muted);
    transition: color var(--lp-ease);
}

.featured-card--link:hover .featured-card__cta {
    color: var(--lp-ink);
}

.featured-card__note {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: var(--lp-muted);
    font-weight: 400;
}

/* —— Logged-in (OAuth host) —— */
.hero {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin: 24px 0 0;
}

.card {
    background: var(--lp-panel);
    border: 1px solid var(--lp-line);
    border-radius: 8px;
    padding: 24px 22px;
    margin-bottom: 16px;
}

.card-welcome {
    padding: 0;
    overflow: visible;
}

.welcome-inner { padding: 24px 22px; }

.welcome-head {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 16px 20px;
}

.welcome-avatar {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--lp-ink);
    background: var(--lp-wash);
    border: 1px solid var(--lp-line);
}

.welcome-head-main { min-width: 0; }

.welcome-kicker {
    font-size: 12px;
    font-weight: 500;
    color: var(--lp-muted);
    margin: 0 0 4px;
}

.welcome-title {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--lp-ink);
    line-height: 1.3;
}

.welcome-head-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.welcome-head-actions .btn-primary {
    height: 34px;
    padding: 0 14px;
    margin: 0;
    font-size: 13px;
}

.welcome-desc {
    margin: 18px 0 0;
    padding-top: 18px;
    border-top: 1px solid var(--lp-line);
    font-size: 14px;
    line-height: 1.55;
    color: var(--lp-muted);
}

.welcome-email-panel {
    margin-top: 16px;
    padding: 14px;
    border-radius: var(--lp-radius);
    background: #fafafa;
    border: 1px solid var(--lp-line);
}

.welcome-email-panel-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.welcome-email-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--lp-muted);
}

.welcome-email-value {
    font-size: 14px;
    color: var(--lp-ink);
    word-break: break-all;
    line-height: 1.5;
}

.pill {
    display: inline-block;
    padding: 4px 8px;
    border-radius: var(--lp-radius);
    font-size: 12px;
    font-weight: 500;
    border: 1px solid var(--lp-line);
}

.pill-email-ok,
.pill-email-warn {
    background: #f5f5f5;
    color: var(--lp-ink-soft);
}

.welcome-verify-banner {
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: var(--lp-radius);
    background: #fafafa;
    border: 1px solid var(--lp-line);
    font-size: 13px;
    line-height: 1.5;
    color: var(--lp-muted);
}

.welcome-verify-banner p { margin: 0 0 10px; }
.welcome-verify-banner p:last-child { margin-bottom: 0; }

.btn-verify-email {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 14px;
    border-radius: var(--lp-radius);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    background: var(--lp-ink);
    color: #fff;
    border: 1px solid var(--lp-ink);
}

.btn-verify-email:hover {
    background: #2a2a2a;
    border-color: #2a2a2a;
}

.card-apps {
    border: 1px solid var(--lp-line);
    background: var(--lp-panel);
}

.card-apps-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 4px;
}

.card-apps-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: var(--lp-radius);
    background: #fafafa;
    border: 1px solid var(--lp-line);
    position: relative;
}

.card-apps-icon::before,
.card-apps-icon::after {
    content: "";
    position: absolute;
    left: 10px;
    right: 10px;
    height: 2px;
    background: #d4d4d4;
    border-radius: 1px;
}

.card-apps-icon::before { top: 14px; }
.card-apps-icon::after { bottom: 14px; }

.section-title {
    margin: 0 0 6px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--lp-ink);
}

.app-list {
    margin: 16px 0 0;
    padding: 0;
    list-style: none;
    border: 1px solid var(--lp-line);
    border-radius: var(--lp-radius);
    overflow: hidden;
}

.app-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--lp-line);
    background: var(--lp-panel);
    font-size: 14px;
}

.app-list li:last-child { border-bottom: 0; }
.app-list li:hover { background: #fafafa; }

.app-meta { font-size: 12px; color: var(--lp-muted); }

.empty-apps {
    margin-top: 16px;
    padding: 28px 20px;
    text-align: center;
    border-radius: var(--lp-radius);
    border: 1px dashed var(--lp-line);
    background: #fafafa;
}

code {
    background: #f5f5f5;
    padding: 2px 5px;
    border-radius: 3px;
    font-size: 0.9em;
    border: 1px solid var(--lp-line);
}

/* —— Footer —— */
.site-footer {
    margin-top: 0;
    padding: 0 24px 48px;
    background: transparent;
}

.site-footer__inner {
    max-width: var(--lp-max);
    margin: 0 auto;
    border-top: 1px solid var(--lp-line);
    padding-top: 22px;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.site-footer__copy {
    margin: 0;
    font-size: 12px;
    line-height: 1.6;
    color: var(--lp-muted);
}

.site-footer__copy strong {
    font-weight: 550;
    color: var(--lp-ink-soft);
}

.site-footer__mark {
    margin: 0;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--lp-muted);
}

@keyframes lp-rise {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .lp-hero,
    .lp-section,
    .featured-block {
        animation: none;
    }
    .lp-cta__btn--primary:hover .lp-cta__arrow {
        transform: none;
    }
}

@media (max-width: 720px) {
    .container { padding: 0 18px 56px; }

    .lp-nav__inner {
        padding: 0 18px;
        min-height: 56px;
        gap: 16px;
    }

    .lp-nav__logo {
        height: 24px;
        max-width: 108px;
    }

    .lp-nav__name {
        font-size: 13px;
        max-width: 42vw;
    }

    .lp-hero {
        padding: 36px 0 48px;
    }

    .lp-capability {
        grid-template-columns: 2rem minmax(0, 1fr);
        gap: 12px 14px;
        padding: 18px 0;
    }

    .featured-grid {
        grid-template-columns: 1fr;
    }

    .site-footer { padding: 0 18px 40px; }

    .site-footer__inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .lp-nav__name {
        display: none;
    }

    .lp-nav__link,
    .lp-nav__signup {
        min-height: 34px;
        font-size: 13px;
    }

    .lp-nav__signup {
        padding: 0 12px;
    }
}

@media (max-width: 640px) {
    .lp-cta { width: 100%; }
    .lp-cta__btn { flex: 1; min-width: 0; }

    .welcome-head {
        grid-template-columns: auto 1fr;
        grid-template-rows: auto auto;
    }
    .welcome-avatar { grid-row: 1 / 2; }
    .welcome-head-main { grid-column: 2 / 3; grid-row: 1 / 2; }
    .welcome-head-actions {
        grid-column: 1 / -1;
        grid-row: 2 / 3;
        justify-content: stretch;
    }
    .welcome-head-actions .btn-account,
    .welcome-head-actions .btn-primary {
        flex: 1;
        min-width: 0;
    }
    .card-apps-header {
        flex-direction: column;
        align-items: flex-start;
    }
}
