/* p-solar-microgrid-controller-integration (mgc): PV + battery + genset site hero, control-layer stack, signal map, situation picker, offers, local grid. Prefix mgc-. */
.mgc-hero__art { position: relative; }
.mgc-art { aspect-ratio: 5 / 4; }
.mgc-band { position: relative; z-index: 1; margin: 32px 0 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border-radius: 16px; overflow: clip;
  border: 1px solid var(--line); background: #fff; box-shadow: 0 18px 40px -30px rgba(15, 39, 66, .5); }
.mgc-band > div { padding: 14px 16px; border-right: 1px dashed #CBD5E1; font: 500 13.5px/1.35 var(--font-ui); color: #334155; }
.mgc-band > div:last-child { border-right: 0; }
.mgc-band b { display: block; font: 700 12px/1.2 var(--font-ui); letter-spacing: .07em; text-transform: uppercase; color: #1E4F80; margin-bottom: 4px; }
.mgc-band > div:nth-child(2) b { color: #8A4B00; } .mgc-band > div:nth-child(3) b { color: #1F5A08; } .mgc-band > div:nth-child(4) b { color: #6B21A8; }
.mgc-band em { font-style: normal; font-size: 11.5px; padding: 1px 7px; border-radius: 999px; background: #E8F1FA; color: #1E4F80; margin-left: 6px; }
@media (max-width: 960px) { .mgc-band { grid-template-columns: repeat(2, minmax(0, 1fr)); } .mgc-band > div:nth-child(2) { border-right: 0; } .mgc-band > div:nth-child(-n+2) { border-bottom: 1px dashed #CBD5E1; } }
@media (max-width: 520px) { .mgc-band { grid-template-columns: 1fr; } .mgc-band > div { border-right: 0; border-bottom: 1px dashed #CBD5E1; } .mgc-band > div:last-child { border-bottom: 0; } }

/* fit: situation picker */
.mgc-pick__tabs { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.mgc-pick__tabs button { min-height: 44px; padding: 10px 16px; border-radius: 999px; border: 2px solid #CBD5E1; background: #fff; cursor: pointer;
  font: 600 14px/1.2 var(--font-ui); color: #334155; transition: border-color .2s, background .2s; }
.mgc-pick__tabs button:hover { border-color: #8A4B00; }
.mgc-pick__tabs button[aria-selected="true"] { border-color: #8A4B00; background: #FFF6E8; color: #5C3200; }
.mgc-pick__tabs button:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.mgc-pick__panel { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 24px; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 26px 28px; box-shadow: var(--shadow); }
.mgc-pick__panel[hidden] { display: none; }
.mgc-pick__panel h3 { margin: 0 0 10px; font-size: 21px; }
.mgc-pick__panel p { margin: 0; }
.mgc-pick__side { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; align-content: start; }
.mgc-pick__side li { padding: 12px 14px; border-radius: 12px; background: var(--paper); font-size: 14.5px; border-left: 4px solid #8A4B00; }
.mgc-pick__side b { display: block; font: 700 12px/1.2 var(--font-ui); letter-spacing: .06em; text-transform: uppercase; color: #5C3200; margin-bottom: 3px; }
@media (max-width: 860px) { .mgc-pick__panel { grid-template-columns: 1fr; } }

/* boundary: three-layer stack */
.mgc-stack { display: grid; gap: 14px; }
.mgc-layer { display: grid; grid-template-columns: 180px minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 20px 22px;
  border-left: 8px solid #236EB4; transition: transform .25s, box-shadow .25s; }
.mgc-layer:hover { transform: translateX(4px); box-shadow: var(--shadow); }
.mgc-layer--biz { border-left-color: #2B7A0B; } .mgc-layer--link { border-left-color: #8A4B00; } .mgc-layer--ctl { border-left-color: #1E4F80; }
.mgc-layer__name { font: 700 12px/1.3 var(--font-ui); letter-spacing: .07em; text-transform: uppercase; color: #475569; }
.mgc-layer__name strong { display: block; font: 700 19px/1.25 var(--font); letter-spacing: 0; text-transform: none; color: var(--ink); margin-top: 4px; }
.mgc-layer h3 { margin: 0 0 6px; font-size: 15px; font-family: var(--font-ui); color: #1E293B; }
.mgc-layer ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; font-size: 14.5px; }
.mgc-layer .ps-tag { display: table; margin-bottom: 6px; }
.mgc-arrow { text-align: center; font: 600 13px/1.3 var(--font-ui); color: #5C3200; }
@media (max-width: 900px) { .mgc-layer { grid-template-columns: 1fr; } }

/* signal map */
.mgc-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 40px; align-items: start; }
@media (max-width: 960px) { .mgc-split { grid-template-columns: 1fr; } }
.mgc-ticks { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 8px; }
.mgc-ticks li { position: relative; padding-left: 26px; font-size: 15px; }
.mgc-ticks li::before { content: ""; position: absolute; left: 2px; top: 5px; width: 12px; height: 12px; border-radius: 3px; background: #FFF0D6; border: 2px solid #8A4B00; }
.mgc-map { background: #fff; }
.mgc-map__body { padding: 16px 18px 18px; overflow-x: auto; }
.mgc-map__tbl { width: 100%; border-collapse: collapse; font: 500 13.5px/1.35 var(--font-ui); color: #334155; min-width: 460px; }
.mgc-map__tbl th, .mgc-map__tbl td { padding: 9px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.mgc-map__tbl thead th { font: 700 11.5px/1.2 var(--font-ui); letter-spacing: .06em; text-transform: uppercase; color: #475569; }
.mgc-map__tbl tbody th { color: var(--ink); font-weight: 700; }
.mgc-pill { display: inline-block; padding: 3px 9px; border-radius: 999px; font-weight: 700; font-size: 12px; white-space: nowrap; }
.mgc-pill.is-sum { background: #E8F1FA; color: #1E4F80; }
.mgc-pill.is-evt { background: #FDECEC; color: #9F1239; }
.mgc-pill.is-day { background: #E6F2DD; color: #1F5A08; }
.mgc-map__note { margin: 12px 0 0; font-size: 13px; color: #475569; }
.mgc-note { margin: 20px 0 0; font-size: 14.5px; color: #475569; }

/* offers */
.mgc-offers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; counter-reset: mgc; }
.mgc-offer { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 26px 24px 24px; border-top: 5px solid #1E4F80; transition: transform .25s, box-shadow .25s; }
.mgc-offer:nth-child(2) { border-top-color: #8A4B00; } .mgc-offer:nth-child(3) { border-top-color: #2B7A0B; }
.mgc-offer:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.mgc-offer__k { margin: 0 0 6px; font: 700 12px/1 var(--font-ui); letter-spacing: .08em; text-transform: uppercase; color: #1E4F80; }
.mgc-offer h3 { margin: 0 0 10px; font-size: 20px; }
.mgc-offer p:last-child { margin: 0; }
@media (max-width: 900px) { .mgc-offers { grid-template-columns: 1fr; } }

/* local */
.mgc-local { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.mgc-local > div { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 20px; border-bottom: 4px solid #236EB4; }
.mgc-local h3 { margin: 0 0 8px; font-size: 17px; }
.mgc-local p { margin: 0; font-size: 14.5px; }
@media (max-width: 1100px) { .mgc-local { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .mgc-local { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .mgc-offer, .mgc-layer, .mgc-pick__tabs button { transition: none; } }
