/* Portal site pages (/help /terms /privacy /contact /about) + announcements */
.sg-site-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--docs-bg-primary, #fff);
    color: var(--docs-text-primary, #1e293b);
    padding-top: var(--top-nav-height, 50px);
    box-sizing: border-box;
}

.sg-site-page-main {
    flex: 1;
    width: 100%;
    max-width: 44rem;
    margin: 0 auto;
    padding: 2.75rem 1.5rem 3.5rem;
    box-sizing: border-box;
}

.sg-site-page-article,
.sg-announce-list,
.sg-announce-detail {
    width: 100%;
}

.sg-site-page-article h1,
.sg-announce-list h1,
.sg-announce-detail h1 {
    font-size: 1.95rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.25;
    margin: 0 0 1.35rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--docs-border-primary, #e2e8f0);
    color: var(--docs-text-primary, #0f172a);
}

.sg-site-page-body {
    font-size: 1.02rem;
    line-height: 1.75;
    color: var(--docs-text-secondary, #334155);
}

/* Lead paragraph under title */
.sg-site-page-body > p:first-of-type {
    font-size: 1.06rem;
    line-height: 1.8;
    color: var(--docs-text-secondary, #475569);
    margin: 0 0 1.5rem;
}

.sg-site-page-body h2 {
    font-size: 1.05rem;
    font-weight: 650;
    letter-spacing: -0.01em;
    margin: 0 0 0.55rem;
    color: var(--docs-text-primary, #0f172a);
}

.sg-site-page-body h3 {
    font-size: 0.98rem;
    font-weight: 600;
    margin: 1.25rem 0 0.45rem;
    color: var(--docs-text-primary, #0f172a);
}

.sg-site-page-body p {
    margin: 0 0 0.95rem;
}

.sg-site-page-body section {
    margin: 0 0 1.15rem;
    padding: 1.15rem 1.25rem 1.05rem;
    background: var(--docs-bg-secondary, #f8fafc);
    border: 1px solid var(--docs-border-primary, #e2e8f0);
    border-radius: 0.55rem;
}

.sg-site-page-body section:last-of-type {
    margin-bottom: 0.35rem;
}

.sg-site-page-body section > div > p:last-child,
.sg-site-page-body section > p:last-child {
    margin-bottom: 0;
}

.sg-site-page-body ul,
.sg-site-page-body ol {
    margin: 0 0 0.95rem;
    padding-left: 1.35rem;
}

.sg-site-page-body li {
    margin: 0.25rem 0;
}

.sg-site-page-body a {
    color: var(--docs-primary, #2563eb);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.15s ease, color 0.15s ease;
}

.sg-site-page-body a:hover {
    border-bottom-color: currentColor;
}

.sg-site-page-body strong {
    color: var(--docs-text-primary, #0f172a);
    font-weight: 650;
}

.sg-site-page-body code {
    font-size: 0.9em;
    padding: 0.12em 0.4em;
    border-radius: 0.3rem;
    background: var(--docs-bg-tertiary, #f1f5f9);
    border: 1px solid var(--docs-border-primary, #e2e8f0);
    color: var(--docs-text-primary, #0f172a);
}

.sg-site-page-body blockquote {
    margin: 0 0 1rem;
    padding: 0.75rem 1rem;
    border-left: 3px solid var(--docs-border-secondary, #cbd5e1);
    background: var(--docs-bg-secondary, #f8fafc);
    color: var(--docs-text-muted, #64748b);
}

.sg-site-page-back {
    margin-top: 2.25rem;
    padding-top: 1.15rem;
    border-top: 1px solid var(--docs-border-primary, #e2e8f0);
    font-size: 0.92rem;
}

.sg-site-page-back a {
    color: var(--docs-text-secondary, #475569);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: color 0.15s ease;
}

.sg-site-page-back a:hover {
    color: var(--docs-primary, #2563eb);
}

/* Announcements list */
.sg-announce-list__items {
    border: 1px solid var(--docs-border-primary, #e2e8f0);
    border-radius: 0.55rem;
    overflow: hidden;
    background: var(--docs-bg-primary, #fff);
}

.sg-announce-list__item {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1.25rem;
    padding: 1rem 1.15rem;
    border-bottom: 1px solid var(--docs-border-primary, #e2e8f0);
    transition: background-color 0.15s ease;
}

.sg-announce-list__item:last-child {
    border-bottom: none;
}

.sg-announce-list__item:hover {
    background: var(--docs-bg-secondary, #f8fafc);
}

.sg-announce-list__item a {
    color: var(--docs-text-primary, #0f172a);
    text-decoration: none;
    font-weight: 600;
    line-height: 1.45;
    min-width: 0;
}

.sg-announce-list__item a:hover {
    color: var(--docs-primary, #2563eb);
}

.sg-announce-list__meta {
    color: var(--docs-text-muted, #94a3b8);
    font-size: 0.84rem;
    white-space: nowrap;
    flex: 0 0 auto;
}

.sg-announce-list__empty {
    margin: 0.5rem 0 0;
    padding: 1.35rem 1.2rem;
    border: 1px dashed var(--docs-border-primary, #e2e8f0);
    border-radius: 0.55rem;
    color: var(--docs-text-muted, #64748b);
    background: var(--docs-bg-secondary, #f8fafc);
    font-size: 0.95rem;
    line-height: 1.5;
}

.sg-announce-list__pager {
    display: flex;
    gap: 0.65rem;
    margin-top: 1.5rem;
}

/* Announcement detail */
.sg-announce-detail__meta {
    color: var(--docs-text-muted, #94a3b8);
    font-size: 0.875rem;
    margin: 0 0 0.65rem;
}

.sg-announce-detail h1 {
    margin-top: 0;
}

.sg-announce-detail__body {
    margin-top: 0.25rem;
}

[data-theme="dark"] .sg-site-page-body section,
[data-theme="dark"] .sg-site-page-body blockquote,
[data-theme="dark"] .sg-announce-list__empty {
    background: var(--docs-bg-secondary);
}

[data-theme="dark"] .sg-site-page-body code {
    background: var(--docs-bg-tertiary, #1e293b);
}

@media (max-width: 640px) {
    .sg-site-page-main {
        padding: 2rem 1.1rem 2.75rem;
    }

    .sg-site-page-article h1,
    .sg-announce-list h1,
    .sg-announce-detail h1 {
        font-size: 1.55rem;
        padding-bottom: 0.85rem;
        margin-bottom: 1.1rem;
    }

    .sg-site-page-body section {
        padding: 1rem 1rem 0.9rem;
    }

    .sg-announce-list__item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.35rem;
        padding: 0.9rem 1rem;
    }
}
