:root {
    color-scheme: dark;
    --background: #111315;
    --surface: #181b1f;
    --surface-strong: #20242a;
    --surface-soft: #242a2f;
    --text: #f5f2ea;
    --muted: #c9c1b4;
    --accent: #57d6a7;
    --accent-strong: #9bf0cf;
    --warning: #f7b955;
    --danger: #ff766d;
    --border: rgba(245, 242, 234, 0.14);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: var(--background);
}

body::before {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    content: "";
    background:
        linear-gradient(120deg, rgba(87, 214, 167, 0.12), transparent 36%),
        linear-gradient(240deg, rgba(247, 185, 85, 0.10), transparent 32%);
}

a {
    color: var(--accent-strong);
}

button,
a {
    font: inherit;
}

.site-header,
.site-footer {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 24px 0;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-size: 1.16rem;
    font-weight: 800;
    text-decoration: none;
}

.logo-mark {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: #0d1512;
    background: var(--accent);
}

.nav-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 14px;
}

.nav-links a {
    color: var(--muted);
    font-weight: 700;
    text-decoration: none;
}

.nav-links a:hover,
.nav-links a:focus {
    color: var(--text);
}

main {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
}

.hero,
.policy-page {
    padding: 68px 0 56px;
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--accent);
    font-size: 0.84rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

h1,
h2,
h3 {
    line-height: 1.18;
}

h1 {
    max-width: 840px;
    margin: 0;
    font-size: clamp(2.4rem, 7vw, 5.2rem);
}

h2 {
    margin: 0 0 16px;
    font-size: clamp(1.7rem, 4vw, 2.55rem);
}

h3 {
    margin-top: 0;
}

.lede {
    max-width: 760px;
    margin: 24px 0 0;
    color: var(--muted);
    font-size: clamp(1.05rem, 2vw, 1.26rem);
}

.cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 34px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 20px;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-weight: 800;
    text-decoration: none;
    background: var(--surface-soft);
}

.button.primary {
    border-color: transparent;
    color: #0d1512;
    background: var(--accent-strong);
}

.stats-grid,
.card-grid,
.timeline {
    display: grid;
    gap: 14px;
}

.stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: -18px 0 72px;
}

.stats-grid div,
.card,
.timeline article,
.steps article,
.discord-panel,
.review-panel,
.policy-card {
    border: 1px solid var(--border);
    border-radius: 8px;
    background: rgba(24, 27, 31, 0.88);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
}

.stats-grid div {
    padding: 20px;
}

.stats-grid strong,
.stats-grid span {
    display: block;
}

.stats-grid strong {
    margin-bottom: 8px;
    color: var(--text);
}

.stats-grid span,
.section-heading p,
.card p,
.policy-card p,
.policy-card li,
.steps p,
.timeline p {
    color: var(--muted);
}

.section-block,
.demo-section {
    padding: 18px 0 24px;
}

.section-heading {
    max-width: 820px;
    margin-bottom: 24px;
}

.demo-controls {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin: 0 0 16px;
    color: var(--muted);
    font-weight: 700;
}

.demo-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
    gap: 16px;
    align-items: stretch;
}

.discord-panel {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    height: 540px;
    min-height: 540px;
    overflow: hidden;
    background: #08090c;
}

.panel-topbar,
.review-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 48px;
    padding: 0 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-weight: 800;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 10px;
    border: 1px solid rgba(87, 214, 167, 0.4);
    border-radius: 999px;
    color: var(--accent-strong);
    font-size: 0.78rem;
}

.chat-log {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 4px;
    min-height: 0;
    padding: 14px 10px 18px;
    overflow: auto;
    overscroll-behavior: contain;
}

.chat-message {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 12px;
    flex: 0 0 auto;
    padding: 8px 10px;
    border-radius: 4px;
    opacity: 0;
    transform: translateY(8px);
    animation: message-in 0.34s ease forwards;
    animation-delay: 0s;
}

.chat-message:hover {
    background: rgba(255, 255, 255, 0.04);
}

.message-body {
    min-width: 0;
}

.message-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    min-height: 20px;
}

.message-meta strong {
    color: #f0f1f5;
    font-size: 0.96rem;
}

.message-meta span {
    color: #878b95;
    font-size: 0.78rem;
}

.message-meta em {
    display: inline-flex;
    align-items: center;
    min-height: 16px;
    padding: 0 4px;
    border-radius: 4px;
    color: #ffffff;
    font-size: 0.7rem;
    font-style: normal;
    font-weight: 900;
    background: #5865f2;
}

.chat-message p {
    margin: 2px 0 0;
    color: #dbdee1;
}

.chat-message small {
    display: block;
    margin-top: 5px;
    color: #a5acb8;
    font-weight: 700;
}

.attachment-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 3px;
    width: min(100%, 420px);
    margin-top: 8px;
    overflow: hidden;
    border-radius: 8px;
    background: #111318;
}

.attachment-tile {
    display: block;
    min-width: 0;
    height: 142px;
    padding: 0;
    overflow: hidden;
    border: 0;
    cursor: pointer;
    background: #1e1f22;
}

.attachment-tile img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.chat-message.is-deleting {
    opacity: 0.22;
    transform: translateX(18px);
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.avatar {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 50%;
    color: #111315;
    font-weight: 900;
    background: linear-gradient(135deg, #57d6a7, #4e75ff);
}

.avatar.teal {
    background: linear-gradient(135deg, #57d6a7, #2f9ec8);
}

.avatar.violet {
    color: #f5f2ea;
    background: linear-gradient(135deg, #7659ff, #20263d);
}

.avatar.mod-avatar {
    color: #101315;
    background: linear-gradient(135deg, #9bf0cf, #f7b955);
}

.avatar.amber {
    background: linear-gradient(135deg, #f7b955, #ff766d);
}

.user-avatar,
.bot-avatar,
.timed-out-avatar {
    color: transparent;
    border: 2px solid #35d4ff;
    background:
        radial-gradient(circle at 70% 70%, rgba(112, 223, 255, 0.78), transparent 18%),
        linear-gradient(135deg, #4232b8, #19294b 54%, #71c5ff);
}

.user-avatar {
    border-color: #5865f2;
}

.timed-out-avatar {
    opacity: 0.62;
    filter: grayscale(0.25);
}

.chat-composer {
    display: grid;
    gap: 6px;
    padding: 0 14px 14px;
    background: #08090c;
}

.chat-composer span {
    min-height: 18px;
    color: #a5acb8;
    font-size: 0.78rem;
}

.message-input {
    min-height: 44px;
    padding: 11px 14px;
    border-radius: 8px;
    color: #8b909a;
    background: #2b2d31;
}

.spoiler-card {
    display: grid;
    width: min(100%, 370px);
    min-height: 80px;
    margin-top: 4px;
    padding: 12px 16px;
    border: 1px solid transparent;
    border-radius: 6px;
    color: #eef0f3;
    text-align: left;
    cursor: pointer;
    background: linear-gradient(135deg, #5f626b, #373941);
}

.spoiler-card:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.spoiler-cover {
    place-self: center;
    padding: 5px 13px;
    border-radius: 999px;
    font-weight: 900;
    background: rgba(0, 0, 0, 0.58);
}

.spoiler-reveal {
    display: none;
    line-height: 1.45;
}

.spoiler-reveal small {
    margin-top: 8px;
    color: #d7dae0;
    font-weight: 500;
}

.spoiler-card[aria-expanded="true"] {
    border-color: #333842;
    background: #111318;
}

.spoiler-card[aria-expanded="true"] .spoiler-cover {
    display: none;
}

.spoiler-card[aria-expanded="true"] .spoiler-reveal {
    display: block;
}

.review-panel {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    height: 540px;
    min-height: 540px;
    overflow: hidden;
    padding-bottom: 16px;
}

.action-log {
    display: grid;
    align-content: start;
    gap: 14px;
    margin: 0;
    padding: 16px;
    list-style: none;
    overflow: auto;
    overscroll-behavior: contain;
}

.action-log li {
    display: grid;
    gap: 4px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    background: rgba(8, 9, 12, 0.42);
    opacity: 0;
    transform: translateY(8px);
    animation: message-in 0.34s ease forwards;
}

.action-log span {
    color: var(--accent);
    font-weight: 900;
}

.action-log p {
    margin: 0;
    color: var(--muted);
}

.timeline {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 16px 0 48px;
}

.timeline article {
    padding: 18px;
}

.timeline span,
.steps span {
    color: var(--accent);
    font-weight: 900;
}

.timeline strong {
    display: block;
    margin-top: 8px;
}

.timeline p {
    margin-bottom: 0;
}

@keyframes message-in {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 12px 0 56px;
}

.card {
    padding: 24px;
}

.split-section {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    gap: 28px;
    padding: 36px 0 72px;
}

.steps {
    display: grid;
    gap: 14px;
}

.steps article {
    padding: 22px;
}

.policy-card {
    padding: clamp(24px, 5vw, 48px);
}

.policy-card section + section {
    margin-top: 34px;
    padding-top: 28px;
    border-top: 1px solid var(--border);
}

.policy-card ul {
    padding-left: 1.2rem;
}

.site-footer {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 32px 0 42px;
    color: var(--muted);
    font-size: 0.95rem;
}

.site-footer a {
    color: var(--muted);
}

@media (max-width: 860px) {
    .site-header,
    .site-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .nav-links {
        justify-content: flex-start;
    }

    .card-grid,
    .stats-grid,
    .split-section,
    .demo-shell,
    .timeline {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        margin-top: 0;
    }

    .hero,
    .policy-page {
        padding-top: 40px;
    }

    .discord-panel {
        height: 480px;
        min-height: 480px;
    }

    .review-panel {
        height: 360px;
        min-height: 360px;
    }
}

@media (max-width: 520px) {
    .chat-message {
        grid-template-columns: 1fr;
    }

    .attachment-tile {
        height: 118px;
    }
}

.compact-hero {
    padding-bottom: 36px;
}

.feature-showcase,
.command-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.feature-showcase {
    margin: -18px 0 72px;
}

.feature-showcase article,
.setup-step {
    border: 1px solid var(--border);
    border-radius: 8px;
    background: rgba(24, 27, 31, 0.88);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
}

.feature-showcase article {
    padding: 24px;
}

.feature-kicker {
    display: inline-flex;
    margin-bottom: 12px;
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.feature-showcase p,
.feature-card p,
.setup-step p,
.setup-step li {
    color: var(--muted);
}

.setup-flow {
    display: grid;
    gap: 16px;
    padding: 8px 0 72px;
}

.setup-step {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 24px;
    padding: 26px;
}

.setup-step > span {
    display: grid;
    width: 52px;
    height: 52px;
    place-items: center;
    border: 1px solid rgba(87, 214, 167, 0.4);
    border-radius: 50%;
    color: var(--accent-strong);
    font-weight: 900;
    background: rgba(87, 214, 167, 0.08);
}

.setup-step h2,
.feature-card h2 {
    font-size: clamp(1.3rem, 3vw, 1.85rem);
}

pre {
    overflow: auto;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--accent-strong);
    background: #08090c;
}

code {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.check-list {
    margin: 16px 0 0;
    padding-left: 1.2rem;
}

.command-grid {
    padding: 8px 0 72px;
}

.command-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.command-strip code {
    display: inline-flex;
    min-height: 32px;
    align-items: center;
    padding: 0 10px;
    border: 1px solid rgba(87, 214, 167, 0.24);
    border-radius: 999px;
    color: var(--accent-strong);
    font-size: 0.82rem;
    font-weight: 800;
    background: rgba(87, 214, 167, 0.08);
}

@media (max-width: 860px) {
    .feature-showcase,
    .command-grid {
        grid-template-columns: 1fr;
    }

    .feature-showcase {
        margin-top: 0;
    }

    .setup-step {
        grid-template-columns: 1fr;
    }
}
