/* =========================================================
   BUILD YOUR SOLAR SYSTEM — v2 (uses tokens from style.css)
   ========================================================= */
.rb { display: grid; gap: 30px; }
.rb-head { text-align: center; max-width: 720px; margin: 0 auto; display: grid; gap: 12px; justify-items: center; }
.rb-head h2 { font-size: clamp(28px, 4vw, 44px); }
.rb-head p { color: var(--muted); font-size: 16.5px; }
.rb-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 26px; align-items: start; }

/* ---------- live stage ---------- */
.rb-stage { position: sticky; top: 92px; border-radius: 28px; overflow: hidden; border: 1px solid var(--line-strong); background: var(--bg-3); box-shadow: var(--shadow); }
.rb-scene { position: relative; aspect-ratio: 4 / 3; overflow: hidden;
  background: linear-gradient(180deg, #14244f 0%, #3b3a72 38%, #d9698a 62%, #ffb46b 80%, #ffd59a 100%); }
.rb-sun { position: absolute; width: 22%; aspect-ratio: 1; right: 12%; top: 16%; border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, #fff6d1, #ffd34d 45%, #ff8a1f 100%);
  box-shadow: 0 0 60px 18px rgba(255, 170, 60, .55); animation: rbSun 6s ease-in-out infinite; }
.rb-sun::before { content: ""; position: absolute; inset: -55%; border-radius: 50%;
  background: repeating-conic-gradient(rgba(255, 214, 120, .28) 0 5deg, transparent 5deg 20deg);
  mask-image: radial-gradient(circle, transparent 34%, #000 38%, transparent 70%); -webkit-mask-image: radial-gradient(circle, transparent 34%, #000 38%, transparent 70%);
  animation: spin 30s linear infinite; }
.rb.powered .rb-sun { box-shadow: 0 0 90px 30px rgba(255, 190, 70, .7); }
@keyframes rbSun { 50% { transform: translateY(-6px) scale(1.04); } }
.rb-hill { position: absolute; border-radius: 50%; }
.rb-hill.h1 { width: 90%; height: 40%; left: -20%; bottom: 8%; background: #2c6b45; }
.rb-hill.h2 { width: 100%; height: 42%; right: -30%; bottom: 4%; background: #357d4f; }
.rb-scene::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 18%; background: linear-gradient(#4caf5a, #2f8a44); }
.rb-tree { position: absolute; bottom: 14%; width: 13%; aspect-ratio: 1 / 1.4; z-index: 1;
  background: radial-gradient(circle at 50% 35%, #4cb86a 0 32%, transparent 33%), radial-gradient(circle at 30% 55%, #2f8a4f 0 28%, transparent 29%), radial-gradient(circle at 70% 55%, #2f8a4f 0 28%, transparent 29%), linear-gradient(#6b4226, #6b4226) 50% 100% / 12% 38% no-repeat;
  transform-origin: 50% 100%; animation: rbSway 4s ease-in-out infinite alternate; }
.rb-tree.t1 { left: 4%; } .rb-tree.t2 { right: 3%; width: 11%; animation-delay: -2s; }
@keyframes rbSway { from { transform: rotate(-2deg); } to { transform: rotate(2deg); } }

.rb-house { position: absolute; left: 50%; bottom: 13%; width: 62%; transform: translateX(-50%); z-index: 2; }
.rb-roof { position: relative; height: 0; padding-bottom: 30%; background: linear-gradient(#b5482c, #8e3520);
  clip-path: polygon(8% 100%, 92% 100%, 80% 0, 20% 0); }
.rb-roof::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, rgba(0,0,0,.12) 0 2px, transparent 2px 9%); pointer-events: none; }
.rb-panels { position: absolute; left: 17%; right: 17%; top: 10%; bottom: 8%; display: grid; grid-template-columns: repeat(6, 1fr); grid-template-rows: repeat(4, 1fr); gap: 3px; z-index: 1;
  transform: perspective(500px) rotateX(18deg); transform-origin: 50% 100%; }
.rb-tile { border-radius: 2px; border: 1px solid #c9d3e3; background:
  linear-gradient(90deg, transparent 32%, rgba(160, 190, 255, .45) 33%, transparent 34%, transparent 66%, rgba(160, 190, 255, .45) 67%, transparent 68%),
  linear-gradient(160deg, #2a5fd0, #0d2a6e); position: relative; overflow: hidden; box-shadow: 0 2px 4px rgba(0,0,0,.35); }
.rb-tile::after { content: ""; position: absolute; inset: -40%; background: linear-gradient(115deg, transparent 40%, rgba(255, 236, 180, .55) 50%, transparent 60%); transform: translateX(-70%); animation: rbShine 4s ease-in-out infinite; animation-delay: calc(var(--i, 0) * 60ms); }
@keyframes rbShine { 0%, 55% { transform: translateX(-70%); } 85%, 100% { transform: translateX(70%); } }
.rb-tile.drop { animation: rbDrop .55s cubic-bezier(.3, 1.4, .5, 1) both; animation-delay: calc(var(--i, 0) * 70ms); }
@keyframes rbDrop { from { transform: translateY(-160%) scale(1.2); opacity: 0; } to { transform: none; opacity: 1; } }
.rb-more { position: absolute; right: 3%; top: -26%; z-index: 3; font-size: 12px; font-weight: 700; color: #1a0a00; background: var(--sun); padding: 3px 9px; border-radius: 999px; }
.rb-more:empty { display: none; }
.rb-wall { position: relative; height: 0; padding-bottom: 34%; background: linear-gradient(#f4e7cf, #e8d6b4); margin: 0 10%; }
.rb-win, .rb-door, .rb-inv { position: absolute; }
.rb-win { width: 18%; height: 34%; top: 22%; background: #ffd27a; border: 3px solid #7a5233; border-radius: 3px; box-shadow: 0 0 14px rgba(255, 200, 100, .6); }
.rb-win.w1 { left: 10%; } .rb-win.w2 { right: 10%; }
.rb-door { width: 15%; height: 55%; bottom: 0; left: 42.5%; background: #8a4b2a; border-radius: 3px 3px 0 0; }
.rb-inv { width: 9%; height: 26%; right: 30%; top: 26%; background: #eef2f8; border-radius: 3px; border: 1px solid #b8c2d3; opacity: .25; transition: opacity .4s; }
.rb-inv::after { content: ""; position: absolute; left: 20%; right: 20%; top: 18%; height: 22%; background: #2b2f36; border-radius: 1px; transition: background .4s, box-shadow .4s; }
.rb-inv.on { opacity: 1; }
.rb-inv.on::after { background: #5ef09a; box-shadow: 0 0 8px #5ef09a; }
.rb-flow { position: absolute; z-index: 3; left: 64%; top: 47%; width: 3px; height: 14%; opacity: 0; transition: opacity .5s;
  background: repeating-linear-gradient(180deg, #ffd34d 0 6px, transparent 6px 14px); background-size: 100% 28px; animation: rbFlow .7s linear infinite; filter: drop-shadow(0 0 4px #ffd34d); }
.rb.powered .rb-flow { opacity: 1; }
@keyframes rbFlow { to { background-position: 0 28px; } }
.rb-empty { position: absolute; left: 50%; top: 10%; transform: translateX(-50%); z-index: 4; padding: 8px 14px; border-radius: 999px; background: rgba(5, 9, 20, .65); backdrop-filter: blur(6px); color: #fff; font-size: 13px; font-weight: 600; white-space: nowrap; border: 1px solid rgba(255,255,255,.15); }

.rb-stats { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; border-top: 1px solid var(--line); }
.rb-stat { padding: 14px 10px; text-align: center; display: grid; gap: 2px; }
.rb-stat + .rb-stat { border-left: 1px solid var(--line); }
.rb-stat b { font-family: var(--ff-display); font-size: 22px; font-variant-numeric: tabular-nums; }
.rb-stat.main b { font-size: 30px; background: var(--sun); -webkit-background-clip: text; background-clip: text; color: transparent; }
.rb-stat span { font-size: 12px; color: var(--muted); }

/* ---------- wizard ---------- */
.rb-wizard { display: grid; gap: 16px; }
.rb-progress { list-style: none; display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; position: relative; }
.rb-progress::before { content: ""; position: absolute; left: 7%; right: 7%; top: 15px; height: 2px; background: var(--line); }
.rb-progress li { position: relative; }
.rb-progress button { width: 100%; display: grid; justify-items: center; gap: 6px; color: var(--dim); font-size: 11px; font-weight: 600; }
.rb-progress button:disabled { cursor: default; }
.rb-dot { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-3); border: 2px solid var(--line-strong); font-size: 13px; font-weight: 700; color: var(--muted); transition: all .35s var(--ease); position: relative; }
.rb-progress li.ok .rb-dot { background: rgba(94, 240, 154, .15); border-color: #5ef09a; color: #5ef09a; }
.rb-progress li.ok button { color: var(--muted); }
.rb-progress li.cur .rb-dot { background: var(--sun); border-color: transparent; color: #1a0a00; box-shadow: var(--glow-o); transform: scale(1.12); }
.rb-progress li.cur button { color: var(--text); }
.rb-stepname { text-align: center; line-height: 1.2; }

.rb-card { border-radius: 26px; border: 1px solid var(--line-strong); background: radial-gradient(circle at 100% 0%, rgba(255, 122, 24, .12), transparent 50%), var(--bg-3); box-shadow: var(--shadow); padding: 26px; min-height: 360px; }
.rb-cardin { display: grid; gap: 14px; }
.rb-cardin.anim { animation: rbIn .5s var(--ease); }
@keyframes rbIn { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
.rb-stepof { font-size: 12px; font-weight: 700; letter-spacing: .16em; color: var(--gold); }
.rb-card h3 { font-size: 23px; }
.rb-hint { color: var(--muted); font-size: 14px; margin-top: -6px; }
.rb-label { font-size: 12.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
html[lang="hi"] .rb-label, html[lang="hi"] .rb-stepof { letter-spacing: 0; }
.rb-opts { display: flex; flex-wrap: wrap; gap: 10px; }
.rb-opts.brands { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.rb-opts.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }

.rb-brand, .rb-pcard { position: relative; display: grid; gap: 4px; justify-items: start; text-align: left; border-radius: 18px; border: 1.5px solid var(--line-strong); background: rgba(255, 255, 255, .03); color: var(--text); overflow: hidden; transition: transform .3s var(--ease), border-color .3s, box-shadow .3s; }
.rb-brand { padding: 0 0 14px; }
.rb-brand:hover, .rb-pcard:hover { transform: translateY(-4px); border-color: var(--gold); }
.rb-brand.on, .rb-pcard.on { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(255, 122, 24, .2), 0 16px 34px -18px rgba(255, 122, 24, .7); }
.rb-brand-img { width: 100%; height: 86px; object-fit: contain; background: #fff; padding: 8px; margin-bottom: 8px; }
.rb-brand-name { font-family: var(--ff-display); font-weight: 800; font-size: 20px; letter-spacing: .05em; padding: 0 14px; }
.rb-brand-sub { font-size: 12px; color: var(--muted); padding: 0 14px; }
.rb-pcard { padding: 0 0 12px; }
.rb-pimg { width: 100%; height: 96px; object-fit: contain; background: #fff; padding: 8px; margin-bottom: 8px; }
.rb-pimg[src*="product-structure"] { object-fit: cover; padding: 0; }
.rb-pname { font-weight: 700; font-size: 16px; padding: 0 12px; }
.rb-psub { font-size: 12px; color: var(--muted); padding: 0 12px; }
.rb-check { position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 800; background: var(--sun); color: #1a0a00; transform: scale(0); transition: transform .35s cubic-bezier(.3, 1.6, .5, 1); }
.on > .rb-check { transform: scale(1); }

.rb-pill { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 14px; border: 1.5px solid var(--line-strong); background: rgba(255, 255, 255, .03); color: var(--text); font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums; transition: all .25s var(--ease); }
.rb-pill.sm { padding: 7px 13px; font-size: 13.5px; border-radius: 11px; }
.rb-pill:hover { border-color: var(--gold); }
.rb-pill.on { border-color: var(--orange); background: rgba(255, 122, 24, .16); }
.rb-mini-panel { width: 14px; height: 18px; border-radius: 2px; border: 1px solid #c9d3e3; background: linear-gradient(90deg, transparent 45%, rgba(160,190,255,.5) 46%, transparent 54%), linear-gradient(160deg, #2a5fd0, #0d2a6e); }

.rb-panelstep, .rb-count { display: grid; gap: 12px; }
.rb-count { padding: 16px; border-radius: 18px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); animation: rbIn .45s var(--ease); }
.rb-stepper { display: flex; align-items: center; gap: 14px; }
.rb-sbtn { width: 52px; height: 52px; border-radius: 16px; font-size: 26px; font-weight: 700; color: var(--text); background: rgba(255, 255, 255, .06); border: 1.5px solid var(--line-strong); transition: all .2s; }
.rb-sbtn:hover { border-color: var(--gold); }
.rb-sbtn.plus { background: var(--sun); color: #1a0a00; border-color: transparent; box-shadow: var(--glow-o); }
.rb-sbtn:active { transform: scale(.92); }
.rb-cnum { min-width: 64px; text-align: center; font-family: var(--ff-display); font-size: 38px; font-weight: 800; }
.rb-quick { display: flex; flex-wrap: wrap; gap: 8px; }
.rb-qchip { width: 44px; height: 36px; border-radius: 10px; border: 1px solid var(--line-strong); color: var(--muted); font-weight: 700; }
.rb-qchip.on, .rb-qchip:hover { color: var(--text); border-color: var(--orange); }
.rb-calc { font-size: 16px; color: var(--muted); }
.rb-calc b { font-family: var(--ff-display); font-size: 22px; color: var(--gold); }

.rb-extras { display: grid; gap: 10px; }
.rb-extra { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: 16px; border: 1px solid var(--line); background: rgba(255, 255, 255, .03); transition: border-color .3s; }
.rb-extra.on { border-color: rgba(94, 240, 154, .5); }
.rb-ximg { width: 64px; height: 64px; flex: none; object-fit: contain; background: #fff; border-radius: 12px; padding: 4px; }
.rb-xbody { display: grid; gap: 6px; min-width: 0; }
.rb-xname { font-weight: 700; font-size: 14px; }
.rb-note { font-size: 12.5px; color: var(--dim); }

.rb-nav { display: flex; justify-content: space-between; gap: 12px; }
.rb-nav .btn-primary { margin-left: auto; }
.rb-nav .btn:disabled { opacity: .4; cursor: not-allowed; transform: none; box-shadow: none; }

.rb-summary { display: grid; gap: 16px; }
.rb-list { list-style: none; display: grid; gap: 8px; font-size: 14px; }
.rb-list li { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 7px; border-bottom: 1px dashed var(--line); }
.rb-list li span { color: var(--muted); flex: none; }
.rb-list li b { text-align: right; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.rb-price { display: grid; gap: 10px; padding: 18px; border-radius: 20px; background: #0a142b; border: 1px solid var(--line-strong); animation: rbIn .5s var(--ease); }
.rb-prow { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.rb-prow b { font-family: var(--ff-display); font-size: 20px; white-space: nowrap; }
.rb-prow b.green { color: #5ef09a; }
.rb-prow small { color: var(--dim); font-size: 12px; }
.rb-prow.big b { font-size: clamp(28px, 3vw, 38px); }
.rb-prow.net { padding: 12px 14px; border-radius: 14px; background: rgba(255, 181, 46, .1); border: 1px solid rgba(255, 181, 46, .35); }
.rb-prow.net b { color: var(--gold); font-size: 24px; }
.rb-onreq { color: var(--text); font-size: 15px; }
.rb-reset { justify-self: center; color: var(--muted); font-size: 13px; font-weight: 600; padding: 6px 12px; border-radius: 8px; }
.rb-reset:hover { color: var(--text); background: var(--card); }

@media (max-width: 980px) {
  .rb-grid { grid-template-columns: 1fr; }
  .rb-stage { position: relative; top: 0; }
}
@media (max-width: 680px) {
  .rb-opts.brands { grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
  .rb-brand-img { height: 60px; }
  .rb-brand-name { font-size: 15px; padding: 0 10px; }
  .rb-brand-sub { font-size: 11px; padding: 0 10px; }
  .rb-opts.cards { grid-template-columns: 1fr 1fr; }
  .rb-card { padding: 18px 14px; min-height: 0; }
  .rb-card h3 { font-size: 19px; }
  .rb-stepname { display: none; }
  .rb-progress::before { top: 15px; }
  .rb-stats { grid-template-columns: 1fr 1fr; }
  .rb-stat:nth-child(3) { border-left: 0; }
  .rb-stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .rb-empty { font-size: 11.5px; white-space: normal; text-align: center; width: 80%; }
}
@media (prefers-reduced-motion: reduce) {
  .rb-tile.drop, .rb-cardin.anim, .rb-count, .rb-price { animation: none; }
}
/* company card art: three panels (no brand photo, so no wrong logo) */
.rb-brand-art { width: 100%; height: 86px; margin-bottom: 8px; display: flex; justify-content: center; align-items: flex-end; gap: 6px; padding: 12px 10px 10px;
  background: radial-gradient(circle at 80% 10%, rgba(255, 200, 90, .55), transparent 45%), linear-gradient(180deg, #23366f, #101c3c); }
.rb-brand-art i { width: 22%; height: 100%; border-radius: 3px; border: 1.5px solid #c9d3e3; transform: perspective(200px) rotateX(18deg);
  background: linear-gradient(90deg, transparent 32%, rgba(160,190,255,.5) 33%, transparent 35%, transparent 65%, rgba(160,190,255,.5) 66%, transparent 68%),
              repeating-linear-gradient(180deg, transparent 0 22%, rgba(160,190,255,.45) 22% 24%), linear-gradient(160deg, #2a5fd0, #0d2a6e); }
.rb-brand:hover .rb-brand-art i { animation: rbBob .8s ease-in-out infinite alternate; }
.rb-brand:hover .rb-brand-art i:nth-child(2) { animation-delay: .15s; }
.rb-brand:hover .rb-brand-art i:nth-child(3) { animation-delay: .3s; }
@keyframes rbBob { to { transform: perspective(200px) rotateX(18deg) translateY(-5px); } }
@media (max-width: 680px) { .rb-brand-art { height: 60px; padding: 8px 6px 6px; gap: 4px; } }
.rb-panels { grid-template-columns: repeat(var(--cols, 6), 1fr); grid-template-rows: repeat(var(--rows, 4), 1fr); transition: all .4s var(--ease); }
.rb-miniroof { display: none; }
@media (max-width: 980px) {
  .rb-miniroof { display: flex; flex-wrap: wrap; gap: 4px; padding: 10px; border-radius: 12px; background: linear-gradient(#b5482c, #8e3520); }
  .rb-miniroof .rb-mini-panel { width: 18px; height: 24px; animation: rbDrop .4s cubic-bezier(.3, 1.4, .5, 1) both; }
}
