.rgbe-viz-svg-box {
  margin-top: 18px;
  padding: 16px;
  border-radius: var(--r-md, 18px);
  border: 1px solid rgba(255,255,255, .14);
  background: radial-gradient(85% 95% at 20% 0%, rgba(77,159,255, .10), transparent 70%), rgba(8,12,24, .95);
  box-shadow: inset 0 1px 0 rgba(255,255,255, .06);
}
.rgbe-viz-svg-box svg { width: 100%; height: auto; display: block; }

.rgbe-pal-preview {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
@media (max-width: 720px) { .rgbe-pal-preview { grid-template-columns: 1fr; } }
.rgbe-pal-mock {
  padding: 18px;
  border-radius: var(--r-md, 16px);
  border: 1px solid var(--border, rgba(255,255,255, .12));
  display: grid;
  gap: 12px;
}
.rgbe-pal-mock.is-dark { background: #07090f; color: #eef1f8; color-scheme: only dark; }
.rgbe-pal-mock.is-light { background: #f8fafc; color: #0f172a; border-color: rgba(15,23,42, .14); color-scheme: only light; }
.rgbe-pal-mock-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 18px;
  border-radius: 999px;
  font-size: .84rem;
  font-weight: 800;
  border: none;
  width: fit-content;
}
.rgbe-pal-wcag {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: .74rem;
  font-weight: 800;
}
.rgbe-pal-chip {
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid rgba(46,230,168, .44);
  background: rgba(46,230,168, .12);
  color: #2ee6a8;
}
.rgbe-pal-chip.is-fail {
  border-color: rgba(255,77,106, .44);
  background: rgba(255,77,106, .12);
  color: #ff8fa3;
}
.rgbe-pal-mock.is-light .rgbe-pal-chip { color: #047857; background: rgba(4,120,87, .1); border-color: rgba(4,120,87, .3); }
.rgbe-pal-mock.is-light .rgbe-pal-chip.is-fail { color: #be123c; background: rgba(190,18,60, .1); border-color: rgba(190,18,60, .3); }

.rgbe-era-rail {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
@media (max-width: 720px) {
  .rgbe-era-rail { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rgbe-era-rail > :last-child:nth-child(odd) { grid-column: 1 / -1; }
}
.rgbe-era-btn {
  padding: 13px 10px;
  border-radius: var(--r-md, 16px);
  border: 1px solid rgba(255,255,255, .14);
  background: rgba(9,14,26, .95);
  color: #d6dff0;
  font: inherit;
  font-size: .86rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.rgbe-era-btn.is-on {
  color: #fff;
  border-color: rgba(77,159,255, .62);
  background: rgba(37,99,235, .28);
}
.rgbe-era-panel {
  padding: 22px;
  border-radius: var(--r-md, 18px);
  border: 1px solid rgba(255,255,255, .14);
  background: radial-gradient(85% 95% at 50% 0%, rgba(61,139,255, .07), transparent 72%), rgba(9,14,26, .96);
  box-shadow: inset 0 1px 0 rgba(255,255,255, .07);
}
.rgbe-era-panel h3 { margin: 0 0 8px; font-size: 1.18rem; font-weight: 800; color: #f4f7fd; }
.rgbe-era-panel p { margin: 0; color: #cfd8ea; line-height: 1.88; font-size: .95rem; }
.rgbe-sisters-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}
@media (max-width: 780px) { .rgbe-sisters-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.rgbe-sister-pill {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 12px 14px;
  border-radius: var(--r-sm, 14px);
  border: 1px solid rgba(255,255,255, .12);
  background: rgba(9,14,26, .92);
  text-decoration: none;
  color: #eef1f8;
}
.rgbe-sister-pill:hover { border-color: rgba(46,230,168, .45); }
.rgbe-sister-pill strong { font-size: .88rem; font-weight: 800; color: #5cf2be; }
.rgbe-sister-pill span { font-size: .76rem; color: #a9b8d4; }

.rgbe-tm-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
@media (max-width: 960px) { .rgbe-tm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .rgbe-tm-grid { grid-template-columns: 1fr; } }
.rgbe-tm-card {
  padding: 16px;
  border-radius: var(--r-md, 16px);
  border: 1px solid rgba(255,255,255, .13);
  background: radial-gradient(85% 95% at 50% 0%, rgba(77,159,255, .07), transparent 72%), rgba(9,14,26, .94);
  box-shadow: inset 0 1px 0 rgba(255,255,255, .07);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
}
.rgbe-tm-top { display: flex; align-items: center; gap: 9px; }
.rgbe-tm-num {
  inline-size: 26px;
  block-size: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(77,159,255, .18);
  border: 1px solid rgba(77,159,255, .45);
  color: #93c5fd;
  font-size: .8rem;
  font-weight: 800;
  flex: none;
}
.rgbe-tm-top strong { font-size: .92rem; font-weight: 800; color: #f4f7ff; }
.rgbe-tm-card p { margin: 0; font-size: .82rem; color: #cfd8ea; line-height: 1.72; flex: 1; }
.rgbe-tm-card code {
  display: inline-block;
  padding: 4px 9px;
  border-radius: var(--r-xs, 8px);
  background: rgba(46,230,168, .09);
  border: 1px solid rgba(46,230,168, .28);
  color: #5cf2be;
  font-size: .72rem;
  width: fit-content;
}
.rgbe-tm-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; border-top: 1px solid rgba(255,255,255, .09); }
.rgbe-tm-sla { display: inline-flex; align-items: center; gap: 6px; font-size: .84rem; font-weight: 700; color: #5cf2be; }
.rgbe-pal-chip { display: inline-flex; align-items: center; gap: 4px; }

.rgbe-wf-bridge {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.rgbe-cwv-demo {
  margin-top: 14px;
  padding: 12px;
  border-radius: var(--r-sm, 12px);
  border: 1px solid rgba(255,255,255, .12);
  background: radial-gradient(85% 95% at 50% 0%, rgba(46,230,168, .06), transparent 72%), rgba(6,10,20, .92);
  box-shadow: inset 0 1px 0 rgba(255,255,255, .06);
  display: grid;
  gap: 10px;
  min-height: 112px;
  align-content: space-between;
}
.rgbe-cwv-race { display: grid; gap: 7px; }
.rgbe-cwv-lane {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  font-size: .76rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.rgbe-cwv-lane span.is-bad { color: #ff8fa3; }
.rgbe-cwv-lane span.is-good { color: #5cf2be; }
.rgbe-cwv-bar {
  height: 10px;
  border-radius: 999px;
  background: rgba(255,255,255, .08);
  overflow: hidden;
}
.rgbe-cwv-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #ff4d6a;
}
.rgbe-cwv-bar i.is-good { background: linear-gradient(90deg, #4d9fff, #2ee6a8); }
.rgbe-cwv-inp-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.rgbe-cwv-chip {
  flex: 1 1 110px;
  text-align: center;
  padding: 7px 8px;
  border-radius: var(--r-xs, 8px);
  border: 1px solid rgba(255,255,255, .12);
  font-size: .75rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.rgbe-cwv-chip.is-bad { border-color: rgba(255,77,106, .34); background: rgba(255,77,106, .1); color: #ffd0d9; }
.rgbe-cwv-chip.is-good { border-color: rgba(46,230,168, .38); background: rgba(46,230,168, .12); color: #b7fae0; }
.rgbe-cwv-chip.is-pulse { box-shadow: 0 0 0 3px rgba(46,230,168, .35); background: rgba(46,230,168, .28); }
.rgbe-cwv-chip.is-stall { opacity: .45; }
.rgbe-cwv-cls-stage {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.rgbe-cwv-cls-box {
  height: 54px;
  padding: 6px;
  border-radius: var(--r-xs, 8px);
  border: 1px solid rgba(255,255,255, .1);
  background: rgba(255,255,255, .03);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.rgbe-cls-ad {
  display: block;
  height: 0;
  border-radius: 4px;
  background: rgba(255,77,106, .55);
  transition: height .32s cubic-bezier(.4, 0, .2, 1);
}
.rgbe-cls-ad.is-shifted { height: 20px; }
.rgbe-cls-slot {
  display: block;
  height: 16px;
  border-radius: 4px;
  border: 1px dashed rgba(46,230,168, .4);
  background: rgba(46,230,168, .1);
}
.rgbe-cls-cta {
  display: block;
  text-align: center;
  padding: 3px 6px;
  border-radius: 6px;
  font-size: .72rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.rgbe-cls-cta.is-bad { background: rgba(255,77,106, .16); color: #ffb8c6; }
.rgbe-cls-cta.is-good { background: rgba(46,230,168, .16); color: #a7fae0; }
.rgbe-cwv-btn {
  width: 100%;
  min-height: 34px;
  font-size: .78rem;
  justify-content: center;
}

.rgbe-era-scrubber {
  position: relative;
  margin-bottom: 14px;
  padding: 6px 0;
}
.rgbe-era-track {
  height: 6px;
  border-radius: var(--r-pill, 999px);
  background: rgba(255,255,255, .08);
  border: 1px solid rgba(255,255,255, .1);
  overflow: hidden;
}
.rgbe-era-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff4d6a, #3d8bff 38%, #4d9fff 72%, #2ee6a8);
  width: 100%;
}
@media (prefers-reduced-motion: no-preference) {
  .rgbe-era-fill { transition: width .28s cubic-bezier(.22, 1, .36, 1); }
}
.rgbe-era-range {
  width: 100%;
  margin: 10px 0 0;
  accent-color: #4d9fff;
  cursor: pointer;
}
.rgbe-era-sub { font-size: .74rem; color: #a9b8d4; }
.rgbe-stack-box {
  margin-top: 18px;
  padding: 18px;
  border-radius: var(--r-md, 18px);
  border: 1px solid rgba(255,255,255, .12);
  background: radial-gradient(85% 90% at 15% 0%, rgba(77,159,255, .1), transparent 72%), rgba(7,11,22, .92);
  display: grid;
  gap: 14px;
}
.rgbe-stack-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.rgbe-stack-panel {
  display: grid;
  gap: 8px;
}
.rgbe-stack-panel h4 {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  color: #f4f7ff;
}
.rgbe-stack-panel p {
  margin: 0;
  font-size: .88rem;
  line-height: 1.75;
  color: #c2cee4;
}
.rgbe-stack-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 2px;
}
.rgbe-stack-chip {
  padding: 5px 11px;
  border-radius: var(--r-pill, 999px);
  border: 1px solid rgba(46,230,168, .28);
  background: rgba(46,230,168, .09);
  color: #b7fae0;
  font-size: .76rem;
  font-weight: 700;
}

html[data-theme="light"] .rgbe-viz-svg-box {
  border-color: rgba(17,19,24, .10);
  background: #FFFFFF;
  box-shadow: inset 0 1px 0 #ffffff, 0 4px 16px -8px rgba(17,19,24, .08);
}
html[data-theme="light"] .rgbe-viz-svg-box svg line[stroke="rgba(255,255,255,.06)"] { stroke: rgba(17,19,24, .09); }
html[data-theme="light"] .rgbe-viz-svg-box svg path[stroke="rgba(169,177,195,.48)"] { stroke: rgba(62,74,97, .42); }
html[data-theme="light"] .rgbe-viz-svg-box svg path[stroke="#2ee6a8"] { stroke: #0E8560; }
html[data-theme="light"] .rgbe-viz-svg-box svg circle[fill="#2ee6a8"] { fill: #0E8560; stroke: #FFFFFF; }
html[data-theme="light"] .rgbe-viz-svg-box svg circle[fill="rgba(46,230,168,.18)"] { fill: rgba(11,110,79, .15); }
html[data-theme="light"] .rgbe-viz-svg-box svg text[fill="#eef1f8"] { fill: #111318; }
html[data-theme="light"] .rgbe-viz-svg-box svg text[fill="#b8c5de"] { fill: #505867; }
html[data-theme="light"] .rgbe-viz-svg-box svg text[fill="#5cf2be"] { fill: #0B6E4F; }

html[data-theme="light"] .rgbe-pal-mock.is-dark {
  border-color: rgba(17,19,24, .20);
  box-shadow: 0 10px 26px -12px rgba(17,19,24, .26);
}
html[data-theme="light"] .rgbe-pal-mock.is-light {
  background: #FFFFFF;
  border-color: rgba(17,19,24, .12);
  box-shadow: 0 4px 14px -6px rgba(17,19,24, .08);
}

html[data-theme="light"] .rgbe-era-btn {
  border-color: rgba(17,19,24, .11);
  background: #FFFFFF;
  color: var(--text-2, #333945);
  box-shadow: 0 2px 8px -4px rgba(17,19,24, .05);
}
html[data-theme="light"] .rgbe-era-btn:hover {
  border-color: rgba(27,79,216, .34);
  background: #F4F5F7;
  color: var(--text, #111318);
}
html[data-theme="light"] .rgbe-era-btn.is-on {
  color: #ffffff;
  border-color: #1844BA;
  background: linear-gradient(135deg,#1B4FD8 0%,#1844BA 56%,#133696 100%);
  box-shadow: 0 8px 20px -8px rgba(24,68,186,.42);
}
html[data-theme="light"] .rgbe-era-sub { color: var(--text-3, #505867); }
html[data-theme="light"] .rgbe-era-btn.is-on .rgbe-era-sub { color: rgba(255,255,255, .86); }
html[data-theme="light"] .rgbe-era-panel {
  border-color: rgba(17,19,24, .10);
  background: #FFFFFF;
  box-shadow: var(--glass-shadow);
}
html[data-theme="light"] .rgbe-era-panel h3 { color: var(--text, #111318); }
html[data-theme="light"] .rgbe-era-panel p { color: var(--text-2, #333945); }
html[data-theme="light"] .rgbe-sister-pill {
  border-color: rgba(17,19,24, .10);
  background: #FAFAFB;
  color: var(--text, #111318);
}
html[data-theme="light"] .rgbe-sister-pill:hover {
  border-color: rgba(11,110,79, .36);
  background: #ECFDF5;
}
html[data-theme="light"] .rgbe-sister-pill strong { color: var(--green, #0B6E4F); }
html[data-theme="light"] .rgbe-sister-pill span { color: var(--text-3, #505867); }

html[data-theme="light"] .rgbe-tm-card {
  border-color: rgba(17,19,24, .10);
  background: #FFFFFF;
  box-shadow: 0 2px 10px -4px rgba(17,19,24, .06);
}
html[data-theme="light"] .rgbe-tm-num {
  background: #F4F5F7;
  border-color: rgba(27,79,216, .28);
  color: var(--blue, #1B4FD8);
}
html[data-theme="light"] .rgbe-tm-top strong { color: var(--text, #111318); }
html[data-theme="light"] .rgbe-tm-card p { color: var(--text-2, #333945); }
html[data-theme="light"] .rgbe-tm-card code {
  background: #ECFDF5;
  border-color: var(--green-bd, rgba(11,110,79, .28));
  color: var(--green, #0B6E4F);
}
html[data-theme="light"] .rgbe-tm-foot { border-top-color: rgba(17,19,24, .09); }
html[data-theme="light"] .rgbe-tm-sla { color: #0B6E4F; }

html[data-theme="light"] .rgbe-cwv-demo {
  border-color: rgba(17,19,24, .10);
  background: #F4F5F7;
}
html[data-theme="light"] .rgbe-cwv-lane span.is-bad { color: var(--red, #B91C3C); }
html[data-theme="light"] .rgbe-cwv-lane span.is-good { color: var(--green, #0B6E4F); }
html[data-theme="light"] .rgbe-cwv-bar { background: #E6E7EB; }
html[data-theme="light"] .rgbe-cwv-bar i { background: #B91C3C; }
html[data-theme="light"] .rgbe-cwv-bar i.is-good { background: linear-gradient(90deg, #1B4FD8, #0E8560); }
html[data-theme="light"] .rgbe-cwv-chip {
  border-color: rgba(17,19,24, .11);
  background: #FFFFFF;
  color: var(--text, #111318);
}
html[data-theme="light"] .rgbe-cwv-chip.is-bad {
  border-color: rgba(185,28,60, .28);
  background: #FFF1F2;
  color: var(--red, #B91C3C);
}
html[data-theme="light"] .rgbe-cwv-chip.is-good {
  border-color: rgba(11,110,79, .28);
  background: #ECFDF5;
  color: var(--green, #0B6E4F);
}
html[data-theme="light"] .rgbe-cwv-chip.is-pulse {
  box-shadow: 0 0 0 3px rgba(11,110,79, .26);
  background: #D1FAE5;
}
html[data-theme="light"] .rgbe-cwv-cls-box {
  border-color: rgba(17,19,24, .10);
  background: #FFFFFF;
}
html[data-theme="light"] .rgbe-cls-ad { background: rgba(185,28,60, .38); }
html[data-theme="light"] .rgbe-cls-slot {
  border-color: rgba(11,110,79, .44);
  background: #ECFDF5;
}
html[data-theme="light"] .rgbe-cls-cta.is-bad {
  background: #FFF1F2;
  color: var(--red, #B91C3C);
}
html[data-theme="light"] .rgbe-cls-cta.is-good {
  background: #ECFDF5;
  color: var(--green, #0B6E4F);
}

html[data-theme="light"] .rgbe-era-track {
  background: #E6E7EB;
  border-color: rgba(17,19,24, .10);
}
html[data-theme="light"] .rgbe-era-fill {
  background: var(--grad, linear-gradient(90deg, #B91C3C, #123082 38%, #1844BA 72%, #0B6E4F));
}
html[data-theme="light"] .rgbe-era-range { accent-color: #1844BA; }
html[data-theme="light"] .rgbe-stack-box {
  border-color: rgba(17,19,24, .10);
  background: #F4F5F7;
}
html[data-theme="light"] .rgbe-stack-panel h4 { color: var(--text, #111318); }
html[data-theme="light"] .rgbe-stack-panel p { color: var(--text-2, #333945); }
html[data-theme="light"] .rgbe-stack-chip {
  border-color: var(--green-bd, rgba(11,110,79, .28));
  background: #ECFDF5;
  color: var(--green, #0B6E4F);
}
