@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;700&display=swap");

:root {
  --bg: #060b14;
  --panel: rgba(15, 23, 39, 0.78);
  --panel-border: rgba(134, 158, 210, 0.28);
  --text: #eef5ff;
  --muted: #a6bbe3;
  --accent: #49dccf;
  --ok: #60d68f;
  --warn: #ffc76d;
  --error: #ff7f7f;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Space Grotesk", "IBM Plex Sans", "Segoe UI", sans-serif;
  background: radial-gradient(circle at 12% 10%, #1b3054 0%, transparent 38%),
    radial-gradient(circle at 82% 16%, #2a1f4a 0%, transparent 34%),
    linear-gradient(145deg, #050912 0%, #091126 52%, #04070f 100%);
}

.shell {
  width: min(1320px, 94vw);
  margin: 1.2rem auto 2rem;
}

.top {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 0.95rem;
}

.eyebrow {
  margin: 0 0 0.3rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.74rem;
}

h1 {
  margin: 0;
  font-size: clamp(1.9rem, 3vw, 2.6rem);
  line-height: 1.05;
}

.subtitle {
  margin: 0.45rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.back-link {
  text-decoration: none;
  color: #06151d;
  background: linear-gradient(110deg, #5be5d7, #24c2b1);
  border-radius: 999px;
  padding: 0.62rem 0.95rem;
  font-weight: 700;
  white-space: nowrap;
}

.panel {
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  padding: 0.9rem;
  background: var(--panel);
  backdrop-filter: blur(8px);
}

.status {
  border-radius: 10px;
  padding: 0.62rem 0.72rem;
  background: rgba(13, 23, 43, 0.85);
  border: 1px solid rgba(130, 153, 204, 0.3);
  color: var(--muted);
  margin-bottom: 0.75rem;
  font-size: 0.89rem;
}

.status.ok {
  color: var(--ok);
}

.status.warn {
  color: var(--warn);
}

.status.error {
  color: var(--error);
}

.controls {
  border: 1px solid rgba(125, 149, 199, 0.26);
  border-radius: 12px;
  background: rgba(10, 18, 34, 0.68);
  padding: 0.74rem;
  margin-bottom: 0.8rem;
}

.control-head {
  display: flex;
  justify-content: space-between;
  gap: 0.7rem;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 0.6rem;
}

.control-head h2 {
  margin: 0;
  font-size: 1rem;
}

.control-buttons {
  display: flex;
  gap: 0.45rem;
}

.control-buttons button {
  border: none;
  border-radius: 9px;
  padding: 0.42rem 0.64rem;
  background: linear-gradient(112deg, #30456a, #3e638e);
  color: #e8f2ff;
  font-weight: 700;
  cursor: pointer;
}

.product-controls {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 0.48rem;
  max-height: 28vh;
  overflow: auto;
  padding-right: 0.15rem;
}

.control-empty {
  margin: 0;
  color: var(--muted);
}

.product-option {
  border: 1px solid rgba(127, 151, 202, 0.28);
  border-radius: 10px;
  padding: 0.46rem 0.56rem;
  background: rgba(12, 20, 38, 0.72);
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas:
    "check title"
    "check meta";
  gap: 0.12rem 0.48rem;
  align-items: start;
}

.product-option input {
  grid-area: check;
  margin-top: 0.14rem;
}

.product-option .product-name {
  grid-area: title;
  font-weight: 700;
  color: #ecf5ff;
  line-height: 1.2;
}

.product-option .product-meta {
  grid-area: meta;
  color: var(--muted);
  font-size: 0.77rem;
  line-height: 1.25;
}

.chart-wrap {
  height: min(78vh, 700px);
  border: 1px solid rgba(129, 153, 203, 0.26);
  border-radius: 12px;
  background: rgba(8, 15, 30, 0.62);
  padding: 0.62rem;
}

.axis-help {
  margin-top: 0.78rem;
  border: 1px solid rgba(129, 152, 203, 0.26);
  border-radius: 12px;
  background: rgba(8, 14, 27, 0.62);
  padding: 0.58rem 0.66rem;
}

.axis-help summary {
  cursor: pointer;
  color: #9fdfff;
  font-weight: 700;
}

.axis-help ol {
  margin: 0.65rem 0 0;
  padding-left: 1.05rem;
  columns: 2;
  column-gap: 1.1rem;
}

.axis-help li {
  break-inside: avoid;
  margin-bottom: 0.3rem;
  color: #d7e6ff;
}

.site-footer {
  margin-top: 0.85rem;
  text-align: center;
  font-size: 0.78rem;
  color: #93aad8;
  letter-spacing: 0.02em;
  opacity: 0.92;
}

@media (max-width: 860px) {
  .top {
    flex-direction: column;
  }

  .axis-help ol {
    columns: 1;
  }

  .chart-wrap {
    height: min(68vh, 520px);
  }
}
