* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #09111f;
    --bg-elevated: rgba(12, 25, 44, 0.92);
    --bg-card: rgba(13, 30, 54, 0.88);
    --bg-soft: rgba(18, 40, 72, 0.72);
    --border: rgba(148, 184, 255, 0.18);
    --border-strong: rgba(148, 184, 255, 0.34);
    --text: #eef4ff;
    --text-muted: #adc3e6;
    --text-soft: #7f96b8;
    --accent: #5fd1ff;
    --accent-strong: #4c8dff;
    --accent-warm: #ffb261;
    --success: #72e2a4;
    --shadow: 0 18px 60px rgba(0, 0, 0, 0.38);
    --radius-lg: 24px;
    --radius-md: 18px;
    --radius-sm: 12px;
    --page-width: 1240px;
    --sidebar-width: 320px;
    --demo-width: 320px;
    --doc-line-width: 72ch;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    color: var(--text);
    font-family: "Segoe UI Variable Text", "Aptos", "Segoe UI", sans-serif;
    font-weight: 400;
    background:
        radial-gradient(circle at top left, rgba(95, 209, 255, 0.18), transparent 28%),
        radial-gradient(circle at top right, rgba(76, 141, 255, 0.22), transparent 30%),
        linear-gradient(180deg, #0a1424 0%, #09111f 48%, #050b15 100%);
}

h1,
h2,
h3 {
    font-weight: 550;
}

h4,
h5,
h6,
strong,
b {
    font-weight: 550;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 28px 28px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.55), transparent 85%);
}

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

a:hover {
    color: #93e5ff;
}

button,
input {
    font: inherit;
}

.page-grid {
    padding: 28px 20px 48px;
}

.page-shell {
    max-width: var(--page-width);
    margin: 0 auto;
}

.home-shell {
    max-width: 1380px;
}

.hero {
    position: relative;
    overflow: hidden;
    padding: 28px;
    border: 1px solid var(--border);
    border-radius: 30px;
    background:
        linear-gradient(135deg, rgba(18, 40, 72, 0.92), rgba(7, 18, 32, 0.96)),
        linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent);
    box-shadow: var(--shadow);
}

.hero::after {
    content: "";
    position: absolute;
    width: 280px;
    height: 280px;
    right: -120px;
    top: -120px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(95, 209, 255, 0.18), transparent 68%);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    color: var(--accent);
    font-size: 0.82rem;
    font-weight: 550;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.hero-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.95fr);
    gap: 28px;
    align-items: start;
}

.hero-copy h1 {
    font-size: clamp(2.4rem, 4.5vw, 4.2rem);
    font-weight: 600;
    line-height: 0.98;
    letter-spacing: -0.045em;
}

.hero-copy p {
    margin-top: 16px;
    max-width: 62ch;
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.7;
}

.hero-actions,
.hero-links,
.demo-actions,
.inline-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.hero-actions {
    margin-top: 22px;
}

.hero-links {
    margin-top: 14px;
}

.button-link,
.button-link.secondary,
.button-link.ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 16px;
    border-radius: 999px;
    border: 1px solid transparent;
    text-decoration: none;
    font-weight: 500;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.button-link {
    color: #04111f;
    background: linear-gradient(135deg, var(--accent), #9cecff);
}

.button-link.secondary {
    color: var(--text);
    background: rgba(148, 184, 255, 0.09);
    border-color: var(--border);
}

.button-link.ghost {
    color: var(--text-muted);
    border-color: rgba(148, 184, 255, 0.16);
    background: transparent;
}

.button-link:hover,
.button-link.secondary:hover,
.button-link.ghost:hover {
    transform: translateY(-1px);
}

.lang-toggle {
    position: fixed;
    top: 18px;
    right: 20px;
    z-index: 80;
    display: inline-flex;
    gap: 6px;
    padding: 6px;
    border: 1px solid rgba(148, 184, 255, 0.18);
    border-radius: 999px;
    background: rgba(7, 18, 32, 0.86);
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.24);
}

.lang-toggle-button {
    min-width: 54px;
    height: 34px;
    padding: 0 14px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: transparent;
    color: var(--text-muted);
    font: inherit;
    font-weight: 550;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.lang-toggle-button:hover {
    border-color: rgba(148, 184, 255, 0.22);
    color: var(--text);
}

.lang-toggle-button.active {
    color: #04111f;
    border-color: transparent;
    background: linear-gradient(135deg, var(--accent), #9cecff);
}

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

.stat-card,
.panel,
.feature-card,
.entry-card,
.empty-state,
.surface-card,
.scenario-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-card);
    box-shadow: var(--shadow);
}

.stat-card {
    padding: 18px;
    background:
        linear-gradient(160deg, rgba(95, 209, 255, 0.08), transparent 42%),
        var(--bg-card);
}

.stat-label {
    color: var(--text-soft);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

.stat-value {
    margin-top: 10px;
    font-size: 1.9rem;
    font-weight: 550;
}

.stat-detail {
    margin-top: 8px;
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.55;
}

.section-block {
    margin-top: 28px;
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 16px;
}

.section-heading h2 {
    font-size: 1.4rem;
    font-weight: 550;
    letter-spacing: -0.03em;
}

.section-heading p {
    color: var(--text-muted);
    max-width: 60ch;
    line-height: 1.6;
}

.entry-grid,
.scenario-grid,
.feature-grid,
.surface-grid {
    display: grid;
    gap: 18px;
}

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

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

.feature-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.surface-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.entry-card,
.surface-card,
.scenario-card {
    padding: 20px;
}

.entry-card h3,
.surface-card h3,
.feature-card h3,
.scenario-card h3 {
    font-size: 1.08rem;
    font-weight: 550;
    letter-spacing: -0.02em;
}

.entry-card p,
.surface-card p,
.feature-card p,
.scenario-card p {
    margin-top: 10px;
    color: var(--text-muted);
    line-height: 1.6;
}

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

.scenario-card::after {
    content: "";
    position: absolute;
    inset: auto -40px -56px auto;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    opacity: 0.34;
}

.scenario-industrial {
    background:
        linear-gradient(145deg, rgba(83, 99, 121, 0.32), rgba(10, 18, 31, 0.94)),
        var(--bg-card);
}

.scenario-industrial::after {
    background: radial-gradient(circle, rgba(95, 209, 255, 0.28), transparent 72%);
}

.scenario-smarthome {
    background:
        linear-gradient(145deg, rgba(16, 79, 74, 0.3), rgba(9, 18, 31, 0.94)),
        var(--bg-card);
}

.scenario-smarthome::after {
    background: radial-gradient(circle, rgba(114, 226, 164, 0.26), transparent 72%);
}

.scenario-dashboard {
    background:
        linear-gradient(145deg, rgba(96, 50, 16, 0.3), rgba(11, 17, 31, 0.94)),
        var(--bg-card);
}

.scenario-dashboard::after {
    background: radial-gradient(circle, rgba(255, 178, 97, 0.28), transparent 72%);
}

.metric-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.metric-chip,
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 10px;
    border-radius: 999px;
    border: 1px solid rgba(148, 184, 255, 0.16);
    background: rgba(148, 184, 255, 0.07);
    color: var(--text-muted);
    font-size: 0.82rem;
}

.badge {
    font-weight: 500;
}

.feature-card {
    overflow: hidden;
}

.feature-preview {
    padding: 14px 14px 0;
}

.feature-preview iframe,
.demo-frame,
#demo-frame {
    width: 100%;
    border: none;
    background: #020812;
    border-radius: 14px;
}

.feature-body {
    padding: 16px 18px 18px;
}

.feature-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.feature-summary {
    margin-top: 12px;
    color: var(--text-muted);
    line-height: 1.55;
    min-height: 72px;
}

.panel {
    padding: 22px;
}

.panel p {
    color: var(--text-muted);
    line-height: 1.65;
}

.empty-state {
    padding: 24px;
}

.empty-state h3 {
    font-size: 1.05rem;
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--text-muted);
    line-height: 1.65;
}

.code-inline {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(95, 209, 255, 0.12);
    color: var(--accent);
    font-family: "Cascadia Mono", "Consolas", monospace;
    font-size: 0.82rem;
}

.page-sidebar {
    display: grid;
    grid-template-columns: minmax(260px, var(--sidebar-width)) minmax(0, 1fr);
    gap: 18px;
    min-height: calc(100vh - 56px);
    padding: 28px 20px;
}

.sidebar-shell,
.content-shell {
    border: 1px solid var(--border);
    border-radius: 24px;
    background: var(--bg-elevated);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.sidebar-shell {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.sidebar-header {
    padding: 24px 22px 18px;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(180deg, rgba(95, 209, 255, 0.08), transparent);
}

.sidebar-header h1 {
    font-size: 1.45rem;
    font-weight: 550;
    letter-spacing: -0.03em;
}

.sidebar-header p {
    margin-top: 8px;
    color: var(--text-muted);
    line-height: 1.55;
}

.sidebar-tools {
    padding: 16px 18px;
    border-bottom: 1px solid rgba(148, 184, 255, 0.12);
}

.filter-input {
    width: 100%;
    height: 42px;
    padding: 0 14px;
    border: 1px solid rgba(148, 184, 255, 0.14);
    border-radius: 999px;
    background: rgba(8, 18, 34, 0.84);
    color: var(--text);
}

.filter-input::placeholder {
    color: var(--text-soft);
}

.sidebar-list {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 10px 0 20px;
}

.sidebar-section {
    padding: 0 12px;
}

.sidebar-section + .sidebar-section {
    margin-top: 12px;
}

.sidebar-section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 10px;
    color: var(--text-soft);
    font-size: 0.78rem;
    font-weight: 550;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.demo-item {
    display: block;
    padding: 12px 12px 12px 14px;
    border-left: 3px solid transparent;
    border-radius: 14px;
    color: inherit;
    text-decoration: none;
    transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.demo-item:hover {
    background: rgba(95, 209, 255, 0.08);
    transform: translateX(1px);
}

.demo-item.active {
    border-left-color: var(--accent);
    background: linear-gradient(90deg, rgba(95, 209, 255, 0.16), rgba(95, 209, 255, 0.05));
}

.demo-item strong {
    display: block;
    font-size: 0.96rem;
    font-weight: 500;
}

.demo-item-meta {
    margin-top: 6px;
    color: var(--text-soft);
    font-size: 0.83rem;
    line-height: 1.45;
}

.demo-item-unavailable {
    border-left-style: dashed;
    opacity: 0.85;
}

.demo-item-unavailable:hover {
    opacity: 1;
}

.content-shell {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.content-header {
    display: flex;
    flex-wrap: wrap;
    align-items: start;
    justify-content: space-between;
    gap: 18px;
    padding: 22px 24px 18px;
    border-bottom: 1px solid var(--border);
}

.content-header h2 {
    font-size: 1.45rem;
    font-weight: 550;
    letter-spacing: -0.03em;
}

.content-header p {
    margin-top: 8px;
    color: var(--text-muted);
    line-height: 1.6;
}

.content-notice {
    margin-top: 10px;
    padding: 8px 12px;
    border: 1px solid rgba(255, 210, 114, 0.5);
    border-radius: 10px;
    background: rgba(255, 210, 114, 0.12);
    color: #ffe5a3;
    font-size: 0.86rem;
}

.meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.content-body {
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-height: 0;
    padding: 20px;
}

.demo-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 0.92fr);
    gap: 18px;
    min-height: 0;
}

.showcase-panel {
    grid-template-columns: 1fr;
}

.showcase-frame {
    min-height: 820px;
}

.demo-stage,
.demo-doc-shell {
    border: 1px solid rgba(148, 184, 255, 0.12);
    border-radius: 18px;
    background: rgba(8, 19, 34, 0.7);
    overflow: hidden;
}

.demo-stage-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(148, 184, 255, 0.12);
    color: var(--text-muted);
    font-size: 0.86rem;
}

.demo-stage-body {
    padding: 14px;
}

.demo-frame {
    min-height: 360px;
}

.demo-doc-shell {
    min-height: 360px;
}

.empty-fill {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 420px;
    padding: 24px;
}

.placeholder-stack {
    max-width: 540px;
}

.placeholder-stack h3 {
    font-size: 1.2rem;
    font-weight: 550;
}

.placeholder-stack p {
    margin-top: 10px;
    color: var(--text-muted);
    line-height: 1.7;
}

.doc-panel {
    padding: 18px 20px 22px;
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.7;
    overflow: auto;
}

.doc-panel h1,
.doc-panel h2,
.doc-panel h3 {
    margin: 12px 0 8px;
    color: var(--text);
    line-height: 1.3;
}

.doc-panel h1 {
    font-size: 1.2rem;
    font-weight: 550;
}

.doc-panel h2 {
    font-size: 1.06rem;
    font-weight: 550;
}

.doc-panel h3 {
    font-size: 0.98rem;
    font-weight: 550;
}

.doc-panel p,
.doc-panel ul,
.doc-panel ol,
.doc-panel table,
.doc-panel pre {
    margin-top: 10px;
}

.doc-panel ul,
.doc-panel ol {
    padding-left: 20px;
}

.doc-panel table {
    width: 100%;
    border-collapse: collapse;
}

.doc-panel th,
.doc-panel td {
    padding: 8px 10px;
    border: 1px solid rgba(148, 184, 255, 0.12);
    text-align: left;
    vertical-align: top;
}

.doc-panel th {
    color: var(--text);
    background: rgba(95, 209, 255, 0.08);
}

.doc-panel pre,
.doc-panel code {
    font-family: "Cascadia Mono", "Consolas", monospace;
}

.doc-panel code {
    padding: 1px 5px;
    border-radius: 6px;
    background: rgba(95, 209, 255, 0.08);
}

.doc-panel pre {
    overflow: auto;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(2, 10, 20, 0.84);
}

.doc-loading {
    color: var(--text-soft);
    font-style: italic;
}

.hidden {
    display: none !important;
}

.sidebar-list::-webkit-scrollbar,
.doc-panel::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.sidebar-list::-webkit-scrollbar-thumb,
.doc-panel::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(148, 184, 255, 0.16);
}

@media (max-width: 1100px) {
    .hero-grid,
    .demo-panel,
    .page-sidebar {
        grid-template-columns: 1fr;
    }

    .hero {
        padding: 24px;
    }

    .page-sidebar {
        min-height: auto;
    }

    .sidebar-shell {
        min-height: 320px;
    }
}

@media (max-width: 800px) {
    .page-grid,
    .page-sidebar {
        padding: 18px 12px 28px;
    }

    .lang-toggle {
        top: 12px;
        right: 12px;
    }

    .entry-grid,
    .scenario-grid,
    .feature-grid,
    .surface-grid,
    .ops-grid,
    .cluster-side-grid {
        grid-template-columns: 1fr;
    }

    .section-heading {
        flex-direction: column;
        align-items: start;
    }

    .content-header,
    .content-body,
    .hero,
    .panel,
    .entry-card,
    .surface-card {
        padding-left: 16px;
        padding-right: 16px;
    }

    .sidebar-header,
    .sidebar-tools {
        padding-left: 16px;
        padding-right: 16px;
    }

    .demo-frame,
    #demo-frame {
        min-height: 300px;
    }
}
