:root {
    --accent: #4C82FB;
    --accent-strong: #2F6BF0;
    --accent-contrast: #ffffff;
    --running: #34C77B;
    --sleeping: #7C8696;
    --warning: #E0A23C;
    --error: #E0584C;

    --text: #191C22;
    --text-muted: #4A505C;
    --text-faint: #8B919E;
    --bg: #E9EBEF;
    --surface: #FFFFFF;
    --surface-alt: #F5F6F8;
    --titlebar: #FBFBFC;
    --head: #FAFAFB;
    --card: #FFFFFF;
    --border: rgba(15, 20, 30, 0.09);
    --border-strong: rgba(15, 20, 30, 0.16);
    --selection: #EAF0FD;
    --accent-glow: rgba(47, 107, 240, 0.14);
    --shadow: rgba(13, 15, 19, 0.10);

    --footer-bg: #0D0F13;
    --footer-text: #9AA1AD;

    --hero-bg: linear-gradient(165deg, #f4f6fa 0%, #e9ecf2 55%, #e2e6ee 100%);
    --hero-heading: #0D0F13;
    --hero-text: #4A505C;
    --hero-muted: #646B78;
    --hero-secondary-bg: rgba(15, 20, 30, 0.05);
    --hero-secondary-border: rgba(15, 20, 30, 0.18);
    --hero-secondary-text: #191C22;
    --hero-secondary-hover: rgba(15, 20, 30, 0.08);

    --mock-bg: #15171C;
    --mock-titlebar: #1A1D23;
    --mock-sidebar: #131519;
    --mock-panel: #15171C;
    --mock-inspector: #16181D;
    --mock-head: #181A1F;
    --mock-border: rgba(255, 255, 255, 0.075);
    --mock-text: #E7E9EE;
    --mock-text-muted: #9AA1AD;
}

[data-theme="dark"] {
    --text: #E7E9EE;
    --text-muted: #9AA1AD;
    --text-faint: #646B78;
    --bg: #0D0F13;
    --surface: #16181D;
    --surface-alt: #131519;
    --titlebar: #1A1D23;
    --head: #181A1F;
    --card: #1B1E24;
    --border: rgba(255, 255, 255, 0.075);
    --border-strong: rgba(255, 255, 255, 0.13);
    --selection: #1D273D;
    --accent-glow: rgba(76, 130, 251, 0.16);
    --shadow: rgba(0, 0, 0, 0.45);

    --hero-bg: linear-gradient(160deg, #050b13 0%, #0d0f13 55%, #15171c 100%);
    --hero-heading: #ffffff;
    --hero-text: #c7d0dc;
    --hero-muted: #9AA1AD;
    --hero-secondary-bg: rgba(255, 255, 255, 0.06);
    --hero-secondary-border: rgba(255, 255, 255, 0.22);
    --hero-secondary-text: #E7E9EE;
    --hero-secondary-hover: rgba(255, 255, 255, 0.12);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --text: #E7E9EE;
        --text-muted: #9AA1AD;
        --text-faint: #646B78;
        --bg: #0D0F13;
        --surface: #16181D;
        --surface-alt: #131519;
        --titlebar: #1A1D23;
        --head: #181A1F;
        --card: #1B1E24;
        --border: rgba(255, 255, 255, 0.075);
        --border-strong: rgba(255, 255, 255, 0.13);
        --selection: #1D273D;
        --accent-glow: rgba(76, 130, 251, 0.16);
        --shadow: rgba(0, 0, 0, 0.45);

        --hero-bg: linear-gradient(160deg, #050b13 0%, #0d0f13 55%, #15171c 100%);
        --hero-heading: #ffffff;
        --hero-text: #c7d0dc;
        --hero-muted: #9AA1AD;
        --hero-secondary-bg: rgba(255, 255, 255, 0.06);
        --hero-secondary-border: rgba(255, 255, 255, 0.22);
        --hero-secondary-text: #E7E9EE;
        --hero-secondary-hover: rgba(255, 255, 255, 0.12);
    }
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
        Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: var(--text);
    background-color: var(--bg);
}

header {
    padding: 0.5rem;
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: blur(18px);
    box-shadow: 0 1px 0 var(--border);
    position: sticky;
    top: 0;
    z-index: 10;
}

nav {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.75rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
    gap: 0.75rem;
}

.logo-img {
    height: 2.5rem;
    width: 2.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px var(--shadow);
}

.logo-text {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

@media (max-width: 768px) {
    header { padding: 0.25rem; }
    nav { padding: 0.5rem; }
    .logo-img { height: 2rem; width: 2rem; }
    .logo-text { font-size: 1.1rem; }
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.nav-links {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.theme-toggle {
    background: none;
    border: none;
    padding: 0.4rem;
    cursor: pointer;
    color: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
    flex-shrink: 0;
}

.theme-toggle:hover { background-color: var(--surface-alt); }

.theme-toggle .sun-icon { display: none; }
.theme-toggle .moon-icon { display: block; }

[data-theme="dark"] .theme-toggle .sun-icon { display: block; }
[data-theme="dark"] .theme-toggle .moon-icon { display: none; }

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .theme-toggle .sun-icon { display: block; }
    :root:not([data-theme="light"]) .theme-toggle .moon-icon { display: none; }
}

.theme-img-dark { display: none; }
.theme-img-light { display: block; }

[data-theme="dark"] .theme-img-light { display: none; }
[data-theme="dark"] .theme-img-dark { display: block; }

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .theme-img-light { display: none; }
    :root:not([data-theme="light"]) .theme-img-dark { display: block; }
}

/* Hero */
.hero {
    background: var(--hero-bg);
    color: var(--hero-text);
    padding: 5rem max(1.5rem, calc((100% - 1200px) / 2));
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 4rem;
    align-items: center;
}

.hero-eyebrow {
    color: var(--accent);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.hero-content h1 {
    font-size: 3rem;
    line-height: 1.1;
    margin-bottom: 1.25rem;
    color: var(--hero-heading);
    letter-spacing: -0.02em;
}

.hero-content p {
    font-size: 1.15rem;
    color: var(--hero-text);
}

.cta-buttons {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.6rem;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
    border: 1px solid transparent;
}

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

.button.primary {
    background: var(--accent);
    color: var(--accent-contrast);
    box-shadow: 0 6px 18px rgba(76, 130, 251, 0.35);
}

.button.secondary {
    background: var(--hero-secondary-bg);
    color: var(--hero-secondary-text);
    border-color: var(--hero-secondary-border);
}

.button.secondary:hover { background: var(--hero-secondary-hover); }

.requirements {
    margin-top: 1.25rem;
    font-size: 0.9rem;
    color: var(--hero-muted);
}

.beta-link {
    margin-top: 0.75rem;
    font-size: 0.9rem;
}

.beta-link a {
    color: var(--hero-muted);
    text-decoration: underline;
    text-underline-offset: 0.15em;
}

.beta-link-meta {
    margin-left: 0.5rem;
    color: var(--hero-muted);
}

.releases-beta-note {
    margin: 0.5rem 0 0;
    color: var(--hero-muted);
    max-width: 42rem;
}

/* Hero app mockup — CSS-only three-pane process explorer */
.hero-mock {
    border-radius: 14px;
    background: var(--mock-bg);
    border: 1px solid var(--border);
    box-shadow: 0 30px 80px var(--shadow);
    overflow: hidden;
    color: var(--mock-text);
    font-size: 13px;
}

.mock-titlebar {
    display: flex;
    align-items: center;
    gap: 7px;
    height: 38px;
    padding: 0 14px;
    background: var(--mock-titlebar);
    border-bottom: 1px solid var(--mock-border);
}

.mock-titlebar .dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: var(--mock-border);
}

.mock-titlebar .mock-search {
    margin-left: 18px;
    height: 20px;
    flex: 1;
    max-width: 220px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--mock-border);
}

.mock-body {
    display: grid;
    grid-template-columns: 44px 1fr 230px;
    min-height: 380px;
}

.mock-sidebar {
    background: var(--mock-sidebar);
    border-right: 1px solid var(--mock-border);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 16px 0;
}

.mock-sidebar .nav-item {
    width: 26px;
    height: 26px;
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.04);
}

.mock-sidebar .nav-item.active {
    background: var(--accent);
    opacity: 0.85;
}

.mock-tree {
    background: var(--mock-panel);
    overflow: hidden;
}

.mock-tree-head {
    display: grid;
    grid-template-columns: 1fr 70px 60px;
    gap: 12px;
    padding: 0 14px;
    height: 30px;
    align-items: center;
    background: var(--mock-head);
    border-bottom: 1px solid var(--mock-border);
    color: var(--mock-text-muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.mock-row {
    display: grid;
    grid-template-columns: 1fr 70px 60px;
    gap: 12px;
    align-items: center;
    padding: 0 14px;
    height: 34px;
    border-bottom: 1px solid var(--mock-border);
    color: var(--mock-text-muted);
    white-space: nowrap;
}

.mock-row .name {
    display: flex;
    align-items: center;
    gap: 9px;
    overflow: hidden;
    color: var(--mock-text);
    font-weight: 500;
    text-overflow: ellipsis;
}

.mock-row .name .indent { width: 14px; flex-shrink: 0; }
.mock-row .status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.mock-row.active {
    background: var(--accent-glow);
    box-shadow: inset 2px 0 0 var(--accent);
}

.mock-row em {
    font-style: normal;
    text-align: right;
    font-variant-numeric: tabular-nums;
    font-size: 12px;
}

.mock-inspector {
    background: var(--mock-inspector);
    border-left: 1px solid var(--mock-border);
    padding: 16px;
}

.mock-inspector h3 {
    font-size: 14px;
    margin-bottom: 14px;
    color: var(--mock-text);
}

.mock-inspector .kv {
    display: grid;
    grid-template-columns: 70px 1fr;
    gap: 8px 10px;
    font-size: 12px;
    color: var(--mock-text-muted);
}

.mock-inspector .kv strong {
    color: var(--mock-text);
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mock-inspector .metric-card {
    margin-top: 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--mock-border);
    border-radius: 8px;
    padding: 10px 12px;
}

.mock-inspector .metric-card .label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--mock-text-muted);
}

.mock-inspector .metric-card .value {
    font-size: 18px;
    font-weight: 700;
    color: var(--mock-text);
    font-variant-numeric: tabular-nums;
}

/* Showcase */
.showcase {
    padding: 4rem 1.5rem 5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.showcase h2 {
    text-align: center;
    margin-bottom: 2.5rem;
    font-size: 2rem;
}

.showcase-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.showcase-card {
    margin: 0;
    background: var(--card);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: 0 8px 24px var(--shadow);
}

.showcase-card img {
    width: 100%;
    height: auto;
    border-bottom: 1px solid var(--border);
    cursor: zoom-in;
}

.showcase-card figcaption {
    padding: 1rem 1.25rem;
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    cursor: zoom-out;
}

.lightbox.open { display: flex; }

.lightbox img {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.6);
    object-fit: contain;
    cursor: default;
    pointer-events: none;
}

.lightbox-close {
    position: fixed;
    top: 1rem;
    right: 1.25rem;
    background: none;
    border: none;
    color: #fff;
    font-size: 2.5rem;
    line-height: 1;
    cursor: pointer;
    opacity: 0.75;
    padding: 0;
}

.lightbox-close:hover { opacity: 1; }

/* Features */
.features {
    padding: 4.5rem 1.5rem;
    background: var(--surface);
}

.features h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2rem;
}

.feature-grid {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.feature-card {
    background: var(--card);
    padding: 2rem;
    border-radius: 14px;
    border: 1px solid var(--border);
    box-shadow: 0 2px 10px var(--shadow);
}

.feature-icon {
    font-size: 2rem;
    line-height: 1;
    margin-bottom: 1rem;
}

.feature-card h3 {
    margin-bottom: 0.75rem;
    color: var(--accent);
    font-size: 1.2rem;
}

.feature-card p {
    color: var(--text-muted);
}

/* Architecture */
.architecture {
    padding: 4.5rem 1.5rem;
    background: var(--surface-alt);
}

.architecture-inner {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.architecture h2 {
    margin-bottom: 2rem;
    font-size: 2rem;
}

.architecture-line {
    padding: 1.25rem 1.5rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--card);
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: 0.95rem;
    line-height: 1.9;
    overflow-x: auto;
    text-align: left;
    color: var(--text);
}

.architecture-line .layer {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 5px;
    background: var(--accent-glow);
    color: var(--accent);
    font-weight: 600;
}

.architecture-line .arrow {
    color: var(--text-faint);
    margin: 0 6px;
}

.architecture-note {
    margin-top: 1.5rem;
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* FAQ */
.faq {
    padding: 4.5rem 1.5rem;
    background: var(--bg);
}

.faq-inner {
    max-width: 820px;
    margin: 0 auto;
}

.faq-inner h2 {
    text-align: center;
    margin-bottom: 2.5rem;
    font-size: 2rem;
}

.faq-item {
    margin-bottom: 1.25rem;
    padding: 1.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.faq-item h3 {
    color: var(--accent);
    margin-bottom: 0.6rem;
    font-size: 1.1rem;
}

.faq-item p {
    color: var(--text-muted);
}

/* Footer */
footer {
    padding: 2.5rem 1.5rem;
    text-align: center;
    background: var(--footer-bg);
    color: var(--footer-text);
}

.footer-links {
    margin-top: 1rem;
}

.footer-links a {
    display: none;
    color: var(--footer-text);
    margin: 0 1rem;
    text-decoration: none;
}

.footer-links a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.footer-links a.active { display: inline; }
.footer-links a.de { display: none; }
.footer-links a.en { display: inline; }

/* Legal pages */
.legal-content {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

.legal-content h1 { margin-bottom: 2rem; }
.legal-content h2 { margin-top: 2rem; margin-bottom: 1rem; }

.legal-content p,
.legal-content address {
    margin-bottom: 1rem;
    line-height: 1.6;
    font-style: normal;
}

.contact-email {
    color: var(--accent);
    font-weight: 600;
}

.contact-email a {
    color: inherit;
    text-decoration: none;
}

.contact-email a:hover { text-decoration: underline; }

.lang-link {
    padding: 4px 8px;
    text-decoration: none;
    color: inherit;
    opacity: 0.7;
}

.lang-link.active {
    opacity: 1;
    font-weight: bold;
}

.menu-button {
    display: none;
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: inherit;
}

.menu-button span {
    display: block;
    width: 25px;
    height: 3px;
    background: currentColor;
    margin: 5px 0;
    transition: 0.3s;
}

/* Markdown content (privacy policy) */
.content-container {
    max-width: 820px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem;
}

.content-container h1 { margin-bottom: 0.5rem; }
.content-container h2 { margin: 2rem 0 1rem; }
.content-container h3 { margin: 1.5rem 0 0.75rem; }

.content-container ul,
.content-container ol {
    margin: 1rem 0;
    padding-left: 2rem;
}

.content-container p {
    margin: 1rem 0;
    line-height: 1.6;
}

.content-container li { margin: 0.5rem 0; }

.content-container code {
    background: var(--surface-alt);
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
    font-size: 0.9em;
}

.content-container a {
    color: var(--accent);
    text-decoration: none;
}

.content-container a:hover { text-decoration: underline; }

/* Releases / downloads */
.releases-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1rem 4rem;
}

.releases-intro {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.release-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem 1.75rem;
    margin-bottom: 2.5rem;
    box-shadow: 0 4px 14px var(--shadow);
}

.release-version {
    font-size: 1.35rem;
    margin: 0.5rem 0;
}

.release-build {
    color: var(--text-muted);
    font-weight: 400;
    font-size: 0.95rem;
}

.release-meta {
    color: var(--text-muted);
    margin-bottom: 1.25rem;
}

.release-checksum {
    margin-top: 1.25rem;
    font-size: 0.9rem;
}

.release-checksum code {
    display: block;
    word-break: break-all;
    margin-top: 0.5rem;
    font-size: 0.8rem;
}

.releases-history-heading { margin: 2rem 0 1rem; }

.releases-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.releases-table th,
.releases-table td {
    text-align: left;
    padding: 0.65rem 0.75rem;
    border-bottom: 1px solid var(--border);
}

.releases-table th {
    color: var(--text-muted);
    font-weight: 600;
}

.releases-table .sha-cell {
    font-size: 0.72rem;
    word-break: break-all;
}

.releases-empty {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.releases-footer-note { margin-top: 2.5rem; }

/* Mobile */
@media (max-width: 900px) {
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 3rem 1.5rem;
        gap: 2.5rem;
    }

    .hero-content { margin: 0 auto; }
    .hero-content h1 { font-size: 2.2rem; }
    .hero-eyebrow { text-align: center; }
    .cta-buttons { justify-content: center; }

    .hero-mock { order: -1; }

    .mock-body {
        grid-template-columns: 36px 1fr;
    }

    .mock-inspector { display: none; }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--surface);
        padding: 1rem;
        flex-direction: column;
        box-shadow: 0 2px 5px var(--shadow);
        z-index: 1;
    }

    .nav-links.active { display: flex !important; }

    .nav-links a {
        padding: 0.5rem 0;
        width: 100%;
        text-align: center;
    }

    .menu-button.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
    .menu-button.active span:nth-child(2) { opacity: 0; }
    .menu-button.active span:nth-child(3) { transform: rotate(-45deg) translate(7px, -7px); }

    .menu-button { display: block; z-index: 2; }
}

@media (max-width: 520px) {
    .mock-tree-head,
    .mock-row {
        grid-template-columns: 1fr 60px;
    }
    .mock-row em:nth-child(3),
    .mock-tree-head span:nth-child(3) { display: none; }
}
