.rcs-onboarding { padding: clamp(48px,5vw,76px) var(--site-gutter); background: var(--ivory); color: var(--ink-deep); }
.rcs-onboarding__inner { width: min(var(--site-content-width),100%); margin-inline: auto; }
.rcs-onboarding__heading { display: grid; grid-template-columns: minmax(0,3fr) minmax(0,2fr); align-items: end; gap: 24px; margin-bottom: 44px; }
.rcs-onboarding__heading h2 { text-wrap: balance; max-width: 19ch; margin: 0; font-size: var(--product-heading-size); line-height: 1.1; letter-spacing: -.035em; }
.rcs-onboarding__heading p { max-width: 52ch; margin: 14px 0 0; color: var(--muted); font-size: 16px; line-height: 1.65; }
.rcs-onboarding__steps { --step-gap: 32px; --step-count: 4; position: relative; display: grid; grid-template-columns: repeat(var(--step-count),minmax(0,1fr)); gap: var(--step-gap); list-style: none; margin: 0; padding: 0 0 49px; }
.rcs-onboarding__step { position: relative; display: grid; grid-template-rows: subgrid; grid-row: span 3; row-gap: 14px; min-height: 252px; padding: 28px clamp(16px,2vw,28px) 30px; border-radius: 14px; background: #fff; }
.rcs-onboarding__cta { justify-self: end; }
.rcs-onboarding__diagram { grid-area: 1 / 1; place-self: start end; width: 40px; height: 40px; color: #4268ad; }
.rcs-onboarding__copy { display: contents; }
.rcs-onboarding__copy h3 { text-wrap: balance; grid-row: 2; align-self: end; margin: 0; font-size: clamp(20px,1.9vw,27px); line-height: 1.2; letter-spacing: -.02em; }
.rcs-onboarding__copy p { grid-row: 3; margin: 0; color: var(--muted); font-size: 15px; line-height: 1.6; }
.rcs-onboarding__number { grid-column: 1; grid-row: 1; align-self: stretch; min-height: 72px; letter-spacing: .08em; color: #2355ba; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.rcs-onboarding__step::before { content: ''; position: absolute; left: calc(50% - 4px); bottom: -23px; width: 8px; height: 8px; border-radius: 50%; background: #8da9e0; z-index: 1; }
.rcs-onboarding__steps::before { content: ''; position: absolute; inset-inline: calc(50% / var(--step-count)); bottom: 30px; height: 1px; background: #b6c8eb; }
.rcs-onboarding__step[aria-current="step"]::before { background: var(--blue-text); outline: 3px solid #dbe7ff; }
@media (prefers-reduced-motion: no-preference) { .rcs-onboarding__step::before { transition: background-color 220ms ease, outline-color 220ms ease; } }
@media (max-width: 760px) {
 .rcs-onboarding__heading { grid-template-columns: 1fr; gap: 12px; }
 .rcs-onboarding__steps { grid-template-columns: 1fr; padding: 0 0 0 24px; }
 .rcs-onboarding__step { min-height: 0; grid-row: auto; grid-template-rows: auto; grid-template-columns: 24px minmax(0,1fr); column-gap: 10px; padding: 16px; }
 .rcs-onboarding__number { grid-row: 1; grid-column: 1; align-self: center; min-height: 0; border: 0; padding: 0; }
 .rcs-onboarding__cta { justify-self: start; }
 .rcs-onboarding__diagram { grid-area: 1 / 2; width: 32px; height: 32px; }
 .rcs-onboarding__copy h3 { text-wrap: balance; grid-column: 2; grid-row: 2; }
 .rcs-onboarding__copy p { grid-column: 2; grid-row: 3; }
 .rcs-onboarding__step::before { left: -21px; top: calc(50% - 4px); bottom: auto; }
 .rcs-onboarding__steps::before { inset: 32px auto 32px 6px; width: 2px; height: auto; background: #b6c8eb; }
}
.rcs-onboarding__step[aria-current="step"] { background: #e4edff; transform: scale(1.035); transform-origin: center calc(100% + 19px); z-index: 1; }
@media (max-width: 760px) { .rcs-onboarding__step[aria-current="step"] { transform: scale(1.02); transform-origin: -17px center; } }
@media (prefers-reduced-motion: no-preference) { .rcs-onboarding__step { transition: transform 340ms cubic-bezier(.22,1,.36,1),background-color 240ms ease; } }

@media (prefers-reduced-motion: no-preference) {
 .rcs-onboarding__step { transition: transform 560ms cubic-bezier(.22,1,.36,1), background-color 420ms ease; }
}


.rcs-preview .chat-shell::after { content:"";position:absolute;bottom:8px;left:calc(50% - 32px);width:64px;height:3px;border-radius:4px;background:#9cabc2; }
.rcs-preview .chat-feed::-webkit-scrollbar { display:none; }

.rcs-preview .rcs-phone-status { position:absolute;inset:7px 16px auto;display:flex;justify-content:space-between;align-items:center;height:15px;color:#f1f5ff;font-size:11px;font-weight:650;font-variant-numeric:tabular-nums;pointer-events:none; }
.rcs-preview .chat-shell>.rcs-phone-contact { display:flex;align-items:center;gap:8px;padding:6px 10px;border-bottom:1px solid #2d405e; }
.rcs-phone-back { flex:none;color:#a9c8ff; }
.rcs-phone-avatar { flex:0 0 28px;height:28px;display:grid;place-items:center;border-radius:50%;background:#285dbb;color:#fff; }
.rcs-phone-name { min-width:0;line-height:1.15; }
.rcs-phone-name strong,.rcs-phone-name small { display:block; }
.rcs-phone-name strong { font-size:12px; }
.rcs-phone-name small { margin-top:3px;color:#b9c9e4;font-size:10px; }

/* One continuous screen inside a slim, separate hardware rim. */
.rcs-preview .chat-shell {
 --phone-screen: #111d33;
 padding: 37px 7px 20px;
 border-color: #8493a9;
 border-radius: 38px;
 background: var(--phone-screen);
 box-shadow: inset 0 0 0 2px #26354c, inset 0 0 0 5px #080e1a, 0 20px 42px -14px #0009;
}
.rcs-preview .chat-shell::before { top: 12px; width: 69px; height: 17px; left: calc(50% - 34.5px); }
.rcs-preview .rcs-phone-status { inset: 11px 21px auto; height: 19px; }
.rcs-preview .chat-shell>.rcs-phone-contact { padding: 8px 11px 10px; background: var(--phone-screen); border-color: #273650; }
.rcs-preview .chat-feed { background: var(--phone-screen); mask-image: linear-gradient(to bottom,transparent,#000 10px); }
.rcs-preview .chat-shell::after { bottom: 9px; background: #c1ccdc; }
.rcs-preview .rcs-phone-status::before,.rcs-preview .rcs-phone-status::after { content:'';position:absolute;width:2px;background:#8290a6;border-radius:3px;pointer-events:none; }
.rcs-preview .rcs-phone-status::before { left:-23px;top:69px;height:31px;box-shadow:0 37px #8290a6; }
.rcs-preview .rcs-phone-status::after { right:-23px;top:90px;height:42px; }

.rcs-preview .route { align-items:start; }
.rcs-preview .route i { align-self:start; margin-top:clamp(10px,1vw,15px); }
.rcs-preview .route > div:last-child { text-align:right; }
.rcs-preview .ticket { background:#2458be; }
.rcs-preview .ticket :is(.details,.stub) { background:#f8faff; }
.rcs-preview .chat-highlight { top:86px; width:min(220px,86%); padding:12px 15px; background:#2458be; border-color:#8db4ff; font-size:15px; box-shadow:0 12px 30px #0006; }
.rcs-preview .chat-highlight small { margin-top:3px; color:#edf4ff; }
@media(min-width:1150px) {
 .rcs-preview .chat-highlight { right:-92px; }
}


.rcs-preview .card:has(> .media) { background:#19366f; }
.rcs-preview .card:has(> .media) > .details { background:#f8faff; }
.rcs-preview .meal-image img { display:block;width:100%;height:68px;object-fit:cover; }


.rcs-preview { position:relative; }
.rcs-preview__badges { display:flex; justify-content:center; flex-wrap:wrap; gap:8px; margin-top:12px; }
.rcs-preview__badge { display:inline-flex; align-items:center; gap:7px; padding:5px 10px 5px 5px; border-radius:9px; background:var(--ivory); color:var(--ink); font-size:11px; font-weight:650; line-height:1.3; }
.rcs-preview__badge > span { display:grid; place-items:center; flex:0 0 24px; height:24px; border-radius:6px; background:#e2ebff; color:#2458be; }
.rcs-preview__badge--sender > span { background:#e1f3eb; color:#177650; }
.rcs-preview__badge svg { width:14px; height:14px; }
@media(min-width:1440px) {
 .rcs-preview__badges { margin:0; }
 .rcs-preview__badge { position:absolute; z-index:1; white-space:nowrap; box-shadow:0 8px 24px #0003; }
 .rcs-preview__badge--sender { top:24%; right:calc(100% - 28px); }
 .rcs-preview__badge--media { bottom:14%; left:calc(100% - 24px); }
}

.rcs-preview .chat-feed { height:clamp(382px,calc(62svh - 38px),512px); border-radius:0; }
.rcs-preview .rcs-composer { display:flex; align-items:center; gap:10px; height:32px; margin:0 8px 6px; padding:0 9px; border:1px solid #354762; border-radius:17px; background:#1b2942; color:#c1cee4; font-size:11px; }
.rcs-preview .rcs-composer span { flex:1; }
.rcs-preview .rcs-composer svg { width:15px; height:15px; fill:none; stroke:currentColor; stroke-width:1.6; stroke-linecap:round; }
.rcs-preview .chat-highlight { background:var(--ivory); border-color:#c7d8f3; color:var(--ink); }
.rcs-preview .chat-highlight small { color:#475569; }
@media(min-width:1280px) { .rcs-preview .chat-highlight { right:-146px; } }

/* Labels and notices sit outside the device, with a clear gap from its edge. */
.rcs-preview .chat-highlight {
 top:auto; bottom:-58px; right:8px; width:max-content; max-width:calc(100% - 16px);
 border:1px solid #a8c4f5; border-radius:10px; background:#dce9ff;
 box-shadow:0 8px 20px #0003;
}
.rcs-preview .chat-shell { margin-bottom:64px; }
@media(min-width:1440px) {
 .rcs-preview .chat-shell { margin-bottom:0; }
 .rcs-preview__badge--sender { right:calc(100% + 14px); }
 .rcs-preview__badge--media { left:calc(100% + 14px); }
 .rcs-preview .chat-highlight { top:86px; bottom:auto; left:calc(100% - 30px); right:auto; max-width:none; z-index:3; }
}
@media(prefers-reduced-motion:no-preference) {
 .rcs-preview .chat-shell.is-playing .chat-highlight { animation-name:rcs-notice-outside; }
 @keyframes rcs-notice-outside {
  0%,100% { visibility:hidden; transform:translateY(4px); }
  1%,99% { visibility:visible; transform:none; }
 }
}

/* Light messaging UI inside the existing dark device frame. */
.rcs-preview .chat-shell > .rcs-phone-contact {
 background:#f8faff;
 color:var(--ink);
 border-color:#dce4ef;
}
.rcs-preview .rcs-phone-back { color:#2458be; }
.rcs-preview .rcs-phone-name small { color:#52637e; }
.rcs-preview .chat-feed { background:#edf2f8; color:var(--ink); mask-image:none; }
.rcs-preview .bubble:not(.out) { background:#dfe7f1; color:var(--ink); }
.rcs-preview .rcs-composer { background:#f8faff; border-color:#d1dbe9; color:#52637e; }

/* Keep the light screen continuous, including the system bars. */
.rcs-preview .chat-shell { background:#edf2f8; }
.rcs-preview .rcs-phone-status { color:var(--ink); }
.rcs-preview .chat-shell::after { background:#25344c; }

/* Continuous system chrome with a distinct conversation canvas. */
.rcs-preview .chat-shell { background:#fff; }
.rcs-preview .chat-shell > .rcs-phone-contact { background:#fff; border-radius:0; border-color:#d3deeb; }
.rcs-preview .chat-feed { background:#e5edf6; }
.rcs-preview .bubble:not(.out) { background:#fff; box-shadow:0 1px 2px #20395d1c; }
.rcs-preview .chat-messages > .card:not(:has(> .media)),.rcs-preview .meal-cards .card,
.rcs-preview .card:has(> .media) > .details,.rcs-preview .ticket :is(.details,.stub) { background:#fff; }
.rcs-preview .rcs-composer { margin-top:6px; }

.rcs-onboarding__step:not(:last-child)::after { content:''; position:absolute; right:calc(var(--step-gap) / -2 - 5px); top:50%; width:10px; height:12px; background:#3c79e9; clip-path:polygon(0 0,100% 50%,0 100%); transform:translateY(-50%); }
.rcs-onboarding__copy h3 { text-wrap: balance; overflow-wrap:break-word; }
@media(max-width:760px) {
 .rcs-onboarding__step:not(:last-child)::after { right:auto; top:auto; left:50%; bottom:calc(var(--step-gap) / -2 - 6px); transform:translateX(-50%) rotate(90deg); }
}
