/* Two examples frame the real stages of the illustrated sales board.
   Cards occupy their own grid row; the illustration is never cropped. */
.ps-layout--crm {
    grid-template-columns: minmax(0, .8fr) minmax(0, 1.6fr);
    gap: clamp(26px, 3vw, 48px);
}
.crm-scene {
    --crm-ink: #17344c;
    --crm-muted: #5d6c77;
    position: relative;
    isolation: isolate;
    container-type: inline-size;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 20px;
    row-gap: 24px;
    width: 100%;
    max-width: min(760px, calc((var(--ppc-viewport, 100vh) - 410px) * 1.5));
    margin-inline: auto;
    color: var(--crm-ink);
    font-variant-numeric: tabular-nums;
}
.crm-scene__board {
    position: relative;
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    aspect-ratio: 3 / 2;
    margin: 0;
}
.crm-scene__board img { display: block; width: 100%; height: auto; object-fit: contain; }
.crm-scene__label {
    position: absolute;
    z-index: 1;
    display: block;
    width: 13%;
    text-align: center;
    transform: translate(-50%, -50%) skewY(-8.4deg);
    color: #fff;
    font-size: clamp(9px, 1.9cqw, 14px);
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0;
    white-space: nowrap;
    text-shadow: 0 1px 2px rgb(17 34 51 / 12%);
}
.crm-scene__label--new { left: 18.91%; top: 29.13%; }
.crm-scene__label--contact { left: 35.09%; top: 25.66%; }
.crm-scene__label--visit { left: 50.02%; top: 22.66%; }
.crm-scene__label--quote { left: 64.84%; top: 19.46%; color: #243e50; text-shadow: none; }
.crm-scene__label--won { left: 78.48%; top: 16.31%; color: #593908; text-shadow: none; }
.crm-label-phone { display: none; }
.crm-scene__connections { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.crm-scene__connections path { fill: none; stroke-width: 1.25; vector-effect: non-scaling-stroke; }
.crm-scene__lead-line { stroke: #a0b3bf; }
.crm-scene__won-line { stroke: #ccaa72; }
.crm-scene__connections circle { stroke-width: 1.5; vector-effect: non-scaling-stroke; fill: #fff; }
.crm-scene__lead-dot { stroke: #54758c; }
.crm-scene__won-dot { stroke: #be8124; }
.crm-opportunity {
    position: relative;
    z-index: 2;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 285px;
    padding: 18px 20px 16px;
    border: 1px solid #d9e2e6;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 4px 7px -5px rgb(17 34 51 / 14%), 0 16px 28px -23px rgb(17 34 51 / 30%);
    line-height: 1.35;
}
.crm-opportunity--new { grid-column: 1; justify-self: start; }
.crm-opportunity--won { grid-column: 2; justify-self: end; border-color: #d6e3dc; }
.crm-opportunity__state {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: #42647b;
    font-size: 13px;
    font-weight: 600;
}
.crm-opportunity__state-icon { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; color: #426b86; background: #edf3f6; font-size: 11px; }
.crm-opportunity--won .crm-opportunity__state { color: #216746; }
.crm-opportunity--won .crm-opportunity__state-icon { color: #287351; background: #eaf4ee; }
.crm-opportunity__customer { display: block; font-size: clamp(17px, 2.6cqw, 20px); font-weight: 600; letter-spacing: -.012em; }
.crm-opportunity .crm-opportunity__job { margin: 3px 0 14px; color: var(--crm-muted); font-size: 14px; }
.crm-opportunity__footer { display: flex; align-items: center; gap: 8px; min-height: 41px; margin-top: auto; padding-top: 11px; border-top: 1px solid #e8edef; color: var(--crm-muted); font-size: 13px; }
.crm-opportunity__source i { color: #6d899a; font-size: 12px; }
.crm-opportunity__value { justify-content: space-between; border-color: #e5eee8; }
.crm-opportunity__value strong { font-size: 23px; font-weight: 600; letter-spacing: -.02em; color: #17344c; }
.crm-opportunity__value span { color: #36734f; font-size: 12px; text-align: right; }

@media screen and (min-width: 601px) and (max-height: 800px) {
    .crm-scene { max-width: min(680px, calc((var(--ppc-viewport, 100vh) - 370px) * 1.5)); row-gap: 16px; }
    .crm-opportunity { padding: 14px 16px 12px; }
    .crm-opportunity__state { margin-bottom: 8px; }
    .crm-opportunity__state-icon { width: 21px; height: 21px; }
    .crm-opportunity__customer { font-size: 18px; }
    .crm-opportunity .crm-opportunity__job { font-size: 13px; margin-bottom: 10px; }
    .crm-opportunity__footer { min-height: 36px; padding-top: 8px; }
    .crm-opportunity__value strong { font-size: 22px; }
}

@media screen and (max-width: 1024px) {
    .ppc-panel--showcase-crm .ppc-mobile__points { display: none; }
    .crm-scene { max-width: 560px; gap: 20px 14px; }
    .crm-scene__board { grid-row: 1; width: 100%; }
    .crm-scene__connections { display: none; }
    .crm-scene__label { font-size: 13px; width: 15%; line-height: 1.05; white-space: normal; }
    .crm-opportunity { grid-row: 2; max-width: none; padding: 18px 16px; }
    .crm-opportunity__state { gap: 7px; margin-bottom: 14px; font-size: 14px; }
    .crm-opportunity__state-icon { width: 28px; height: 28px; font-size: 12px; }
    .crm-opportunity__customer { font-size: 20px; }
    .crm-opportunity .crm-opportunity__job { margin: 5px 0 16px; font-size: 15px; line-height: 1.45; }
    .crm-opportunity__footer { min-height: 84px; padding-top: 14px; font-size: 14px; line-height: 1.45; }
    .crm-opportunity__source { gap: 7px; }
    .crm-opportunity__source i { font-size: 14px; }
    .crm-opportunity__value { flex-direction: column; align-items: flex-start; justify-content: center; gap: 3px; }
    .crm-opportunity__value strong { font-size: 28px; }
    .crm-opportunity__value span { font-size: 14px; text-align: left; }
}
@media screen and (max-width: 600px) {
    .crm-scene { gap: 18px 12px; }
    .crm-label-wide { display: none; }
    .crm-label-phone { display: inline; }
    .crm-scene__label { font-size: clamp(10px, 3cqw, 13px); white-space: nowrap; }
    .crm-opportunity { padding: 16px 14px; }
    .crm-opportunity__customer { font-size: 18px; }
    .ppc-mobile--compact .crm-scene { gap: 12px; }
    .ppc-mobile--compact .crm-scene__board { max-width: 330px; justify-self: center; }
    .ppc-mobile--compact .crm-opportunity { padding: 12px; }
    .ppc-mobile--compact .crm-opportunity__state { margin-bottom: 10px; font-size: 13px; }
    .ppc-mobile--compact .crm-opportunity .crm-opportunity__job { margin-bottom: 12px; font-size: 14px; }
    .ppc-mobile--compact .crm-opportunity__footer { min-height: 68px; padding-top: 10px; font-size: 13px; }
    .ppc-mobile--compact .crm-opportunity__value strong { font-size: 26px; }
    .ppc-mobile--compact .crm-opportunity__value span { font-size: 13px; }
    .ppc-mobile--short .crm-scene { gap: 10px; }
    .ppc-mobile--short .crm-scene__board { max-width: 250px; }
    .ppc-mobile--short .crm-opportunity { padding: 10px; }
    .ppc-mobile--short .crm-opportunity__state { gap: 5px; margin-bottom: 8px; font-size: 12px; }
    .ppc-mobile--short .crm-opportunity__state-icon { width: 22px; height: 22px; flex-basis: 22px; }
    .ppc-mobile--short .crm-opportunity__customer { font-size: 17px; }
    .ppc-mobile--short .crm-opportunity .crm-opportunity__job { font-size: 13px; margin-bottom: 10px; }
    .ppc-mobile--short .crm-opportunity__footer { min-height: 62px; font-size: 12px; }
    .ppc-mobile--short .crm-opportunity__value strong { font-size: 24px; }
    .ppc-mobile--short .crm-opportunity__value span { font-size: 12px; }
}
@media screen and (max-width: 360px) {
    .crm-opportunity { padding: 14px 12px; }
    .crm-opportunity__state { gap: 6px; }
    .crm-opportunity__state-icon { width: 24px; height: 24px; flex: 0 0 24px; }
    .crm-opportunity__value strong { font-size: 26px; }
    .crm-opportunity__source { align-items: flex-start; }
    .crm-opportunity__source i { margin-top: 3px; }
}
@media screen and (max-height: 539px), print {
    .crm-scene { max-width: 600px; }
    .crm-scene__board { width: 100%; }
}
