/* ============================================================
   "ALREADY USE CLAUDE OR CHATGPT?" (#setup, home page, 24 Oct 2026):
   two main choices, then their options, then the play (Dom).
     .ct-main     a small two-part switch, Workflows and Integrations.
                  The open one is black.
     .ct-sub      the options of the open choice, in the hero's tab look
                  (css/hero-pmx.css .hu-tab: icon, title, a line, and a bar
                  that fills while that option plays). Workflows: set up,
                  change, improve from real runs. Integrations: MCP server,
                  any API, webhooks in and out, your own app.
     .ct-works    the top box over the two step boxes (since 25 Oct 2026,
                  Dom; was a note under the title): tool logos, "+ any tool"
                  and "Connect any system by asking your AI.", the dashed box
                  as before, as wide as both boxes.
   js/custom-tools.js plays the options in turn; js/setup-groups.js shows
   the choice that is playing and fills its option's bar. Below 1180px the
   options are a sliding row, as in the hero.
   ============================================================ */

/* ---------- the two main choices: a small two-part switch ---------- */
.ct-main {
    display: grid; grid-template-columns: 1fr 1fr; gap: 4px; width: fit-content; max-width: 100%;
    margin: 40px auto 0; padding: 4px; border-radius: 999px;
    background: #fff; border: 1px solid var(--line, #EAE3E1);
    box-shadow: 0 1px 2px rgba(20, 17, 26, .04), 0 10px 24px -16px rgba(20, 17, 26, .22);
}
.ct-main-b {
    display: flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 22px 9px 18px;
    border: 0; border-radius: 999px; background: transparent; cursor: pointer;
    font: inherit; color: var(--body, #4E4854);
    transition: background-color .2s ease, color .2s ease, box-shadow .2s ease;
}
.ct-main-ico { flex: none; display: grid; place-items: center; color: inherit; }
.ct-main-ico svg { width: 18px; height: 18px; }
.ct-main-t b { font-size: .9375rem; font-weight: 700; letter-spacing: -.01em; color: inherit; white-space: nowrap; }
.ct-main-b:hover { background: var(--soft, #F4EFED); color: var(--ink, #16121A); }
.ct-main-b.is-on, .ct-main-b.is-on:hover {
    background: var(--ink, #16121A); color: #fff;   /* black: the main choice; the magenta marks the option playing (Dom) */
    box-shadow: 0 1px 2px rgba(22, 18, 26, .08), 0 10px 22px -14px rgba(22, 18, 26, .45);
}
.ct-main-b:focus-visible { outline: 2px solid var(--brand-blue, #4C6BEE); outline-offset: 2px; }

/* ---------- the options of the open choice (the hero's tab look) ---------- */
.ct-subs { margin-top: 36px; }
.ct-sub { display: none; }
.ct--setup[data-g="wf"] .ct-sub[data-g="wf"],
.ct--setup[data-g="int"] .ct-sub[data-g="int"] { display: grid; }
.ct--setup:not([data-g]) .ct-sub[data-g="wf"] { display: grid; }
.ct-sub[data-g="wf"] { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 820px; }
.ct-sub[data-g="int"] { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0 16px; max-width: 1040px; }   /* as wide as the cards below (Dom) */
/* undo the pill tab look the section's other tabs carry */
.ct--setup .ct-tab.hu-tab,
.ct--setup .ct-tab.hu-tab:hover,
.ct--setup .ct-tab.hu-tab.is-on {
    display: flex; align-items: center; gap: 10px; padding: 0 0 16px; border-radius: 0;
    background: none; box-shadow: none; transform: none; white-space: normal; text-align: left;
    font-size: inherit; font-weight: inherit; letter-spacing: 0; --brand: var(--brand-magenta, #D53BD5);
}
.ct--setup .ct-tab.hu-tab { color: var(--muted); }
.ct--setup .ct-tab.hu-tab.is-on { color: var(--ink); }
.ct--setup .ct-tab.hu-tab .hu-tab-ico svg { width: 18px; height: 18px; }
.ct--setup .ct-tab.hu-tab.is-on .hu-tab-ico img { filter: none; opacity: 1; }   /* not the white logo of the old magenta pill */
.ct--setup .ct-tab.hu-tab .hu-tab-t b { white-space: normal; }
.ct--setup .ct-tab.hu-tab:focus-visible { outline: 2px solid #4C6BEE; outline-offset: 4px; border-radius: 8px; }

/* ---------- the top box over the two step boxes (Dom, 25 Oct 2026):
   the tool logos, "+ any tool" and the line, in its old look, the dashed
   box of the hero's PROCESS.md note (css/hero-pmx.css .hu-md), now as wide
   as both step boxes. It sits in .ct-layout right before the play
   (.ho-canvas): on wide screens in the right-hand column, above the boxes;
   narrower, between the options and the boxes. ---------- */
.ct--setup .ct-works { width: auto; max-width: none; margin: 24px 0 0; gap: 14px; padding: 12px 16px; }
/* "existing integrations" links to the integrations page: a quiet dotted
   underline, magenta on hover (Dom) */
.ct--setup .ct-works-a {
    color: inherit; text-decoration: underline dotted; text-decoration-thickness: 2px;
    text-decoration-color: #C9BFBC; text-underline-offset: 5px;
    transition: color .18s ease, text-decoration-color .18s ease;
}
.ct--setup .ct-works-a:hover { color: var(--pink-deep, #D53BD5); text-decoration-color: currentColor; }
.ct--setup .ct-works-a:focus-visible { outline: 2px solid var(--brand-blue, #4C6BEE); outline-offset: 3px; border-radius: 4px; }
.ct--setup .ct-works + .ho-canvas { margin-top: 18px; }
.ct--setup .ct-works .ct-int-any { margin-left: 6px; }
.ct-int-logos { display: flex; align-items: center; }
.ct-int-logo {
    display: grid; place-items: center; width: 30px; height: 30px; margin-left: -7px; flex: none;
    border-radius: 50%; background: #fff; border: 1px solid #ECE6E3; box-shadow: 0 0 0 2px var(--cream, #FCF9F7);
}
.ct-int-logo:first-child { margin-left: 0; }
.ct-int-logo img { display: block; width: 16px; height: 16px; }
.ct-int-any {
    margin-left: 8px; padding: 5px 11px; border-radius: 999px; white-space: nowrap;
    background: #fff; border: 1px dashed #D9A6D9; font-size: .75rem; font-weight: 700; color: var(--pink-deep, #D53BD5);
}
.ct--setup .ho-canvas { margin-top: 30px; }

/* ---------- narrower: the options slide, as in the hero ---------- */
@media (max-width: 1179px) {
    .ct--setup { overflow-x: clip; }
    .ct--setup[data-g="wf"] .ct-sub[data-g="wf"],
    .ct--setup[data-g="int"] .ct-sub[data-g="int"],
    .ct--setup:not([data-g]) .ct-sub[data-g="wf"] {
        display: flex; gap: 22px; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity;
        max-width: none; margin: 0 calc(50% - 50vw); padding: 0 16px; scroll-padding: 0 16px;
    }
    .ct-sub::-webkit-scrollbar { display: none; }
    .ct--setup .ct-tab.hu-tab { flex: 0 0 auto; min-width: 210px; scroll-snap-align: start; }
}
@media (max-width: 767px) {
    .ct-main { margin-top: 28px; }
    .ct-subs { margin-top: 26px; }
    .ct--setup .ct-works { margin-top: 18px; flex-wrap: wrap; row-gap: 10px; }
}
@media (prefers-reduced-motion: reduce) {
    .ct-main-b, .ct-main-ico { transition: none; }
}

/* ============================================================
   WIDE SCREENS (1180px up): the choices in a list on the left, a line,
   the play on the right, in the Ready-to-run workflows look (Dom;
   css/packs-split.css): two small labels, Workflows and Integrations, each
   with its options under it (all eight in view, so no switch), plain icon
   and title, the one playing a magenta pill. Below 1180px it stays
   stacked: the switch, the sliding options with their bars, the cards.
   ============================================================ */
.ct-grp { display: none; }
@media (min-width: 1180px) {
    .ct--setup .ct-layout {
        display: grid; grid-template-columns: 252px minmax(0, 1fr); align-items: start;   /* wider for the bigger options (Dom, 26 Oct 2026) */
        max-width: 1200px; margin: 52px auto 0;
    }
    /* the list stays in view while the cards scroll by (Dom); the line
       between them is the cards' left edge, so it runs their full height */
    .ct--setup .ct-pick { position: sticky; top: 92px; padding: 4px 28px 4px 0; }
    .ct--setup .ct-pick .ct-main { display: none; }
    .ct--setup .ct-pick .ct-subs { margin: 0; }
    .ct--setup .ct-pick .ct-sub,
    .ct--setup[data-g] .ct-pick .ct-sub {
        display: flex; flex-direction: column; gap: 4px; max-width: none; margin: 0; padding: 0; overflow: visible;
    }
    .ct--setup .ct-pick .ct-sub + .ct-sub { margin-top: 18px; }
    .ct-grp {
        display: block; margin: 0 0 4px 12px;
        font-size: .6875rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
    }
    /* an option: icon and title, the one playing magenta */
    .ct--setup .ct-pick .ct-tab.hu-tab,
    .ct--setup .ct-pick .ct-tab.hu-tab:hover {
        display: flex; align-items: center; gap: 10px; width: 100%; min-width: 0; padding: 10px 14px 10px 12px;
        border-radius: 12px; background: transparent; box-shadow: none; color: var(--body, #4E4854);
        transition: background-color .18s ease, color .18s ease, box-shadow .2s ease;
    }
    .ct--setup .ct-pick .ct-tab.hu-tab:hover { background: var(--soft, #F4EFED); color: var(--ink, #16121A); }
    .ct--setup .ct-pick .ct-tab.hu-tab.is-on,
    .ct--setup .ct-pick .ct-tab.hu-tab.is-on:hover {
        background: var(--brand-magenta, #D53BD5); color: #fff;
        box-shadow: 0 1px 2px rgba(22, 18, 26, .05), 0 12px 26px -16px rgba(213, 59, 213, .5);
    }
    .ct--setup .ct-pick .hu-tab-ico,
    .ct--setup .ct-pick .hu-tab[aria-selected="true"] .hu-tab-ico {
        width: 18px; height: 18px; border: 0; border-radius: 0; background: none; box-shadow: none; color: inherit;
    }
    .ct--setup .ct-pick .hu-tab-ico svg, .ct--setup .ct-pick .hu-tab-ico img { width: 18px; height: 18px; color: inherit; filter: none; opacity: 1; }
    .ct--setup .ct-pick .hu-tab.is-on .hu-tab-ico img { filter: brightness(0) invert(1); }
    .ct--setup .ct-pick .hu-tab-t b,
    .ct--setup .ct-pick .hu-tab[aria-selected="true"] .hu-tab-t b { font-size: .9688rem; font-weight: 700; letter-spacing: -.005em; color: inherit; white-space: nowrap; }
    .ct--setup .ct-pick .hu-tab-bar { display: none; }

    /* the play on the right */
    .ct--setup .ct-layout .ho-canvas { max-width: none; margin: 0; padding: 0 0 0 32px; border-left: 1px solid var(--line, #EAE3E1); }
    /* the top box: right-hand column, first row, lined up with the boxes
       (the canvas's 1px line and 32px padding); the line runs on beside it */
    .ct--setup .ct-layout { grid-template-rows: auto 1fr; }
    .ct--setup .ct-layout .ct-pick { grid-column: 1; grid-row: 1 / span 2; }
    .ct--setup .ct-layout .ct-works { position: relative; grid-column: 2; grid-row: 1; margin: 0 0 24px 33px; }
    .ct--setup .ct-layout .ct-works::before { content: ""; position: absolute; left: -34px; top: -1px; bottom: -25px; width: 1px; background: var(--line, #EAE3E1); }
    .ct--setup .ct-layout .ct-works + .ho-canvas { grid-column: 2; grid-row: 2; margin: 0; }
    .ct--setup .ct-layout .ho-pair { max-width: none; }
    .ct--setup .ct-layout .ho-arrow { width: 64px; }
    .ct--setup .ct-layout .ho-card { padding: 24px 20px 20px; }
}
