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

body {
    font-family: -apple-system, 'Segoe UI', Arial, sans-serif;
    background: #fff;
    color: #222;
    line-height: 1.7;
    font-size: 15px;
}

a {
    color: #2563eb;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* nav */

nav {
    background: #f8f9fa;
    border-bottom: 1px solid #e5e7eb;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 52px;
    position: sticky;
    top: 0;
    z-index: 100;
}

nav .logo {
    font-size: 15px;
    font-weight: 700;
    color: #111;
    letter-spacing: 0.3px;
}

nav .logo span { color: #2563eb; }

nav ul {
    list-style: none;
    display: flex;
    gap: 16px;
}

nav ul li a {
    color: #555;
    font-size: 13px;
    font-weight: 500;
}

nav ul li a:hover,
nav ul li a.active {
    color: #111;
    text-decoration: none;
}

/* hero */

.hero {
    padding: 80px 24px 48px;
    text-align: center;
    max-width: 680px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 36px;
    font-weight: 800;
    color: #111;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.hero h1 span { color: #2563eb; }

.hero p {
    font-size: 16px;
    color: #666;
    margin-bottom: 28px;
    line-height: 1.6;
}

.hero .badge {
    display: inline-block;
    font-size: 12px;
    color: #888;
    border: 1px solid #e5e7eb;
    padding: 4px 10px;
    margin-bottom: 24px;
}

.btns {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 10px 22px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 4px;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: #2563eb;
    color: #fff;
}

.btn-primary:hover {
    background: #1d4ed8;
    text-decoration: none;
}

.btn-secondary {
    background: #f3f4f6;
    color: #333;
    border: 1px solid #d1d5db;
}

.btn-secondary:hover {
    background: #e5e7eb;
    text-decoration: none;
}

/* sections */

section {
    max-width: 800px;
    margin: 0 auto;
    padding: 48px 24px;
}

section h2 {
    font-size: 22px;
    font-weight: 700;
    color: #111;
    margin-bottom: 8px;
    text-align: center;
}

section .sub {
    text-align: center;
    color: #888;
    font-size: 14px;
    margin-bottom: 32px;
}

/* grid */

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.grid .item {
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    padding: 20px;
}

.grid .item h3 {
    font-size: 15px;
    font-weight: 600;
    color: #111;
    margin-bottom: 6px;
}

.grid .item p {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
}

/* feature rows */

.frow {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    margin-bottom: 40px;
}

.frow.r { flex-direction: row-reverse; }

.frow .txt { flex: 1; min-width: 260px; }

.frow .txt h3 {
    font-size: 17px;
    font-weight: 600;
    color: #111;
    margin-bottom: 6px;
}

.frow .txt p {
    font-size: 14px;
    color: #555;
    margin-bottom: 8px;
}

.frow .txt ul {
    margin: 4px 0 0 16px;
    font-size: 13px;
    color: #666;
}

.frow .txt ul li { margin-bottom: 3px; }

.frow .ico {
    flex: 0 0 100px;
    font-size: 32px;
    color: #2563eb;
    text-align: center;
    padding-top: 4px;
}

.frow .ico svg {
    width: 40px;
    height: 40px;
    fill: none;
    stroke: #2563eb;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* page header */

.ph {
    padding: 48px 24px 24px;
    text-align: center;
}

.ph h1 {
    font-size: 28px;
    font-weight: 700;
    color: #111;
    margin-bottom: 6px;
}

.ph p {
    color: #888;
    font-size: 14px;
    max-width: 520px;
    margin: 0 auto;
}

/* content */

.content {
    max-width: 680px;
    margin: 0 auto;
    padding: 0 24px 48px;
}

.content h2 {
    font-size: 20px;
    font-weight: 700;
    color: #111;
    margin: 32px 0 10px;
    text-align: left;
}

.content h3 {
    font-size: 16px;
    font-weight: 600;
    color: #222;
    margin: 24px 0 6px;
}

.content p {
    margin-bottom: 12px;
    color: #555;
    font-size: 14px;
}

.content ul {
    margin: 0 0 12px 18px;
    color: #555;
    font-size: 14px;
}

.content ul li { margin-bottom: 4px; }

.content code {
    font-family: 'SFMono-Regular', Consolas, monospace;
    font-size: 13px;
    background: #f3f4f6;
    padding: 2px 6px;
    border-radius: 3px;
    color: #333;
}

/* download table */

.dl-wrap {
    overflow-x: auto;
    margin: 20px 0;
}

.dl {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.dl th {
    text-align: left;
    padding: 10px 12px;
    background: #f8f9fa;
    color: #555;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #e5e7eb;
}

.dl td {
    padding: 12px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
    color: #444;
}

.dl tr:hover td { background: #fafafa; }

.dl .fn {
    font-family: 'SFMono-Regular', Consolas, monospace;
    font-size: 13px;
    color: #111;
}

/* footer */

footer {
    border-top: 1px solid #e5e7eb;
    background: #f8f9fa;
    padding: 40px 24px 24px;
    margin-top: 48px;
}

footer .fw {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 24px;
}

footer .fc h4 {
    font-size: 12px;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 10px;
}

footer .fc a {
    display: block;
    font-size: 13px;
    color: #555;
    margin-bottom: 4px;
}

footer .fc a:hover { color: #111; }

footer .fb {
    max-width: 800px;
    margin: 24px auto 0;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
    font-size: 12px;
    color: #999;
    text-align: center;
}

/* code block */

pre {
    background: #f8f9fa;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    padding: 16px;
    font-family: 'SFMono-Regular', Consolas, monospace;
    font-size: 13px;
    color: #333;
    overflow-x: auto;
    margin: 12px 0;
    line-height: 1.5;
}

/* external link indicator */
a.external::after {
    content: " \2197";
    font-size: 11px;
    display: inline-block;
    vertical-align: super;
    line-height: 1;
}

a.internal::after { content: none; }

/* beta */
.beta-notice {
    background: #fff3cd;
    border: 1px solid #ffeeba;
    padding: 16px 20px;
    border-radius: 4px;
    font-size: 14px;
    color: #856404;
    margin-bottom: 24px;
}

.beta-badge {
    display: inline-block;
    background: #f59e0b;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    vertical-align: middle;
    margin-left: 6px;
}

/* nav app icon */
.nav-icon {
    width: 20px;
    height: 20px;
    vertical-align: middle;
    margin-right: 4px;
}

/* download table SHA */
.dl code {
    font-family: 'SFMono-Regular', Consolas, monospace;
    font-size: 11px;
    word-break: break-all;
    color: #555;
}

.dl .btn {
    white-space: nowrap;
}

/* mobile improvements */
@media (max-width: 640px) {
    nav {
        padding: 0 12px;
        height: 48px;
    }
    nav ul { gap: 6px; }
    nav ul li a { font-size: 11px; }
    nav .logo { font-size: 13px; }
    .nav-icon { width: 16px; height: 16px; }
    .hero h1 { font-size: 22px; }
    .hero { padding: 36px 16px 24px; }
    .hero p { font-size: 14px; }
    .btns { flex-direction: column; align-items: center; }
    .btn { width: 100%; max-width: 280px; text-align: center; }
    section { padding: 32px 16px; }
    section h2 { font-size: 18px; }
    .ph { padding: 32px 16px 16px; }
    .ph h1 { font-size: 22px; }
    .grid { grid-template-columns: 1fr; }
    .frow { flex-direction: column !important; gap: 12px; }
    .frow .ico { text-align: left; font-size: 24px; flex: none; }
    .frow .ico svg { width: 32px; height: 32px; }
    .frow .txt { min-width: 0; }
    .content { padding: 0 16px 32px; }
    .dl-wrap { margin: 12px -16px; }
    .dl-wrap .dl { font-size: 11px; min-width: 500px; }
    .dl td, .dl th { padding: 6px; }
    .dl .fn { font-size: 10px; word-break: break-all; }
    .dl code { font-size: 9px; }
    .dl .btn { font-size: 11px; padding: 6px 10px; min-width: 0; width: auto; }
    footer { padding: 24px 16px 16px; }
    footer .fw { flex-direction: column; gap: 16px; }
    pre { font-size: 12px; padding: 12px; }
    .beta-notice { font-size: 13px; padding: 12px 16px; }
}
