:root {
    --bg: #f4f1e8;
    --paper: #fffdf7;
    --ink: #1f2a2a;
    --muted: #5a6865;
    --line: #d4cfbf;
    --accent: #0c7c59;
    --accent-strong: #075e44;
    --sun: #ef8e1b;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: "Space Grotesk", sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at 10% 0%, #ffe1b8 0, rgba(255,225,184,0) 35%),
        radial-gradient(circle at 90% 30%, #bce8db 0, rgba(188,232,219,0) 30%),
        var(--bg);
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.9rem 1.2rem;
    border-bottom: 1px solid var(--line);
    background: rgba(255,253,247,0.93);
    backdrop-filter: blur(6px);
}

.brand { display: flex; gap: .65rem; align-items: center; color: var(--ink); text-decoration: none; font-weight: 700; }
.brand-mark { display: inline-grid; place-items: center; width: 1.8rem; height: 1.8rem; border-radius: 0.35rem; background: var(--sun); color: #fff; }
.main-nav { display: flex; gap: .55rem; flex-wrap: wrap; }
.main-nav a { text-decoration: none; color: var(--ink); padding: .5rem .7rem; border-radius: .45rem; }
.main-nav a.is-active, .main-nav a:hover { background: #ddece7; }

.site-main { max-width: 1120px; margin: 0 auto; padding: 1.2rem; }
.hero { display: grid; grid-template-columns: 1.4fr 1fr; gap: 1rem; align-items: stretch; }
.title { margin-bottom: 1rem; }
.kicker { color: var(--accent); font-weight: 700; letter-spacing: .05em; text-transform: uppercase; font-size: .75rem; }
h1 { font-size: clamp(1.9rem, 5vw, 3.2rem); margin: .2rem 0 .6rem; }
.lead { color: var(--muted); max-width: 65ch; }

.panel, .hero-card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 0.8rem;
    padding: 1rem;
    box-shadow: 0 8px 20px rgba(33, 45, 45, 0.08);
}
.hero-card img { width: 100%; max-width: 140px; image-rendering: pixelated; }
.grid-2, .grid-3 { display: grid; gap: 1rem; margin-top: 1rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

ul { margin: .5rem 0 0 1.1rem; padding: 0; }
li { margin: .35rem 0; }
pre {
    margin: .5rem 0 0;
    overflow: auto;
    background: #1a2223;
    color: #e8fff7;
    border-radius: .65rem;
    padding: .8rem;
    font-family: "Roboto Mono", monospace;
    font-size: .85rem;
}

.actions { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: 1rem; }
.btn {
    display: inline-block;
    text-decoration: none;
    border-radius: 0.5rem;
    padding: .6rem .9rem;
    border: 1px solid var(--ink);
    color: var(--ink);
    background: #fff;
}
.btn-primary { background: var(--accent); border-color: var(--accent-strong); color: #fff; }
.btn-primary:hover { background: var(--accent-strong); }
.btn-ghost:hover, .btn:hover { background: #eef4f2; }
.btn-small { font-size: .85rem; padding: .42rem .65rem; }
.text-link { color: var(--accent-strong); font-weight: 700; }

.file-table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.file-table th, .file-table td { text-align: left; border-bottom: 1px solid var(--line); padding: .55rem .45rem; vertical-align: top; }
.file-table th { font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: .7rem; }
.compare-table { width: 100%; border-collapse: collapse; min-width: 860px; background: var(--paper); table-layout: fixed; }
.compare-table th, .compare-table td { text-align: left; border-bottom: 1px solid var(--line); padding: .65rem .55rem; vertical-align: top; }
.compare-table th { font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: #f5f0e1; }
.compare-table--matrix .col-feature { width: 56%; }
.compare-table--matrix .col-nexus { width: 18%; }
.compare-table--matrix .col-rme { width: 26%; }
.compare-table--features .col-feature { width: 34%; }
.compare-table--features .col-status { width: 16%; }
.compare-table--features .col-summary { width: 50%; }
.compare-table--matrix th:nth-child(2),
.compare-table--matrix th:nth-child(3),
.compare-table--matrix td:nth-child(2),
.compare-table--matrix td:nth-child(3) {
    text-align: center;
    white-space: nowrap;
}
.compare-table--features th:nth-child(2),
.compare-table--features td:nth-child(2) {
    text-align: center;
    white-space: nowrap;
}
.badge {
    display: inline-block;
    border: 1px solid var(--accent-strong);
    color: var(--accent-strong);
    border-radius: 999px;
    padding: .18rem .5rem;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    background: #e9f5f0;
}
.timeline {
    list-style: none;
    margin: 0;
    padding: 0;
    border-left: 2px solid var(--line);
}
.timeline li {
    position: relative;
    margin: 0 0 1rem 1rem;
    padding: .15rem 0 .2rem .8rem;
}
.timeline li::before {
    content: "";
    position: absolute;
    left: -1.36rem;
    top: .45rem;
    width: .7rem;
    height: .7rem;
    border-radius: 50%;
    background: var(--sun);
    border: 2px solid #fff;
}
.timeline h3 {
    margin: 0 0 .35rem;
    font-size: 1rem;
}
.timeline p {
    margin: 0 0 .35rem;
}
.shot-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .9rem;
}
.shot-card {
    margin: 0;
    border: 1px solid var(--line);
    border-radius: .7rem;
    background: #fff;
    overflow: hidden;
}
.shot-card img {
    display: block;
    width: 100%;
    height: 220px;
    object-fit: contain;
    background: #f3f0e7;
}
.shot-card figcaption {
    padding: .55rem .65rem;
    font-size: .85rem;
    color: var(--muted);
}

.feature-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.feature-list li {
    margin-bottom: .6rem;
    padding-left: 1rem;
    position: relative;
}
.feature-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--sun);
    font-size: 1.1rem;
    line-height: 1;
}
.feature-list .meta {
    font-size: .75rem;
    color: var(--muted);
    margin-left: .3rem;
}
.feature-list .subtext {
    margin: .3rem 0 0;
    font-size: .85rem;
    color: var(--muted);
}
.stack-form input,
.stack-form select {
    width: 100%;
    max-width: 100%;
    border: 1px solid var(--line);
    border-radius: .45rem;
    padding: .52rem .62rem;
    font: inherit;
    background: #fff;
    color: var(--ink);
}
.stack-form input:focus,
.stack-form select:focus {
    outline: 2px solid #bcdccf;
    outline-offset: 1px;
}
.stack-form p {
    margin: .55rem 0;
}

.site-footer {
    border-top: 1px solid var(--line);
    margin-top: 2rem;
    padding: 1rem 1.2rem 2rem;
    color: var(--muted);
    font-size: .9rem;
}
.site-footer p { margin: .45rem auto; max-width: 1120px; }

.reveal { animation: rise .55s ease both; }
@keyframes rise {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 860px) {
    .hero, .grid-3, .grid-2 { grid-template-columns: 1fr; }
    .shot-grid { grid-template-columns: 1fr; }
}
