:root {
    --bg: #f5f2ea;
    --paper: #fcfaf5;
    --paper-strong: #fffdf8;
    --ink: #17191c;
    --muted: #5b6470;
    --line: rgba(23, 25, 28, 0.1);
    --brand: #0f5b57;
    --brand-soft: #d5ece8;
    --accent: #d86a2d;
    --accent-soft: #ffe8db;
    --navy: #133046;
    --shadow: 0 18px 48px rgba(19, 28, 40, 0.1);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    font-family: "Avenir Next", "PingFang SC", "Noto Sans SC", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(15, 91, 87, 0.08), transparent 30%),
        radial-gradient(circle at right top, rgba(216, 106, 45, 0.1), transparent 22%),
        linear-gradient(180deg, #faf8f2 0%, var(--bg) 100%);
}

a {
    color: inherit;
    text-decoration: none;
}

code {
    font-family: "SFMono-Regular", Consolas, monospace;
}

.site-shell {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 48px;
}

.topbar {
    position: sticky;
    top: 12px;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 14px 18px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(252, 250, 245, 0.88);
    backdrop-filter: blur(16px);
    box-shadow: var(--shadow);
}

.brand {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.nav {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    color: var(--muted);
    font-size: 14px;
}

.topbar-actions {
    display: flex;
    gap: 10px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 0 20px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-weight: 700;
    transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background 160ms ease;
}

.button:hover {
    transform: translateY(-1px);
}

.button.small {
    min-height: 42px;
    padding: 0 16px;
    font-size: 14px;
}

.button.primary {
    color: #fff;
    background: linear-gradient(135deg, var(--brand), #0b4b48);
    box-shadow: 0 14px 28px rgba(15, 91, 87, 0.22);
}

.button.secondary,
.button.ghost {
    border-color: var(--line);
    background: rgba(255, 255, 255, 0.62);
}

.button.light {
    background: #fff;
    color: var(--navy);
}

.button.disabled {
    pointer-events: none;
    opacity: 0.68;
    box-shadow: none;
}

.hero {
    display: grid;
    align-items: center;
    gap: 28px;
    padding: 58px 0 24px;
}

.hero-wide {
    grid-template-columns: 1.06fr 0.94fr;
}

.eyebrow {
    margin: 0 0 12px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--accent);
}

.hero h1,
.section-heading h1,
.section-heading h2,
.split-card h2,
.portal-login-card h2,
.portal-info h2 {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    line-height: 1.04;
}

.hero h1 {
    font-size: clamp(42px, 5vw, 78px);
}

.hero-text,
.section-heading p,
.feature-card p,
.workflow-card p,
.platform-card p,
.download-card p,
.policy-card p,
.portal-note,
.portal-list {
    color: var(--muted);
    line-height: 1.76;
}

.portal-textarea,
.portal-form input {
    width: 100%;
    margin-top: 8px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.72);
    color: var(--ink);
    font: inherit;
}

.portal-textarea {
    min-height: 260px;
    resize: vertical;
    line-height: 1.6;
}

.portal-stack {
    display: grid;
    gap: 12px;
}

.portal-code {
    margin: 0;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(19, 48, 70, 0.06);
    color: var(--navy);
    white-space: pre-wrap;
    word-break: break-word;
    line-height: 1.6;
    font-size: 13px;
}

.portal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 28px 0 22px;
}

.hero-metrics,
.stage-grid,
.feature-grid,
.workflow-grid,
.platform-grid,
.download-grid,
.portal-layout {
    display: grid;
    gap: 18px;
}

.hero-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.metric-card,
.hero-stage-panel,
.feature-card,
.workflow-card,
.platform-card,
.download-card,
.note-card,
.policy-card,
.split-card,
.portal-info,
.portal-login-card {
    border: 1px solid var(--line);
    background: rgba(255, 253, 248, 0.84);
    box-shadow: var(--shadow);
}

.metric-card {
    padding: 18px;
    border-radius: 24px;
}

.metric-card span,
.stage-card p,
.platform-label,
.download-label,
.portal-kicker {
    display: block;
    font-size: 12px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
}

.metric-card strong {
    display: block;
    margin-top: 10px;
    font-size: 18px;
    line-height: 1.5;
}

.hero-stage-panel {
    padding: 22px;
    border-radius: 34px;
    background:
        linear-gradient(160deg, rgba(255, 255, 255, 0.86), rgba(247, 242, 233, 0.88)),
        linear-gradient(135deg, rgba(15, 91, 87, 0.08), rgba(216, 106, 45, 0.08));
}

.stage-topline,
.signal-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.stage-topline em {
    font-style: normal;
    color: var(--brand);
    font-weight: 700;
}

.stage-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 18px 0;
}

.stage-card {
    padding: 18px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.74);
    border: 1px solid rgba(23, 25, 28, 0.08);
}

.stage-card h2,
.stage-card h3 {
    margin: 8px 0;
}

.stage-card span {
    color: var(--muted);
    font-size: 14px;
}

.stage-card-accent {
    background: linear-gradient(135deg, var(--brand-soft), rgba(255, 255, 255, 0.86));
}

.signal-strip {
    flex-wrap: wrap;
}

.signal-strip span {
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(19, 48, 70, 0.06);
    color: var(--navy);
    font-size: 13px;
    font-weight: 700;
}

.section {
    padding: 44px 0 0;
}

.section-heading {
    max-width: 760px;
    margin-bottom: 24px;
}

.section-heading h2,
.section-heading h1 {
    font-size: clamp(30px, 3vw, 50px);
}

.section-heading.compact {
    padding-top: 40px;
}

.feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.feature-grid-wide .feature-card:first-child {
    grid-column: span 2;
}

.feature-card,
.workflow-card,
.platform-card,
.download-card,
.note-card,
.policy-card,
.split-card,
.portal-info,
.portal-login-card {
    padding: 26px;
    border-radius: 30px;
}

.feature-tag {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 12px;
    font-weight: 700;
}

.feature-card-strong {
    background:
        linear-gradient(135deg, rgba(15, 91, 87, 0.08), rgba(216, 106, 45, 0.06)),
        rgba(255, 253, 248, 0.88);
}

.workflow-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.workflow-card {
    position: relative;
    overflow: hidden;
}

.workflow-index {
    display: inline-flex;
    width: 48px;
    height: 48px;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: rgba(15, 91, 87, 0.08);
    color: var(--brand);
    font-weight: 700;
}

.platform-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.pricing-card {
    padding: 26px;
    border-radius: 30px;
    border: 1px solid var(--line);
    background: rgba(255, 253, 248, 0.84);
    box-shadow: var(--shadow);
}

.pricing-card-featured {
    background:
        linear-gradient(135deg, rgba(15, 91, 87, 0.08), rgba(216, 106, 45, 0.08)),
        rgba(255, 253, 248, 0.92);
}

.split-banner {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.split-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.split-card-dark {
    background:
        linear-gradient(135deg, rgba(19, 48, 70, 0.96), rgba(15, 91, 87, 0.92));
    color: #fff;
}

.split-card-dark .eyebrow,
.split-card-dark p {
    color: rgba(255, 255, 255, 0.78);
}

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

.download-note,
.policy-card {
    margin-top: 18px;
}

.note-card ul,
.portal-list {
    margin: 12px 0 0;
    padding-left: 18px;
}

.portal-layout {
    grid-template-columns: 0.9fr 1.1fr;
    align-items: start;
}

.remote-auth-layout {
    grid-template-columns: 1.15fr 0.85fr;
}

.remote-screen-shell {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(19, 48, 70, 0.06);
}

.remote-screen {
    display: block;
    width: 100%;
    min-height: 320px;
    background: rgba(19, 48, 70, 0.08);
    object-fit: contain;
    cursor: crosshair;
}

.admin-grid {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 18px;
}

.admin-card,
.result-card {
    padding: 24px;
    border-radius: 28px;
    border: 1px solid var(--line);
    background: rgba(255, 253, 248, 0.84);
    box-shadow: var(--shadow);
}

.admin-label {
    display: grid;
    gap: 8px;
    margin-bottom: 14px;
}

.admin-label span {
    font-size: 14px;
    font-weight: 700;
}

.admin-input {
    width: 100%;
    min-height: 52px;
    padding: 0 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.82);
}

.result-list {
    display: grid;
    gap: 14px;
}

.result-card {
    padding: 18px;
}

.result-main {
    display: grid;
    gap: 6px;
}

.result-main span,
.result-main em {
    color: var(--muted);
    font-style: normal;
}

.result-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.admin-action {
    min-height: 42px;
}

.portal-form {
    display: grid;
    gap: 16px;
    margin-top: 18px;
}

.portal-form label {
    display: grid;
    gap: 8px;
}

.portal-form span {
    font-size: 14px;
    font-weight: 700;
}

.portal-form input {
    width: 100%;
    min-height: 54px;
    padding: 0 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.8);
    color: var(--ink);
}

.portal-button {
    width: 100%;
}

.footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 42px 0 8px;
    color: var(--muted);
}

.footer-wide {
    padding-top: 52px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.copyright {
    margin: 0;
}

@media (max-width: 1040px) {
    .hero-wide,
    .portal-layout,
    .admin-grid,
    .split-banner,
    .feature-grid,
    .workflow-grid,
    .platform-grid,
    .pricing-grid,
    .download-grid,
    .hero-metrics,
    .stage-grid {
        grid-template-columns: 1fr;
    }

    .feature-grid-wide .feature-card:first-child {
        grid-column: auto;
    }
}

@media (max-width: 920px) {
    .topbar,
    .footer {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 640px) {
    .site-shell {
        width: min(100% - 20px, 1200px);
        padding-top: 12px;
    }

    .hero {
        padding-top: 34px;
    }

    .topbar-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .button.small {
        min-height: 40px;
    }
}
