:root {
    --bg: #0b1220;
    --surface: #111b2e;
    --surface-soft: #16233a;
    --text: #e6edf8;
    --text-muted: #9eb0cb;
    --line: #253550;
    --primary: #4f8cff;
    --primary-dark: #3f75dc;
    --focus: rgba(79, 140, 255, 0.26);
    --radius: 14px;
    --shadow: 0 14px 34px rgba(2, 8, 20, 0.35);
}

:root[data-theme="light"] {
    --bg: #f7f9fc;
    --surface: #ffffff;
    --surface-soft: #f1f5fb;
    --text: #0f172a;
    --text-muted: #475569;
    --line: #dbe4ef;
    --primary: #2563eb;
    --primary-dark: #1e4fc4;
    --focus: rgba(37, 99, 235, 0.16);
    --shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    font-family: "IBM Plex Sans", "Segoe UI", Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
}

a {
    color: var(--primary);
}

.site {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    width: min(1120px, 100% - 2rem);
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    border-bottom: 1px solid var(--line);
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    backdrop-filter: blur(8px);
}

.header-inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 0;
}

.brand {
    font-size: 1.08rem;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
    letter-spacing: -0.01em;
}

.top-nav {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.top-nav a {
    text-decoration: none;
    font-weight: 500;
    color: var(--text-muted);
}

.top-nav a:hover {
    color: var(--text);
}

.header-login {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.login-status {
    font-size: 0.86rem;
    color: var(--text-muted);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: 10px;
    padding: 0.54rem 0.95rem;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 120ms ease, border-color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}

.btn-primary {
    background: linear-gradient(180deg, color-mix(in srgb, var(--primary) 92%, white) 0%, var(--primary) 100%);
    color: #fff;
    box-shadow: 0 6px 14px color-mix(in srgb, var(--primary) 35%, transparent);
}

.btn-primary:hover {
    background: var(--primary-dark);
    color: #fff;
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--surface);
    border-color: var(--line);
    color: var(--text);
}

.btn-secondary:hover {
    background: var(--surface-soft);
    color: var(--text);
}

.btn-ghost {
    background: transparent;
    border-color: var(--line);
    color: var(--text-muted);
}

.btn-ghost:hover {
    background: var(--surface-soft);
    color: var(--text);
}

.btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px var(--focus);
}

.hero {
    padding: 3rem 0 2.4rem;
    background:
        radial-gradient(900px 360px at 12% -6%, color-mix(in srgb, var(--primary) 18%, transparent), transparent 62%),
        radial-gradient(760px 320px at 96% -14%, rgba(14, 165, 233, 0.13), transparent 60%);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.45fr 1fr;
    gap: 1rem;
    align-items: stretch;
}

.eyebrow {
    margin: 0 0 0.7rem;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: color-mix(in srgb, var(--primary) 75%, #c8d9ff);
}

.hero-copy h1 {
    margin: 0;
    font-size: clamp(1.9rem, 4vw, 2.8rem);
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.hero-text {
    margin-top: 1rem;
    color: var(--text-muted);
    max-width: 58ch;
    line-height: 1.6;
}

.hero-actions {
    margin-top: 1.15rem;
    display: flex;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.hero-meta {
    margin: 1.1rem 0 0;
    padding-left: 1rem;
    display: grid;
    gap: 0.25rem;
    color: var(--text-muted);
}

.hero-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.1rem;
}

.hero-card h2 {
    margin: 0 0 0.8rem;
    font-size: 1.05rem;
}

.hero-illustration {
    width: 100%;
    max-height: 140px;
    object-fit: contain;
    margin: 0 0 0.4rem;
}

.snapshot-row {
    padding: 0.68rem 0;
    border-bottom: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    gap: 0.7rem;
    font-size: 0.94rem;
    color: var(--text-muted);
}

.snapshot-row strong {
    color: var(--text);
}

.snapshot-note {
    margin: 0.85rem 0 0;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.section {
    padding: 2.35rem 0;
}

.section-muted {
    background: color-mix(in srgb, var(--surface) 75%, var(--bg));
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.section-head {
    margin-bottom: 1rem;
}

.section-head h2 {
    margin: 0;
    font-size: clamp(1.45rem, 2.2vw, 1.9rem);
    letter-spacing: -0.01em;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
}

.feature-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 8px 24px color-mix(in srgb, var(--bg) 42%, transparent);
    padding: 1rem;
}

.feature-illustration {
    width: 100%;
    max-height: 88px;
    object-fit: contain;
    margin-bottom: 0.6rem;
}

.feature-card h3 {
    margin: 0;
    font-size: 1.03rem;
}

.feature-card p {
    margin: 0.6rem 0 0;
    color: var(--text-muted);
    line-height: 1.55;
}

.roadmap-wrap,
.faq-wrap {
    display: grid;
    gap: 1rem;
}

.roadmap-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0.8rem;
}

.roadmap-list li {
    display: grid;
    grid-template-columns: 92px 1fr;
    gap: 1rem;
    align-items: start;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 0.95rem;
}

.roadmap-point {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--primary) 22%, transparent);
    color: color-mix(in srgb, var(--primary) 72%, #d7e6ff);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.roadmap-list h3 {
    margin: 0;
    font-size: 1rem;
}

.roadmap-list p {
    margin: 0.45rem 0 0;
    color: var(--text-muted);
    line-height: 1.5;
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.8rem;
}

.faq-grid article {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 0.95rem;
}

.faq-grid h3 {
    margin: 0;
    font-size: 0.98rem;
}

.faq-grid p {
    margin: 0.5rem 0 0;
    color: var(--text-muted);
    line-height: 1.5;
}

.agent-strip {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    box-shadow: 0 8px 24px color-mix(in srgb, var(--bg) 42%, transparent);
}

.agent-strip p {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.55;
}

.site-footer {
    margin-top: auto;
    border-top: 1px solid var(--line);
    background: var(--surface);
}

.footer-grid {
    padding: 1.2rem 0 1.5rem;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.site-footer h2 {
    margin: 0 0 0.6rem;
    font-size: 0.95rem;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.42rem;
}

.footer-links a {
    text-decoration: none;
    font-size: 0.92rem;
}

.footer-copy {
    margin: 0.4rem 0 0;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.45;
}

.legal-main {
    flex: 1;
    padding: 2.1rem 0;
}

.legal-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.3rem;
}

.legal-card h1 {
    margin: 0;
    font-size: 1.65rem;
}

.legal-card p {
    color: var(--text-muted);
    line-height: 1.55;
}

.legal-card h2 {
    margin: 1.2rem 0 0.5rem;
    font-size: 1.05rem;
}

.legal-card pre {
    margin: 0.5rem 0 0;
    padding: 0.8rem 0.9rem;
    border-radius: 10px;
    background: var(--surface-soft);
    border: 1px solid var(--line);
    overflow-x: auto;
}

.legal-card code {
    font-family: "IBM Plex Mono", "Consolas", "Courier New", monospace;
    font-size: 0.85rem;
}

.legal-card ul {
    margin: 0.45rem 0 0;
    padding-left: 1.2rem;
    color: var(--text-muted);
    line-height: 1.55;
}

.workflow-figure {
    margin: 0.9rem 0 0;
    padding: 0.8rem;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface-soft);
}

.workflow-figure img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.workflow-figure figcaption {
    margin-top: 0.55rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.user-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 1rem;
    align-items: start;
}

.user-sidebar {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1rem;
    position: sticky;
    top: 80px;
}

.user-sidebar h2 {
    margin: 0 0 0.7rem;
    font-size: 1rem;
}

.user-nav-categories {
    display: grid;
    gap: 0.55rem;
}

.user-nav-categories details {
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface-soft);
    padding: 0.35rem 0.45rem 0.45rem;
}

.user-nav-categories summary {
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text);
    list-style: none;
}

.user-nav-categories summary::-webkit-details-marker {
    display: none;
}

.user-nav {
    margin-top: 0.35rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.user-nav a {
    text-decoration: none;
    color: var(--text-muted);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0.45rem 0.55rem;
    background: var(--surface-soft);
}

.user-nav a:hover {
    color: var(--text);
    border-color: color-mix(in srgb, var(--primary) 50%, var(--line));
}

.user-content {
    min-width: 0;
    display: grid;
    gap: 1rem;
}

.user-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.8rem;
}

.stats-board {
    margin-top: 1rem;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.8rem;
}

.stats-card {
    padding: 0.8rem;
}

.stats-card h3 {
    margin: 0.15rem 0 0.25rem;
    font-size: 1.5rem;
}

.stats-card p {
    margin: 0;
}

.stats-label {
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 0.75rem;
}

.meter {
    margin-top: 0.6rem;
    width: 100%;
    height: 8px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--surface-soft);
    overflow: hidden;
}

.meter span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--primary), #1fc2b8);
}

@media (max-width: 980px) {
    .header-inner {
        grid-template-columns: 1fr;
        justify-items: start;
    }

    .top-nav {
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .header-login {
        justify-content: flex-start;
    }

    .hero-grid,
    .card-grid,
    .faq-grid,
    .footer-grid,
    .user-layout,
    .user-stats,
    .stats-board {
        grid-template-columns: 1fr;
    }

    .agent-strip {
        flex-direction: column;
        align-items: flex-start;
    }

    .roadmap-list li {
        grid-template-columns: 1fr;
    }

    .user-sidebar {
        position: static;
    }
}
