/* ============================================================================
   COLOR WHEEL — /color-theory (prefix ctg-)
   The tool-guide design system (docs/design/tool-guide-design-system.md) around
   the colour wheel: a MONO hero with the tool right under it and one-line
   stats; the long colour-theory editorial keeps its own typography inside the
   rail; then the lime bento, the dark library card, the FAQ accordion and the
   other tools. The tool itself keeps its cw- rules; .ctg re-dresses the shell.
   ============================================================================ */

.ctg .mono-container { max-width: 1200px; }
.ctg .mono-section { padding: clamp(40px, 6vw, 72px) 0; }
.ctg .mono-section-head { max-width: 760px; }
.ctg .mono-section-head .mono-lead { margin-top: 12px; }

/* hairline above container-less sections, on the rail so it matches 1200px */
.ctg .mono-section.ctg-sep { padding-top: 0; }
.ctg .mono-section.ctg-sep > .mono-container {
    border-top: 1px solid var(--mono-border);
    padding-top: clamp(40px, 6vw, 72px);
}

/* ---- hero -------------------------------------------------------------- */
.ctg-hero { text-align: center; }
.ctg-hero .ctg-h1 {
    margin: 14px auto 0;
    max-width: 22ch;
    font-family: var(--mono-font-display);
    font-size: clamp(1.9rem, 3.7vw, 3.7rem) !important;   /* the same size as before on desktop; site.css sets every h1 to clamp(.8rem, 3.7vw, ...) !important: 14px on a phone */
    font-weight: var(--mono-w-extrabold, 800);
    line-height: 1.06;
    letter-spacing: -0.02em;
    color: var(--mono-ink);
}
.ctg-hero .mono-lead { max-width: 64ch; margin: 18px auto 0; }
.ctg-cta-row {
    display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
    gap: 12px 20px; margin: 24px 0 0;
}
.ctg-cta-row--left { justify-content: flex-start; }
.ctg-cta-row .mono-link svg { margin-right: 2px; }
.ctg-note { font-size: 13px; color: var(--mono-text-muted); }
.ctg-hero .ctg-cta-row { margin-top: 26px; }

.ctg-stats {
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px;
    max-width: 1100px; margin: 18px auto 0; padding: 0; list-style: none;
}
.ctg-stats li {
    display: flex; align-items: center; gap: 10px; min-width: 0; text-align: left;
    padding: 10px 14px; background: var(--mono-white);
    border: 1px solid var(--mono-border); border-radius: 12px;
    font-size: 12.5px; line-height: 1.35; color: var(--mono-text-muted);
}
.ctg-stats li > svg { flex: 0 0 auto; width: 30px; height: 30px; padding: 6px; border-radius: 9px; background: var(--mono-ink); color: var(--mono-lime, #ccea4a); }
.ctg-stats li > span { min-width: 0; }
.ctg-stats strong { display: block; font-family: var(--mono-font-display); font-size: 13.5px; font-weight: 800; letter-spacing: -0.01em; color: var(--mono-ink); }

/* ---- what it does: the lime shell, an intro, then a bento of feature cards ---- */
.ctg-cap {
    display: grid; gap: 28px;
    background: var(--mono-lime, #CCEA4A);
    border-radius: var(--mono-radius-xl, 24px);
    padding: clamp(24px, 4vw, 48px);
    color: #111;
}
.ctg-cap__intro { max-width: 760px; }
.ctg-cap__intro .mono-eyebrow { color: #111; opacity: .7; }
.ctg-cap__h2 { margin: 8px 0 0; font-family: var(--mono-font-display); font-size: clamp(1.5rem, 2.6vw, 2.1rem); font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.ctg-cap__body { margin: 12px 0 0; font-size: var(--mono-fs-lead); line-height: 1.55; }
.ctg-feat { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; }
.ctg-feat__card {
    display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 14px; align-items: start;
    padding: 18px; border-radius: 18px; background: rgba(255,255,255,.92); border: 1px solid rgba(17,17,17,.06);
    font-size: 13.5px; line-height: 1.5; color: #111;
    transition: transform var(--mono-dur, .2s) ease, box-shadow var(--mono-dur, .2s) ease, background var(--mono-dur, .2s) ease;
}
.ctg-feat__card:hover { background: #fff; transform: translateY(-3px); box-shadow: 0 14px 30px rgba(17,24,39,.12); }
.ctg-feat__card--wide { grid-column: span 2; grid-template-columns: 44px minmax(0, 1fr) 220px; align-items: center; }
.ctg-feat__i { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: #111; color: var(--mono-lime, #ccea4a); }
.ctg-feat__card strong { display: block; font-family: var(--mono-font-display); font-size: 15px; font-weight: 800; letter-spacing: -0.01em; margin-bottom: 4px; }
.ctg-feat__card--wide strong { font-size: 17px; }
.ctg-feat__card p { margin: 0; color: #2a2a2a; }
.ctg-feat__art { width: 220px; height: 80px; display: block; overflow: hidden; }

/* ---- use cases 3x2 ----------------------------------------------------- */
.ctg-uses { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.ctg-uses__card {
    padding: 20px 22px; background: var(--mono-white); border: 1px solid var(--mono-border); border-radius: 16px;
    transition: transform var(--mono-dur, .2s) var(--mono-ease, ease), box-shadow var(--mono-dur, .2s) ease, border-color var(--mono-dur, .2s) ease;
}
.ctg-uses__card:hover { transform: translateY(-3px); box-shadow: var(--mono-shadow-hover, 0 12px 28px rgba(17,24,39,.08)); border-color: var(--mono-lime, #ccea4a); }
.ctg-uses__i { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--mono-lime-pale, #fbfde8); color: var(--mono-ink); margin-bottom: 12px; }
.ctg-uses__card h3 { margin: 0; font-family: var(--mono-font-display); font-size: 15.5px; font-weight: 700; color: var(--mono-ink); }
.ctg-uses__card p { margin: 6px 0 0; font-size: var(--mono-fs-sm); color: var(--mono-text-muted); line-height: 1.55; }
.ctg-uses__card a { color: var(--mono-ink); border-bottom: 2px solid var(--mono-lime); padding-bottom: 1px; text-decoration: none; }

/* ---- FAQ: the foundation accordion, centred ---------------------------- */
.ctg-faq .mono-section-head { margin-left: auto; margin-right: auto; text-align: center; }
.ctg-faq .mono-faq2 { grid-template-columns: 1fr; max-width: 860px; margin: 0 auto; }
.ctg-faq .ctg-cta-row { justify-content: center; margin-top: 32px; }

/* ---- motion ------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
    .ctg-uses__card, .ctg-feat__card { transition: none; }
}

/* ---- narrow ------------------------------------------------------------ */
@media (max-width: 979px) {
    .ctg-feat { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ctg-feat__card--wide { grid-template-columns: 44px minmax(0, 1fr); }
    .ctg-feat__art { display: none; }
    .ctg-uses { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 719px) {
    .ctg-h1__br { display: none; }
}
@media (max-width: 620px) {
    .ctg-feat { grid-template-columns: minmax(0, 1fr); }
    .ctg-feat__card--wide { grid-column: span 1; }
    .ctg-uses { grid-template-columns: minmax(0, 1fr); }
    .ctg-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 420px) {
    .ctg-stats { grid-template-columns: minmax(0, 1fr); }
}

/* ---- the tool under the hero: pill tabs, the dark card in the guide frame -- */
.ctg-tool { margin-top: 40px; text-align: left; }
.ctg .cw-tabs { display: flex; flex-wrap: wrap; gap: 8px; border-bottom: 0; margin: 0 0 14px; justify-content: center; }
.ctg .cw-tab { padding: 9px 16px; border-radius: 999px; border: 1px solid var(--mono-border); background: #fff; color: var(--mono-ink); font-size: 13.5px; font-weight: 700; margin: 0; transition: background var(--mono-dur, .2s) ease, color var(--mono-dur, .2s) ease, border-color var(--mono-dur, .2s) ease; }
.ctg .cw-tab:hover { border-color: var(--mono-gray-400, #9ca3af); background: var(--mono-gray-50, #f9fafb); }
.ctg .cw-tab.active { background: var(--mono-ink); color: var(--mono-lime, #ccea4a); border-color: var(--mono-ink); }
.ctg .cw-card { background: #111; border-radius: 20px; border: 1px solid rgba(255,255,255,.06); margin-top: 0; box-shadow: var(--mono-shadow-card, 0 18px 50px rgba(17,17,17,.08)); }
.ctg .cw-add-palette-btn, .ctg .cw-export-btn { border-radius: 999px; }
.ctg .cw-export-btn { border: 1px solid rgba(255,255,255,.14); }

/* ---- the editorial: the rail, MONO headings, the rest as written --------- */
.ctg-editorial > .mono-container > .static__pages, .ctg-editorial .static__pages { max-width: 100%; }
.ctg-editorial .mono-h2 { text-align: center; margin: 0 auto 24px; max-width: 24ch; }
.ctg-editorial h3, .ctg-editorial h4 { font-family: var(--mono-font-display); color: var(--mono-ink); letter-spacing: -0.01em; }
.ctg-editorial p { color: var(--mono-text-muted); line-height: 1.65; }
.ctg-editorial p strong { color: var(--mono-ink); }

/* ---- dark cards: Photogen, the library --------------------------------- */
.ctg-dark { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 28px 40px; align-items: center; background: var(--mono-ink); color: #fff; border-radius: var(--mono-radius-xl, 24px); padding: clamp(28px, 4.5vw, 52px); }
.ctg-dark .mono-eyebrow { color: var(--mono-lime, #ccea4a); }
.ctg-dark__h2 { margin: 10px 0 0; font-family: var(--mono-font-display); font-size: clamp(1.5rem, 2.8vw, 2.2rem); font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; color: #fff; }
.ctg-dark p { margin: 12px 0 0; font-size: 14.5px; line-height: 1.6; color: rgba(255,255,255,.72); }
.ctg-dark .ctg-cta-row { justify-content: flex-start; margin-top: 22px; }
.ctg-dark .mono-btn--primary { background: var(--mono-lime, #ccea4a); color: var(--mono-ink); border-color: var(--mono-lime, #ccea4a); }
.ctg-dark .mono-link { color: #fff; }
.ctg-dark__small { margin: 16px 0 0; font-size: 12.5px; color: rgba(255,255,255,.5); }
.ctg-dark__tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; padding: 0; list-style: none; }
.ctg-dark__tags li { padding: 5px 11px; border-radius: 999px; font-size: 12px; font-weight: 600; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); color: #fff; }
.ctg-dark__figures ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; }
.ctg-dark__figures li { list-style: none; padding: 16px 18px; border-radius: 16px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); }
.ctg-dark__figures strong { display: block; font-family: var(--mono-font-display); font-size: 26px; font-weight: 800; letter-spacing: -0.02em; color: var(--mono-lime, #ccea4a); line-height: 1.1; }
.ctg-dark__figures span { display: block; margin-top: 4px; font-size: 12.5px; color: rgba(255,255,255,.66); }
.ctg-dark__photo { border-radius: 16px; overflow: hidden; border: 1px solid rgba(255,255,255,.12); box-shadow: 0 20px 50px rgba(0,0,0,.35); }
.ctg-dark__photo img { display: block; width: 100%; height: auto; }


@media (max-width: 979px) {
    .ctg-dark { grid-template-columns: minmax(0, 1fr); }
}

/* ---- phones: less padding per layer so the text gets the width ---------- */
@media (max-width: 620px) {
    .ctg .mono-section { padding: 36px 0; }
    .ctg-cap { padding: 20px 14px; border-radius: 18px; gap: 20px; }
    .ctg-cap__h2 { font-size: 1.45rem; }
    .ctg-feat { gap: 10px; }
    .ctg-feat__card { padding: 14px; gap: 12px; border-radius: 14px; }
    .ctg-feat__card--wide { grid-template-columns: 44px minmax(0, 1fr); }
    .ctg-flow__card { padding: 16px; }
    .ctg-uses__card { padding: 16px; }
    .ctg-pair { padding: 12px 12px 10px; border-radius: 16px; }
    .ctg-stats li { padding: 9px 12px; }
    .ctg-cta-row .mono-btn { width: 100%; justify-content: center; }
    .ctg .mono-lead { font-size: 15px; }
    .ctg-dark { padding: 22px 16px; border-radius: 18px; }
    .ctg .cw-card { border-radius: 16px; padding: 1rem; }
}
