/* Chat Syncopation product page. Self-contained: it inherits main.css for the
   header, stripe and footer, and owns everything below them. */

.cs-theme {
    --cs-fg: #16181c;
    --cs-muted: #585e66;
    --cs-bg: #ffffff;
    --cs-panel: #f6f7f9;
    --cs-border: #e3e5ea;
    --cs-accent: #0f4f9e;
    --cs-terminal-bg: #1e1e1e;
    --cs-terminal-fg: #f2f3f5;
    --cs-terminal-border: #343842;
    --cs-terminal-muted: #9aa2ad;
    background: var(--cs-bg);
    color: var(--cs-fg);
}

.cs-main {
    max-width: 62rem;
    margin: 0 auto;
    padding: 0 1.25rem 5rem;
}

/* ------------------------------------------------------------------ hero */

.cs-hero { padding: 3.5rem 0 2.5rem; }

.cs-eyebrow {
    margin: 0 0 0.75rem;
    font-size: 0.8125rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--cs-muted);
}

.cs-hero h1 {
    margin: 0 0 1rem;
    font-size: clamp(2rem, 5.5vw, 3.25rem);
    line-height: 1.1;
    letter-spacing: -0.025em;
}

.cs-lede {
    margin: 0 0 1.5rem;
    max-width: 44rem;
    font-size: 1.125rem;
    line-height: 1.6;
    color: var(--cs-muted);
}

.cs-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.cs-badge {
    padding: 0.3125rem 0.75rem;
    font-size: 0.8125rem;
    color: var(--cs-fg);
    background: var(--cs-panel);
    border: 1px solid var(--cs-border);
    border-radius: 999px;
}

/* -------------------------------------------------------------- installs */

.cs-installs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 24rem), 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.cs-install__label {
    margin: 0 0 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--cs-fg);
}

.cs-install__box {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.8125rem 0.9375rem;
    margin-bottom: 0.5rem;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.875rem;
    /* The box paints its own surface and its own text. A terminal strip that
       inherits the page background renders as unreadable as any other
       light-on-light mistake. */
    color: var(--cs-terminal-fg);
    background: var(--cs-terminal-bg);
    border: 1px solid var(--cs-terminal-border);
    border-radius: 6px;
    position: relative;
    overflow: hidden;
}

.cs-install__box.is-copied { border-color: #4f9e5f; }

.cs-install__prefix {
    flex: 0 0 auto;
    color: var(--cs-terminal-muted);
    user-select: none;
}

.cs-install__text {
    flex: 1 1 auto;
    min-width: 0;
    /* Long package names must wrap rather than overflow the strip. */
    overflow-wrap: anywhere;
    color: inherit;
    background: none;
    padding: 0;
    font: inherit;
}

.cs-copy {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    cursor: pointer;
    color: var(--cs-terminal-muted);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 4px;
}

.cs-copy:hover { color: var(--cs-terminal-fg); border-color: var(--cs-terminal-border); }
.cs-install__box.is-copied .cs-copy { color: #6fc77f; }

.cs-install__soon {
    flex: 0 0 auto;
    padding: 0.125rem 0.4375rem;
    font-family: system-ui, sans-serif;
    font-size: 0.6875rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #ffd68a;
    border: 1px solid #7a5c21;
    border-radius: 4px;
}

.cs-install__note {
    margin: 0.5rem 0 0;
    font-size: 0.8125rem;
    line-height: 1.5;
    color: var(--cs-muted);
}

/* ------------------------------------------------------------------- cta */

.cs-cta-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.cs-cta {
    display: inline-block;
    padding: 0.625rem 1.125rem;
    font-size: 0.9375rem;
    font-weight: 500;
    text-decoration: none;
    color: var(--cs-fg);
    background: var(--cs-bg);
    border: 1px solid var(--cs-border);
    border-radius: 6px;
}

.cs-cta:hover { border-color: var(--cs-accent); color: var(--cs-accent); }

.cs-cta--primary {
    color: #ffffff;
    background: var(--cs-accent);
    border-color: var(--cs-accent);
}
.cs-cta--primary:hover { color: #ffffff; background: #0c3f7e; border-color: #0c3f7e; }

:where(.cs-main) :focus-visible { outline: 2px solid var(--cs-accent); outline-offset: 2px; }

/* -------------------------------------------------------------- sections */

.cs-section { padding: 2.5rem 0; border-top: 1px solid var(--cs-border); }
.cs-section h2 { margin: 0 0 0.75rem; font-size: 1.5rem; letter-spacing: -0.015em; }
.cs-section > p { margin: 0 0 1rem; max-width: 44rem; line-height: 1.65; color: var(--cs-muted); }
.cs-section > p strong { color: var(--cs-fg); }
.cs-section a { color: var(--cs-accent); }
.cs-section--quiet { color: var(--cs-muted); }

.cs-code {
    margin: 0;
    padding: 1rem 1.125rem;
    overflow-x: auto;
    font-size: 0.8125rem;
    line-height: 1.6;
    color: var(--cs-terminal-fg);
    background: var(--cs-terminal-bg);
    border-radius: 8px;
}
.cs-code code { color: inherit; background: none; padding: 0; font-family: 'Courier New', Courier, monospace; }

.cs-table-wrap { overflow-x: auto; }

.cs-table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.cs-table th,
.cs-table td { padding: 0.625rem 0.75rem; text-align: left; border-bottom: 1px solid var(--cs-border); }
.cs-table th { font-size: 0.8125rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--cs-muted); }
.cs-table td:first-child { white-space: nowrap; }
.cs-table code {
    font-size: 0.8125rem;
    padding: 0.125rem 0.375rem;
    color: var(--cs-fg);
    background: var(--cs-panel);
    border-radius: 4px;
}

.cs-grid {
    display: grid;
    /* 26rem rather than 18rem: at desktop width the smaller minimum fits three
       across and strands the fourth card alone on its own row. */
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 26rem), 1fr));
    gap: 1rem;
}

.cs-card {
    padding: 1.125rem 1.25rem;
    background: var(--cs-panel);
    border: 1px solid var(--cs-border);
    border-radius: 10px;
}
.cs-card h3 { margin: 0 0 0.5rem; font-size: 1rem; }
.cs-card p { margin: 0; font-size: 0.9375rem; line-height: 1.6; color: var(--cs-muted); }
.cs-card code { font-size: 0.875em; }

@media (max-width: 640px) {
    .cs-hero { padding: 2.5rem 0 2rem; }
    .cs-install__box { font-size: 0.8125rem; }
}
