/* ASTRA Explorer section — matches the template's dark, glassy look */
.astra-explorer { position: relative; }
.astra-explorer__head { max-width: 62rem; margin-bottom: 2.5rem; }
.astra-explorer__eyebrow { color: #ffb829; }
.astra-explorer__panel {
  position: relative;
  border-radius: 1.6rem;
  background: rgba(10, 10, 14, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.11);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  box-shadow: 0 32px 64px -16px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  padding: 1.6rem;
}
.astra-chips { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-bottom: 1.4rem; }
.astra-chip {
  font: inherit; font-size: 13px; font-weight: 600; letter-spacing: 0.04em;
  color: #bdbdbd; background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 999px;
  padding: 7px 14px; cursor: pointer;
  transition: color .3s, background-color .3s, border-color .3s, box-shadow .3s, transform .3s cubic-bezier(.215,.61,.355,1);
}
.astra-chip:hover { color: #fff; border-color: rgba(255, 255, 255, 0.35); transform: translateY(-1px); }
.astra-chip[aria-pressed="true"] { color: #fff; background: #8052ff; border-color: #9b74ff; box-shadow: 0 6px 20px -4px rgba(128, 82, 255, 0.55); }
.astra-chip:first-child { margin-right: 0.6rem; }
.astra-chip:focus-visible, .astra-legend__item:focus-visible { outline: 2px solid #ffb829; outline-offset: 2px; }

.astra-plots { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.astra-plot {
  position: relative; border-radius: 1.1rem; overflow: hidden;
  background: radial-gradient(120% 90% at 50% 40%, rgba(128, 82, 255, 0.12), rgba(0, 0, 0, 0) 72%), rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.astra-plot:hover { border-color: rgba(167, 139, 250, 0.28); box-shadow: 0 16px 36px -12px rgba(0, 0, 0, 0.5); }
.astra-plot canvas { display: block; width: 100%; height: clamp(300px, 34vw, 560px); cursor: crosshair; touch-action: pan-y; }
.astra-plot .js-astra-emb { cursor: grab; }
.astra-plot .js-astra-emb.is-dragging { cursor: grabbing; }
.astra-plot__label {
  position: absolute; left: 1rem; top: 0.9rem; pointer-events: none;
  font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: #9a9a9a;
}
.astra-plot__label b { color: #fff; font-weight: 600; }

.astra-explorer__foot { display: flex; justify-content: space-between; align-items: flex-start; gap: 1.6rem; margin-top: 1.4rem; }
.astra-legend { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.3rem 1rem; flex: 1; }
.astra-legend__item {
  display: grid; grid-template-columns: 30px 1fr; column-gap: 8px; align-items: center; text-align: left;
  font: inherit; color: #e9e9e9; background: none; border: 0; padding: 6px 8px; border-radius: 8px; cursor: pointer;
  transition: opacity .3s, background-color .3s;
}
.astra-legend__item:hover, .astra-legend__item.is-active { background: rgba(255, 255, 255, 0.06); }
.astra-legend__item.is-dim { opacity: 0.35; }
.astra-legend__item[aria-pressed="true"] { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25); }
.astra-legend__dots { display: flex; flex-wrap: wrap; gap: 2px; width: 30px; }
.astra-legend__dots i { width: 8px; height: 8px; border-radius: 50%; }
.astra-legend__name { font-size: 14px; }
.astra-legend__markers { grid-column: 2; font-size: 11px; color: #9a9a9a; letter-spacing: 0.02em; }

.astra-colorbar { width: 220px; opacity: 0; transform: translateY(6px); transition: opacity .4s, transform .4s; }
.astra-colorbar.is-visible { opacity: 1; transform: none; }
.astra-colorbar__grad { height: 8px; border-radius: 4px; }
.astra-colorbar__scale { display: flex; justify-content: space-between; font-size: 11px; color: #9a9a9a; margin-top: 4px; }
.astra-colorbar__label { font-size: 12px; color: #e9e9e9; margin-bottom: 6px; font-weight: 600; }
.astra-status { font-size: 13px; color: #9a9a9a; margin-top: 1rem; min-height: 1.2em; }
.astra-note { font-size: 12px; color: #6f6f6f; margin-top: 0.4rem; }

.astra-tip {
  position: absolute; left: 0; top: 0; z-index: 5; pointer-events: none; min-width: 190px; max-width: 260px;
  background: rgba(14, 14, 20, 0.92); border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 12px;
  padding: 12px 14px; font-size: 13px; color: #e9e9e9; box-shadow: 0 10px 40px rgba(0, 0, 0, .5);
  opacity: 0; transition: opacity .2s;
}
.astra-tip.is-visible { opacity: 1; }
.astra-tip__eyebrow { font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: #9a9a9a; }
.astra-tip__title { font-size: 17px; color: #fff; margin: 2px 0 6px; }
.astra-tip__row { color: #bdbdbd; margin-top: 2px; }
.astra-tip__row b { color: #fff; font-weight: 600; }
.astra-tip__bar { position: relative; height: 20px; margin-top: 4px; border-radius: 4px; background: rgba(255,255,255,.05); overflow: hidden; }
.astra-tip__bar span { position: absolute; left: 0; top: 0; bottom: 0; opacity: .55; }
.astra-tip__bar em { position: relative; font-style: normal; font-size: 12px; line-height: 20px; padding-left: 6px; color: #fff; }

@media (max-width: 1023px) {
  .astra-plots { grid-template-columns: 1fr; }
  .astra-plot canvas { height: auto; max-height: 460px; }
  .astra-plot .js-astra-emb { aspect-ratio: 1 / 1; }
  .astra-plot .js-astra-spatial { aspect-ratio: 1.42 / 1; }
  .astra-plot { display: flex; flex-direction: column; }
  .astra-plot__label { position: static; order: -1; padding: 0.9rem 1rem 0; }
  .astra-legend { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .astra-explorer__foot { flex-direction: column; }
}
@media (max-width: 520px) {
  .astra-explorer__panel { padding: 1rem; border-radius: 1rem; }
  .astra-chip { font-size: 12px; padding: 6px 11px; }
  .astra-legend { gap: 0.2rem 0.6rem; }
  .astra-legend__item { grid-template-columns: 1fr; row-gap: 3px; padding: 6px; }
  .astra-legend__dots { width: auto; }
  .astra-legend__markers { grid-column: 1; }
}
