:root {
    --bg: #f7faf8;
    --surface: #ffffff;
    --surface-soft: #eef7f4;
    --text: #172026;
    --muted: #5f6f72;
    --border: #d8e4df;
    --accent: #0f766e;
    --accent-strong: #0b5f59;
    --accent-soft: #dff5ef;
    --accent-two: #f97316;
    --accent-two-soft: #fff0e4;
    --accent-three: #2563eb;
    --shadow: 0 18px 50px rgba(15, 32, 38, 0.12);
    --radius: 8px;
    --container: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.6;
}

body.theme-consent {
    --bg: #f8fafc;
    --surface-soft: #eef6ff;
    --border: #d9e2ef;
    --accent: #2563eb;
    --accent-strong: #1d4ed8;
    --accent-soft: #e8f0ff;
    --accent-two: #16a34a;
    --accent-two-soft: #eaf8ef;
    --accent-three: #d97706;
}

a {
    color: inherit;
}

.container {
    width: min(100% - 32px, var(--container));
    margin: 0 auto;
}

.header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(14px);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 74px;
    gap: 22px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--accent-strong);
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.logo-icon {
    width: 28px;
    height: 28px;
}

.nav {
    display: flex;
    align-items: center;
    gap: 18px;
}

.nav a {
    color: var(--muted);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

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

.nav-github svg {
    display: block;
}

.lang-switcher,
.mobile-menu-toggle {
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
}

.lang-switcher {
    min-width: 48px;
    height: 36px;
    border-radius: 999px;
    font-weight: 700;
}

.mobile-menu-toggle {
    display: none;
    width: 42px;
    height: 38px;
    border-radius: var(--radius);
    padding: 8px;
}

.mobile-menu-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    margin: 5px 0;
    background: var(--text);
    transition: transform 160ms ease, opacity 160ms ease;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.hero {
    padding: 58px 0 48px;
    background:
        radial-gradient(circle at 12% 12%, var(--accent-soft), transparent 32%),
        linear-gradient(135deg, #ffffff 0%, var(--surface-soft) 58%, #fff7ed 100%);
    border-bottom: 1px solid var(--border);
}

.hero-grid {
    display: block;
    max-width: 840px;
    margin: 0 auto;
    text-align: center;
}

.badges,
.platform-list {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
}

.badge {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.badge-primary {
    background: var(--accent-soft);
    color: var(--accent-strong);
    border-color: color-mix(in srgb, var(--accent) 30%, var(--border));
}

.badge-warm {
    background: var(--accent-two-soft);
    color: #9a3412;
}

h1,
h2,
h3 {
    margin: 0;
    line-height: 1.16;
}

h1 {
    max-width: 820px;
    margin-right: auto;
    margin-left: auto;
    font-size: clamp(2.25rem, 5vw, 4.15rem);
    letter-spacing: 0;
}

h2 {
    font-size: clamp(1.85rem, 4vw, 2.8rem);
    margin-bottom: 16px;
}

h3 {
    font-size: 1.12rem;
    margin-bottom: 9px;
}

p {
    margin: 0;
}

.hero-description {
    max-width: 680px;
    margin-right: auto;
    margin-left: auto;
    margin-top: 18px;
    color: var(--muted);
    font-size: 1.08rem;
}

.hero-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 11px 18px;
    border-radius: var(--radius);
    font-weight: 700;
    text-decoration: none;
}

.btn-primary {
    background: var(--accent);
    color: #ffffff;
    box-shadow: 0 12px 24px rgba(15, 118, 110, 0.22);
}

.btn-secondary {
    background: var(--surface);
    color: var(--accent-strong);
    border: 1px solid var(--border);
}

.section {
    padding: 68px 0;
}

.section-alt {
    background: var(--surface);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.section-intro {
    max-width: 760px;
    color: var(--muted);
    margin-bottom: 28px;
}

.quick-nav {
    padding: 18px 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.quick-nav-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.quick-nav-list a {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.quick-nav-list a:hover {
    color: var(--accent);
    border-color: var(--accent);
}

.grid {
    display: grid;
    gap: 18px;
}

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

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

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

.card {
    min-width: 0;
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
}

.card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-bottom: 16px;
    border-radius: var(--radius);
    background: var(--accent-soft);
    color: var(--accent);
}

.card-icon svg,
.mini-icon {
    width: 22px;
    height: 22px;
}

.card p,
.step p,
.timeline p {
    color: var(--muted);
}

.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
}

table {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
}

th,
td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
}

th {
    background: var(--surface-soft);
    color: var(--text);
    font-size: 0.9rem;
}

tr:last-child td {
    border-bottom: 0;
}

code {
    padding: 2px 5px;
    border-radius: 5px;
    background: #eef2f4;
    color: #0f172a;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: 0.9em;
}

.code-block {
    margin: 16px 0 0;
    padding: 18px;
    overflow-x: auto;
    border-radius: var(--radius);
    background: #101820;
    color: #f8fafc;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: 0.92rem;
    line-height: 1.55;
}

.code-block code {
    padding: 0;
    background: transparent;
    color: inherit;
}

.steps {
    display: grid;
    gap: 14px;
}

.step {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 15px;
    align-items: start;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    background: var(--accent);
    color: #ffffff;
    font-weight: 800;
}

.flow {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.flow-item {
    padding: 10px 13px;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--border);
    font-weight: 800;
}

.flow-arrow {
    color: var(--accent);
    font-weight: 900;
}

.callout {
    margin-top: 20px;
    padding: 18px;
    border-left: 4px solid var(--accent-two);
    border-radius: var(--radius);
    background: var(--accent-two-soft);
}

.callout p {
    color: #6b3a11;
}

.architecture {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.architecture span {
    padding: 13px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    font-weight: 700;
    text-align: center;
}

.footer {
    padding: 44px 0 24px;
    background: #111827;
    color: #e5e7eb;
}

.footer-content {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) 2fr;
    gap: 38px;
}

.footer .logo {
    color: #ffffff;
}

.footer-brand p {
    max-width: 380px;
    margin-top: 12px;
    color: #aeb7c2;
}

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

.footer-column {
    display: grid;
    align-content: start;
    gap: 9px;
}

.footer-column h4 {
    margin: 0 0 5px;
    color: #ffffff;
}

.footer-column a {
    color: #cbd5e1;
    text-decoration: none;
}

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

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
    margin-top: 34px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    color: #aeb7c2;
}

@media (max-width: 980px) {
    .grid-2,
    .grid-3,
    .grid-4,
    .footer-content,
    .footer-links,
    .architecture {
        grid-template-columns: 1fr;
    }

    .hero {
        padding-top: 48px;
    }
}

@media (max-width: 760px) {
    .header-content {
        min-height: 66px;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .nav {
        position: absolute;
        top: 66px;
        left: 0;
        right: 0;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 10px 16px 16px;
        background: var(--surface);
        border-bottom: 1px solid var(--border);
        box-shadow: 0 16px 28px rgba(15, 32, 38, 0.12);
    }

    .nav.active {
        display: flex;
    }

    .nav a,
    .nav button {
        margin: 2px 0;
    }

    .nav a {
        padding: 11px 0;
    }

    .lang-switcher {
        align-self: flex-start;
    }

    .section {
        padding: 48px 0;
    }

    .hero-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }
}
