﻿:root {
  --bg: #f6f5ff;
  --text: #141033;
  --muted: #666187;
  --line: #ddd9f2;
  --primary: #0c0044;
  --primary-2: #2b1a85;
  --panel: #ffffff;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  font-family: Arial, Helvetica, sans-serif;
  background:
    radial-gradient(circle at 20% 0%, #ece9ff 0%, transparent 36%),
    radial-gradient(circle at 80% 100%, #efeaff 0%, transparent 40%),
    linear-gradient(180deg, #f9f8ff 0%, var(--bg) 100%);
  color: var(--text);
  padding: 10px;
}

.wrap { width: min(1120px, 100%); }

.layout {
  display: grid;
  grid-template-columns: 1.24fr 0.76fr;
  gap: 12px;
  align-items: stretch;
}

.panel {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #e9e6fb;
  border-radius: 18px;
  padding: 14px 12px 12px;
  box-shadow: 0 16px 36px rgba(12, 0, 68, 0.1);
  backdrop-filter: blur(6px);
  height: 100%;
}

.test-panel { text-align: center; }

.logo {
  width: min(170px, 52vw);
  height: auto;
}

.subtitle {
  margin: 6px 0 8px;
  color: var(--muted);
  font-size: 0.88rem;
}

.gauge {
  width: min(360px, 88vw);
  height: min(210px, 52vw);
  margin: 0 auto 8px;
  position: relative;
  overflow: hidden;
}

.dial-track,
.dial-fill {
  position: absolute;
  width: 100%;
  aspect-ratio: 1 / 1;
  left: 0;
  top: 0;
  border-radius: 50%;
  -webkit-mask: radial-gradient(closest-side, transparent 68%, #000 69% 80%, transparent 81%);
  mask: radial-gradient(closest-side, transparent 68%, #000 69% 80%, transparent 81%);
}

.dial-track {
  background: conic-gradient(from 180deg, #d7d2f2 0deg 180deg, transparent 180deg 360deg);
}

.dial-fill {
  background: conic-gradient(from 180deg, var(--primary) 0deg, var(--primary-2) var(--dial-deg, 0deg), transparent var(--dial-deg, 0deg));
}

.needle-wrap {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 3px;
  height: 42%;
  transform-origin: 50% 100%;
  transform: translate(-50%, -100%) rotate(-90deg);
  transition: transform 0.12s linear;
  z-index: 3;
}

.needle { width: 100%; height: 100%; border-radius: 999px; background: linear-gradient(180deg, #11005f, #5f43d2); }

.needle-hub {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid #ffffff;
  left: calc(50% - 6px);
  top: calc(50% - 6px);
  z-index: 4;
}

.gauge-readout {
  position: absolute;
  left: 50%;
  bottom: 8px;
  transform: translateX(-50%);
  width: min(180px, 56vw);
  border-radius: 12px;
  border: 1px solid #e7e3fb;
  background: #ffffff;
  padding: 8px 8px 7px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  z-index: 5;
}

.gauge span { color: var(--muted); font-size: 0.82rem; margin: 0; }
.gauge strong { font-size: clamp(1.55rem, 5.8vw, 2.35rem); line-height: 1; color: var(--primary); margin: 0; }
.gauge small { color: var(--muted); margin: 0; font-size: 0.82rem; }

body.testing .gauge { transform: scale(1.02); }

.meters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.meter {
  background: #faf9ff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px;
  text-align: left;
}

.meter span {
  display: block;
  color: var(--muted);
  margin-bottom: 5px;
  font-size: 0.82rem;
}

.meter strong { font-size: 0.95rem; }

button {
  margin-top: 10px;
  border: 0;
  border-radius: 999px;
  padding: 10px 22px;
  font-weight: 700;
  background: linear-gradient(120deg, var(--primary), var(--primary-2));
  color: #ffffff;
  cursor: pointer;
  font-size: 0.9rem;
}

button:disabled { opacity: 0.55; cursor: not-allowed; }

.status {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.86rem;
}

.banner-panel {
  position: relative;
  isolation: isolate;
  background-image:
    linear-gradient(160deg, rgba(12, 0, 68, 0.82) 0%, rgba(26, 12, 102, 0.78) 100%),
    url("https://images.unsplash.com/photo-1515879218367-8466d910aaa4?w=600&auto=format&fit=crop&q=60&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxzZWFyY2h8Mnx8Y29kZXxlbnwwfHwwfHx8MA%3D%3D");
  background-size: cover, cover;
  background-position: center, center;
  background-repeat: no-repeat, no-repeat;
  color: #ece9ff;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.banner-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 88% 10%, rgba(170, 145, 255, 0.28), transparent 35%),
    linear-gradient(180deg, rgba(12, 0, 68, 0.12), rgba(12, 0, 68, 0.36));
  pointer-events: none;
  z-index: 0;
}

.banner-panel > * {
  position: relative;
  z-index: 1;
}

.banner-eyebrow {
  margin: 0 0 8px;
  width: fit-content;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #beb8f0;
}

.banner-panel h2 {
  margin: 0 0 10px;
  font-size: clamp(1rem, 1.9vw, 1.3rem);
  line-height: 1.4;
}

.banner-panel p {
  margin: 0 0 10px;
  color: #d9d3ff;
  font-size: 0.9rem;
  line-height: 1.45;
}

.banner-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}

.banner-stats div {
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  padding: 8px;
}

.banner-stats strong {
  display: block;
  font-size: 0.82rem;
  color: #f8f6ff;
  margin-bottom: 3px;
}

.banner-stats span {
  font-size: 0.74rem;
  color: #cec7fa;
}

.banner-panel ul {
  margin: 0 0 12px;
  padding: 10px 10px 2px 24px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
}

.banner-panel li {
  margin-bottom: 7px;
  font-size: 0.86rem;
  color: #ece9ff;
}

.banner-btn {
  display: inline-block;
  margin-top: auto;
  padding: 9px 14px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.82rem;
  background: rgba(255, 255, 255, 0.95);
  color: #0c0044;
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow: 0 8px 18px rgba(8, 4, 44, 0.24);
}

@media (max-width: 920px) {
  .layout { grid-template-columns: 1fr; }
  .wrap { width: min(760px, 100%); }
}

@media (max-width: 680px) {
  .wrap { width: 100%; }
  .meters { grid-template-columns: 1fr; }
  .logo { width: min(152px, 48vw); }
  .gauge {
    width: min(320px, 88vw);
    height: min(188px, 52vw);
  }
  .banner-stats { grid-template-columns: 1fr; }
}
