/* ============================================================================
   latent-render.css  —  ⚡ Latent Render engine styling (.lr-*)
   Shared across the AI tool pickers; per-page accent via --lr-accent / --lr-grad-a
   / --lr-grad-b set inline on .lr-stage. The stage is a self-contained dark
   "render canvas" that reads the same on any site theme.
   ============================================================================ */
.lr-stage {
    --lr-accent: #7c3aed;
    --lr-grad-a: #7c3aed;
    --lr-grad-b: #22a7d1;
    position: relative;
    border-radius: 18px;
    padding: 20px;
    box-sizing: border-box;
    background: radial-gradient(120% 130% at 50% 0%, #141227 0%, #0b0a18 60%, #08070f 100%);
    border: 1px solid #241f43;
    box-shadow: 0 0 0 1px rgba(124, 58, 237, .10), 0 24px 60px -20px rgba(124, 58, 237, .35);
}
.lr-genbar { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; opacity: .45; transition: opacity .3s; }
.lr-genbar.lr-active { opacity: 1; }
.lr-genlbl { font-size: 12px; color: #a5a3c7; font-variant: small-caps; letter-spacing: .6px; white-space: nowrap; }
.lr-track { flex: 1; height: 6px; border-radius: 6px; background: #1c1938; overflow: hidden; }
.lr-fill { height: 100%; width: 0%; border-radius: 6px; background: linear-gradient(90deg, var(--lr-grad-a), var(--lr-grad-b)); box-shadow: 0 0 12px rgba(124, 58, 237, .7); transition: width .09s linear; }
.lr-steps { font-size: 12px; color: #c7c5e8; font-variant-numeric: tabular-nums; white-space: nowrap; min-width: 78px; text-align: right; }
.lr-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; position: relative; }
.lr-tile { position: relative; aspect-ratio: 1.15/1; border-radius: 12px; overflow: hidden; border: 1px solid #221d3d; background: #0c0b1a; display: flex; align-items: center; justify-content: center; transition: transform .35s cubic-bezier(.34, 1.4, .5, 1), box-shadow .35s, opacity .3s; }
.lr-noise { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; mix-blend-mode: screen; opacity: .62; }
.lr-veil { position: absolute; inset: 0; z-index: 2; background: radial-gradient(90% 90% at 50% 40%, rgba(8, 7, 15, .10), rgba(8, 7, 15, .62)); opacity: 0; transition: opacity .3s; }
.lr-name { position: relative; z-index: 3; font-size: 12.5px; font-weight: 600; color: #b9b7d6; text-align: center; padding: 0 6px; text-shadow: 0 1px 2px #000; transition: filter .3s, opacity .3s, color .3s; }
.lr-tile.lr-generating .lr-name { filter: blur(1.4px); opacity: .32; color: #5a597a; }
.lr-tile.lr-generating .lr-veil { opacity: 1; }
.lr-tile.lr-peek .lr-name { filter: blur(.6px); opacity: .75; }
.lr-tile.lr-dim { opacity: .5; }
.lr-tile.lr-dim .lr-veil { opacity: 1; }
.lr-tile.lr-win {
    z-index: 6; transform: scale(1.16); border: 1.5px solid #a78bfa;
    background: linear-gradient(150deg, var(--lr-grad-a) 0%, var(--lr-grad-b) 100%);
    box-shadow: 0 0 0 4px rgba(124, 58, 237, .18), 0 0 34px 6px rgba(124, 58, 237, .55), 0 18px 40px -10px rgba(0, 0, 0, .7);
}
.lr-tile.lr-win .lr-veil { opacity: 0; }
.lr-tile.lr-win .lr-name { filter: none; opacity: 1; color: #fff; font-size: 15px; font-weight: 800; letter-spacing: .3px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.lr-tile.lr-win .lr-name::before { content: "RENDERED"; font-size: 9px; font-weight: 800; letter-spacing: .9px; color: #0a0a14; background: #c4f0ff; padding: 2px 8px; border-radius: 20px; box-shadow: 0 2px 8px rgba(0, 0, 0, .35); }
.lr-scan {
    position: absolute; left: -4px; right: -4px; top: 10%; height: 64px; z-index: 4; pointer-events: none; border-radius: 8px; opacity: 0; transition: opacity .25s;
    background: linear-gradient(90deg, transparent, rgba(34, 211, 238, .16) 30%, rgba(167, 139, 250, .28) 50%, rgba(34, 211, 238, .16) 70%, transparent);
    box-shadow: 0 0 26px 4px rgba(124, 58, 237, .35); border-top: 1px solid rgba(196, 240, 255, .55); border-bottom: 1px solid rgba(196, 240, 255, .35);
}
.lr-caption { margin-top: 16px; text-align: center; font-size: 13px; color: #9a98bd; font-variant-numeric: tabular-nums; min-height: 18px; }
.lr-caption b { color: #a78bfa; }
.lr-caption .lr-ok { color: #34d399; font-weight: 800; }
/* start overlay button over the idle grid */
.lr-genbtn-main {
    display: inline-flex; align-items: center; gap: 8px; margin: 16px auto 0; font-size: 15px; font-weight: 800; color: #fff;
    padding: 12px 30px; border-radius: 12px; border: 0; cursor: pointer; letter-spacing: .3px;
    background: linear-gradient(135deg, var(--lr-grad-a), var(--lr-grad-b)); box-shadow: 0 8px 22px -6px rgba(124, 58, 237, .7);
}
.lr-genbtn-wrap { text-align: center; }
/* Sampling steps slider */
.lr-steps-row { margin-top: 16px; }
.lr-steps-row label { font-size: 13px; font-weight: 600; color: var(--theme-text, #1a1a2e); display: flex; align-items: center; gap: 8px; }
.lr-steps-row .lr-steps-val { color: var(--lr-accent); font-weight: 800; }
.lr-steps-row input[type=range] { width: 100%; margin-top: 8px; accent-color: var(--lr-accent); }
.lr-effects { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 14px; font-size: 13px; color: var(--theme-text, #1a1a2e); }
.lr-effects label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
/* editable roster textarea */
.lr-items-ta { width: 100%; min-height: 220px; font-family: monospace; font-size: .9rem; border-radius: 10px; border: 1px solid var(--theme-border, #d7dbe0); background: var(--theme-bg, #fff); color: var(--theme-text, #1a1a2e); padding: 10px 12px; resize: vertical; }

/* Result bar accent (shared winner-result-bar.css reads these) */
.page-lr-scope {
    --wsp-result-accent: var(--lr-accent, #7c3aed);
    --wsp-result-grad: linear-gradient(135deg, #7c3aed, #22a7d1);
    --wsp-result-plate: rgba(124, 58, 237, .10);
    --wsp-result-display: inherit;
}

@media (max-width: 575.98px) {
    .lr-grid { grid-template-columns: repeat(3, 1fr) !important; }
    .lr-stage { padding: 14px; }
}

/* ── SEO content (.lr-content) — type scale from .content-guide; colour only ── */
.lr-content { color: var(--theme-text, #1a1a2e); background: var(--theme-bg, #fff); padding: 3.25rem 0 3.5rem; margin-top: 1rem; border-top: 1px solid var(--theme-border, #e9ecef); }
.lr-inner { max-width: 860px; margin: 0 auto; padding: 0 1rem; }
.lr-content h2, .lr-content h3 { color: var(--theme-text, #1a1a2e); }
.lr-content p, .lr-content li { color: var(--theme-muted, #5b6470); }
.lr-content strong { color: var(--theme-text, #1a1a2e); }
.lr-content a { color: var(--lr-accent, #7c3aed); text-decoration: underline; text-underline-offset: 2px; font-weight: 600; }
.lr-kicker { display: inline-block; font-size: .72rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: #fff; background: linear-gradient(135deg, #7c3aed, #22a7d1); border-radius: 999px; padding: .3rem .85rem; margin-bottom: .95rem; }
.lr-content .lr-lead { font-size: 1.2rem; line-height: 1.7; color: var(--theme-text, #1a1a2e); margin-bottom: 1.25rem; }
.lr-section { margin-top: 2.9rem; }
.lr-content .table { font-size: 1rem; }
.lr-content .table thead th { text-transform: uppercase; letter-spacing: .05em; font-size: .74rem; font-weight: 800; color: #fff; background: #7c3aed; padding: .7rem 1rem; }
.lr-content .table tbody td { padding: .6rem 1rem; border-bottom: 1px solid var(--theme-border, #e9ecef); vertical-align: top; }
.lr-content .table tbody td:first-child { font-weight: 700; color: var(--theme-text, #1a1a2e); white-space: nowrap; }
.lr-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1.5rem; }
.lr-pair-card { background: var(--theme-surface, #f8f9fa); border: 1px solid var(--theme-border, #e9ecef); border-radius: 12px; padding: 1rem 1.1rem; border-top: 3px solid var(--lr-accent, #7c3aed); }
.lr-pair-card h3 { margin-top: 0 !important; font-size: 1.02rem !important; }
.lr-pair-card p:last-child { margin-bottom: 0; font-size: .92rem; }
.lr-faq { margin-top: 1.4rem; }
.lr-faq .accordion-item { background: transparent; border: 0; border-bottom: 1px solid var(--theme-border, #e9ecef); }
.lr-faq .accordion-button { background: transparent; color: var(--theme-text, #1a1a2e); font-weight: 600; padding-left: 0; padding-right: 2.5rem; box-shadow: none; }
.lr-faq .accordion-button:not(.collapsed) { color: var(--lr-accent, #7c3aed); background: transparent; }
.lr-faq .accordion-button:focus { box-shadow: none; }
.lr-faq .accordion-body { padding-left: 0; color: var(--theme-muted, #5b6470); }
@media (max-width: 767.98px) { .lr-pair { grid-template-columns: 1fr; } }
body[data-theme="high-contrast"] .lr-content p, body[data-theme="high-contrast"] .lr-content li, body[data-theme="high-contrast"] .lr-content .lr-lead { color: rgba(255,255,255,.84); }
body[data-theme="high-contrast"] .lr-content h2, body[data-theme="high-contrast"] .lr-content h3 { color: #fff; }
