:root {
    --bg: #f4efe7;
    --panel: #fffaf4;
    --ink: #1f1c17;
    --muted: #6c6258;
    --line: #ddcdb8;
    --accent: #bf5a2a;
    --accent-dark: #8d3813;
    --success: #1f7a54;
    --danger: #8a2a2a;
    --shadow: 0 20px 40px rgba(57, 41, 25, 0.08);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Avenir Next", "Segoe UI", sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(191, 90, 42, 0.18), transparent 28%),
        linear-gradient(180deg, #f8f2ea 0%, var(--bg) 100%);
}

a {
    color: inherit;
    text-decoration: none;
}

code {
    font-family: "SFMono-Regular", "SF Mono", monospace;
    font-size: 0.95em;
}

.container {
    width: min(1120px, calc(100% - 2rem));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    backdrop-filter: blur(10px);
    background: rgba(248, 242, 234, 0.85);
    border-bottom: 1px solid rgba(221, 205, 184, 0.8);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 72px;
}

.brand {
    font-weight: 800;
    letter-spacing: 0.06em;
}

.site-nav {
    display: flex;
    gap: 1rem;
    color: var(--muted);
}

.hero {
    padding: 5rem 0 3rem;
}

.hero-grid,
.feature-grid,
.upstream-grid {
    display: grid;
    gap: 1.5rem;
}

.hero-grid {
    grid-template-columns: 1.4fr 1fr;
    align-items: center;
}

.feature-grid,
.upstream-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    padding-bottom: 3rem;
}

.eyebrow {
    display: inline-block;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--accent-dark);
    font-size: 0.8rem;
    font-weight: 700;
}

h1,
h2 {
    margin: 0 0 0.75rem;
    line-height: 1.1;
}

h1 {
    font-size: clamp(2.8rem, 5vw, 4.5rem);
}

.lede,
.muted {
    color: var(--muted);
}

.lede {
    font-size: 1.1rem;
    max-width: 58ch;
}

.actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    border: 0;
    border-radius: 999px;
    padding: 0.85rem 1.4rem;
    background: var(--accent);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

.button-secondary {
    background: transparent;
    border: 1px solid var(--line);
    color: var(--ink);
}

.panel,
.status-card,
.feature-card,
.auth-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.panel,
.feature-card,
.status-card {
    padding: 1.5rem;
}

.status-card {
    transform: rotate(-2deg);
}

.feature-card {
    min-height: 180px;
}

.auth-shell {
    min-height: calc(100vh - 72px);
    display: grid;
    place-items: center;
    padding: 2rem;
}

.auth-card {
    width: min(420px, 100%);
    padding: 2rem;
}

.stack-form {
    display: grid;
    gap: 1rem;
}

.stack-form label {
    display: grid;
    gap: 0.4rem;
    font-weight: 600;
}

.stack-form input {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 0.8rem 0.95rem;
    background: #fff;
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.checkbox-row input {
    width: auto;
}

.alert {
    padding: 0.85rem 1rem;
    border-radius: 16px;
    background: rgba(138, 42, 42, 0.12);
    color: var(--danger);
}

.admin-shell {
    padding: 2rem 0 3rem;
}

.admin-header,
.panel-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 0.75rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 700;
}

.is-healthy {
    color: var(--success);
    background: rgba(31, 122, 84, 0.12);
}

.is-down {
    color: var(--danger);
    background: rgba(138, 42, 42, 0.12);
}

.runtime-meta {
    padding: 0.75rem 0 0;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.95rem;
}

@media (max-width: 900px) {
    .hero-grid {
        grid-template-columns: 1fr;
    }

    .status-card {
        transform: none;
    }

    .header-inner,
    .admin-header,
    .panel-heading {
        flex-direction: column;
        align-items: flex-start;
    }
}
