/* ============================================================================
   AIGG PILLAR STYLESHEET — the light content pages ONLY:
   /tools/ai-generator-guide, /ai-illustrations, /human-made-illustrations.
   Split out of ai-generator.css 2026-08-26 (audit): those pages were paying
   182KB render-blocking for ~24% used rules. The dark AI-Studio tool keeps
   ai-generator.css; NOTHING here may target .aig-tool / .aig-studio.
   ============================================================================ */

/* .aig-num is reused by the guide's step circles + tables. On the dark tool it
   is styled by ai-generator.css with dark-scoped tokens; give the light pages
   a real definition so it never silently degrades (audit finding). */
.aigg .aig-num {
    font-family: var(--mono-font-display);
    font-weight: 800;
    color: inherit;
    font-variant-numeric: tabular-nums;
}
/* ==========================================================================
   THE GUIDE PAGE (/tools/ai-generator-guide) — light, prefix aigg-
   ========================================================================== */
.aigg .aigg-h1 {
    margin: 8px 0 0;
    font-family: var(--mono-font-display);
    font-size: clamp(1.9rem, 4vw, 3rem) !important;
    font-weight: var(--mono-w-extrabold, 800);
    letter-spacing: -0.02em;
    color: var(--mono-ink);
}
.aigg .aigg-h2 {
    margin: 0;
    font-family: var(--mono-font-display);
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.02em;
}
.aigg .aigg-h3 {
    margin: 0 0 10px;
    font-family: var(--mono-font-display);
    font-size: 18px;
    font-weight: 700;
    color: var(--mono-ink);
}
.aigg-cta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 20px;
    margin: 22px 0 0;
}

/* The capabilities card — the owner's lime mockup, faithfully. */
.aigg-cap {
    background: var(--mono-lime, #CCEA4A);
    border-radius: var(--mono-radius-xl, 24px);
    padding: clamp(24px, 4vw, 44px);
    color: #111;
}
.aigg-cap__body { margin: 12px 0 0; max-width: 62ch; font-size: var(--mono-fs-lead); line-height: 1.55; }
.aigg-cap__icons {
    display: flex;
    flex-wrap: wrap;
    gap: 28px 44px;
    margin: 28px 0 0;
    padding: 0;
    list-style: none;
}
.aigg-cap__icons li { display: grid; justify-items: start; gap: 8px; font-size: 12.5px; font-weight: 700; }
.aigg-cap__icons img { width: 44px; height: 44px; }

.aigg-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin: 26px 0 0;
    padding: 0;
    list-style: none;
}
.aigg-step {
    min-width: 0;
    padding: 20px;
    background: var(--mono-white);
    border: 1px solid var(--mono-border);
    border-radius: var(--mono-radius-lg, 16px);
}
.aigg-step__n {
    display: inline-grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--mono-lime, #CCEA4A);
    color: #111;
    font-weight: 800;
}
.aigg-step__t { display: block; margin-top: 10px; font-weight: 700; color: var(--mono-ink); }
.aigg-step__d { display: block; margin-top: 4px; font-size: var(--mono-fs-sm); color: var(--mono-text-muted); line-height: 1.5; }

.aigg-tips { margin: 20px 0 0; padding-left: 18px; display: grid; gap: 10px; line-height: 1.55; color: var(--mono-text-muted); }
.aigg-tips strong { color: var(--mono-ink); }


@media (max-width: 720px) {
    .aigg-steps { grid-template-columns: minmax(0, 1fr); }
}


/* ==========================================================================
   GUIDE PILLAR REBUILD (2026-08-26, owner direction) — override layer.
   The guide became the SEO pillar for AI-generated illustrations. Fixes the
   two layout complaints (narrow-left hero vs 1660px lime box = imbalance):
   every section now shares ONE 1200px rail, the hero centres, and the lime
   capabilities card is a two-column grid instead of copy + empty lime.
   New sections: stats, provenance duo, credits + plans tables, use cases,
   draft/pack/custom compare. Same aigg- prefix, later in file so it wins.
   ========================================================================== */

/* One shared rail for the whole page — kills the 1660px sprawl. */
.aigg .mono-container { max-width: 1200px; }
.aigg .mono-container--narrow { max-width: 1200px; }
.aigg .mono-section { padding: clamp(40px, 6vw, 72px) 0; }
.aigg .mono-section-head { max-width: 760px; }

/* Hero: centred, with an at-a-glance stat row. */
.aigg-hero { text-align: center; }
.aigg-hero .mono-lead { max-width: 62ch; margin-left: auto; margin-right: auto; }
.aigg-hero .aigg-cta-row { justify-content: center; }
.aigg-stats {
    display: flex; flex-wrap: wrap; justify-content: center;
    gap: 14px; margin: 36px 0 0; padding: 0; list-style: none;
}
.aigg-stats li {
    display: grid; gap: 2px; min-width: 170px; text-align: left;
    padding: 14px 20px; background: var(--mono-white);
    border: 1px solid var(--mono-border); border-radius: 16px;
}
.aigg-stats strong { font-family: var(--mono-font-display); font-size: 20px; color: var(--mono-ink); }
.aigg-stats span { font-size: 12.5px; color: var(--mono-text-muted); }

/* Lime capabilities card: two balanced columns (copy | icon grid). */
.aigg-cap {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    gap: 24px 56px;
    align-items: center;
}
.aigg-cap__copy { min-width: 0; }
.aigg-cap__body { max-width: none; }
.aigg-cap__icons {
    margin: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, auto));
    gap: 30px 44px;
    justify-content: center;
    align-content: center;
}

/* Shared table shell (credits + plans). */
.aigg-tablewrap {
    margin: 26px 0 0;
    overflow-x: auto;
    background: var(--mono-white);
    border: 1px solid var(--mono-border);
    border-radius: 16px;
}
.aigg-table { width: 100%; border-collapse: collapse; min-width: 560px; }
.aigg-table th {
    padding: 14px 18px; text-align: left;
    font-size: 11.5px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
    color: var(--mono-text-muted); border-bottom: 1px solid var(--mono-border);
}
.aigg-table td {
    padding: 14px 18px; text-align: left; vertical-align: top;
    color: var(--mono-text-muted); border-bottom: 1px solid var(--mono-border); line-height: 1.5;
}
.aigg-table td:first-child { font-weight: 600; color: var(--mono-ink); white-space: nowrap; }
.aigg-table td .aig-num { font-weight: 800; color: var(--mono-ink); }
.aigg-table tbody tr:last-child td { border-bottom: 0; }

/* Provenance duo — the two origin labels, side by side. */
.aigg-duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.aigg-duo__card {
    display: flex; flex-direction: column; align-items: flex-start;
    padding: 26px; background: var(--mono-white);
    border: 1px solid var(--mono-border); border-radius: 16px;
}
.aigg-duo__badge {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 6px 14px; border-radius: 999px;
    background: var(--mono-lime, #CCEA4A); color: #111;
    font-weight: 700; font-size: 13px;
}
.aigg-duo__badge--ai { background: #111; color: #fff; }
.aigg-duo__card p { margin: 14px 0 12px; color: var(--mono-text-muted); line-height: 1.6; }
.aigg-duo__card .mono-link { margin-top: auto; }

/* Use cases — 3x2 card grid. */
.aigg-uses { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.aigg-uses__card {
    padding: 20px 22px; background: var(--mono-white);
    border: 1px solid var(--mono-border); border-radius: 16px;
}
.aigg-uses__card h3 { margin: 0; font-family: var(--mono-font-display); font-size: 15.5px; font-weight: 700; color: var(--mono-ink); }
.aigg-uses__card p { margin: 6px 0 0; font-size: var(--mono-fs-sm); color: var(--mono-text-muted); line-height: 1.55; }

/* Draft vs pack vs custom — 3 columns, the middle one highlighted. */
.aigg-compare { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.aigg-compare__card {
    display: flex; flex-direction: column; gap: 10px;
    padding: 24px; background: var(--mono-white);
    border: 1px solid var(--mono-border); border-radius: 16px;
}
.aigg-compare__card--hi { border: 2px solid #111; }
.aigg-compare__card h3 { margin: 0; font-family: var(--mono-font-display); font-size: 17px; font-weight: 800; color: var(--mono-ink); }
.aigg-compare__card p { margin: 0; color: var(--mono-text-muted); line-height: 1.6; font-size: var(--mono-fs-sm); }
.aigg-compare__when {
    align-self: flex-start;
    padding: 4px 10px; border-radius: 999px;
    background: var(--mono-surface, #f4f4f0); color: var(--mono-ink);
    font-size: 12px; font-weight: 600;
}
.aigg-compare__card .mono-link { margin-top: auto; }

/* --- narrow ---------------------------------------------------------------- */
@media (max-width: 979px) {
    .aigg-cap { grid-template-columns: minmax(0, 1fr); }
    .aigg-cap__icons { justify-content: start; }
    .aigg-duo { grid-template-columns: minmax(0, 1fr); }
    .aigg-uses { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .aigg-compare { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 620px) {
    .aigg-uses { grid-template-columns: minmax(0, 1fr); }
    .aigg-stats li { min-width: calc(50% - 7px); }
}

/* ==========================================================================
   REFINEMENT PASS 2 (2026-08-26, owner markup notes) — override layer.
   Guide: controlled 2-line H1, numbered prompt tips, hairline separators on
   container-less sections, pack-hero mosaic, compare cards colour-coded
   (pack white / AI black / custom lime) with icons + real buttons.
   Studio: official ai-mark above a larger title.
   ========================================================================== */

/* H1 breaks as two balanced lines on desktop; natural wrap on phones. */
@media (max-width: 719px) {
    .aigg-h1__br { display: none; }
}

/* Hairline separator: rail-width rule above sections that have no container
   chrome of their own. The border sits on the container so it matches the
   1200px rail, not the viewport. */
.aigg .mono-section.aigg-sep { padding-top: 0; }
.aigg .mono-section.aigg-sep > .mono-container {
    border-top: 1px solid var(--mono-border);
    padding-top: clamp(40px, 6vw, 72px);
}

/* Numbered prompt tips — same lime circles as the How-it-works steps. */
.aigg-tips--num { list-style: none; padding-left: 0; counter-reset: aigg-tip; }
.aigg-tips--num li { counter-increment: aigg-tip; position: relative; padding: 3px 0 3px 46px; }
.aigg-tips--num li::before {
    content: counter(aigg-tip);
    position: absolute; left: 0; top: 0;
    display: inline-grid; place-items: center;
    width: 30px; height: 30px; border-radius: 50%;
    background: var(--mono-lime, #CCEA4A); color: #111;
    font-family: var(--mono-font-display); font-weight: 800; font-size: 14px;
}

/* Pack-hero mosaic — real library art to break up the text. */
.aigg-mosaic {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}
.aigg-mosaic__tile {
    position: relative; display: block; overflow: hidden;
    border-radius: 16px; border: 1px solid var(--mono-border);
    aspect-ratio: 1 / 1;
}
.aigg-mosaic__tile img {
    width: 100%; height: 100%; object-fit: cover; display: block;
    transition: transform .25s ease;
}
.aigg-mosaic__tile:hover img { transform: scale(1.04); }
.aigg-mosaic__name {
    position: absolute; left: 10px; right: 10px; bottom: 10px;
    padding: 4px 10px; border-radius: 999px;
    background: rgba(255,255,255,0.9); color: #111;
    font-size: 11.5px; font-weight: 700;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    opacity: 0; transform: translateY(4px);
    transition: opacity .2s ease, transform .2s ease;
}
.aigg-mosaic__name--light { background: rgba(17,17,17,0.82); color: #fff; }
.aigg-mosaic__tile:hover .aigg-mosaic__name { opacity: 1; transform: translateY(0); }

/* Compare cards: colour-coded origins. Pack = white (default), AI = black,
   custom = lime — the same colour language as the Made-by labels. */
.aigg-btn-sm { height: 44px; padding: 0 20px; font-size: 14px; }
.aigg-compare__card { gap: 12px; }
.aigg-compare__card .mono-btn { align-self: flex-start; margin-top: auto; }
.aigg-compare__icon {
    display: inline-grid; place-items: center;
    width: 44px; height: 44px; border-radius: 12px;
    background: var(--mono-surface, #f4f4f0); color: var(--mono-ink);
}
.aigg-compare__icon svg { width: 22px; height: 22px; }

/* AI card — black. */
.aigg-compare__card--ai { background: #111; border-color: #111; }
.aigg-compare__card--ai h3 { color: #fff; }
.aigg-compare__card--ai p { color: rgba(255,255,255,0.72); }
.aigg-compare__card--ai .aigg-compare__when { background: rgba(255,255,255,0.12); color: #fff; }
.aigg-compare__card--ai .aigg-compare__icon { background: rgba(255,255,255,0.1); color: var(--mono-lime, #CCEA4A); }

/* Custom card — lime. */
.aigg-compare__card--custom { background: var(--mono-lime, #CCEA4A); border-color: var(--mono-lime, #CCEA4A); }
.aigg-compare__card--custom h3 { color: #111; }
.aigg-compare__card--custom p { color: rgba(17,17,17,0.72); }
.aigg-compare__card--custom .aigg-compare__when { background: rgba(17,17,17,0.1); color: #111; }
.aigg-compare__card--custom .aigg-compare__icon { background: rgba(17,17,17,0.1); color: #111; }

@media (max-width: 979px) {
    .aigg-mosaic { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
    .aigg-mosaic { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
}

/* Hero rhythm fix (owner note, 2026-08-26): the H1's descenders were touching
   the lead, and the lead sat tight on the CTA row. Applies to both aigg pages
   (guide + /ai-illustrations). */
.aigg-hero .aigg-h1 { margin-top: 14px; line-height: 1.12; }
.aigg-hero .mono-lead { margin-top: 24px; }
.aigg-hero .aigg-cta-row { margin-top: 30px; }
.aigg-hero .aigg-stats { margin-top: 42px; }

/* Orphan control (owner note, 2026-08-26): no awkward 1-3 word last lines.
   `pretty` re-rags paragraph endings in supporting browsers; harmless elsewhere. */
.aigg p, .aigg li, .aigg figcaption, .aigg .mono-lead { text-wrap: pretty; }
.aigg .mono-h2, .aigg .aigg-h1 { text-wrap: balance; }

/* Row headers in comparison tables (a11y): same look as the old td:first-child
   labels, overriding the uppercase column-header treatment. */
.aigg-table th[scope="row"] {
    font-size: inherit; font-weight: 600; letter-spacing: 0; text-transform: none;
    color: var(--mono-ink); white-space: nowrap; vertical-align: top;
    padding: 14px 18px; border-bottom: 1px solid var(--mono-border); text-align: left;
}
.aigg-table tbody tr:last-child th[scope="row"] { border-bottom: 0; }
