#screen-test {
  --test-card: rgba(7, 18, 34, 0.92);
  --test-card-soft: rgba(8, 20, 38, 0.72);
}

.test-screen {
  display: grid;
  grid-template-columns: minmax(760px, 1fr) 420px;
  gap: 32px;
}

.test-main {
  min-width: 0;
}

.test-header {
  min-height: 82px;
  margin-bottom: 12px;
}

.test-header h1::before {
  content: "T";
  display: inline-grid;
  place-items: center;
  width: 34px;
  margin-right: 12px;
  color: #cfe9ff;
  font-size: 34px;
}

.test-config {
  display: grid;
  grid-template-columns: 1.25fr 1fr 42px 1fr 148px;
  gap: 14px;
  align-items: end;
  min-height: 88px;
  margin-bottom: 20px;
  padding: 14px 18px;
  border-radius: 10px;
}

.test-config label {
  display: grid;
  gap: 6px;
}

.test-config span {
  color: #8d99b1;
  font-size: 13px;
}

.test-config select {
  width: 100%;
  min-height: 42px;
  padding: 0 14px;
  color: white;
  border: 1px solid rgba(135, 165, 220, 0.18);
  border-radius: 7px;
  background: rgba(3, 8, 18, 0.82);
  font-weight: 800;
}

.test-config label:nth-of-type(3) span {
  color: #8f5dff;
}

.swap-button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: #9b7cff;
  border: 1px solid rgba(101, 78, 255, 0.7);
  border-radius: 8px;
  background: rgba(43, 32, 114, 0.68);
  font-size: 26px;
  box-shadow: 0 0 24px rgba(88, 65, 255, 0.28);
}

.settings-action {
  width: 100%;
}

.comparison-area {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 58px;
  align-items: stretch;
  margin-bottom: 0;
}

.variant-card {
  min-height: 372px;
  padding: 18px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(9, 21, 40, 0.94), rgba(6, 14, 27, 0.94));
}

.variant-card--control {
  border: 1px solid rgba(160, 225, 41, 0.62);
}

.variant-card--challenger {
  border: 1px solid rgba(187, 59, 255, 0.72);
}

.variant-card > header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.variant-card h2 {
  margin-bottom: 4px;
  font-size: 20px;
}

.variant-card p,
.variant-card small {
  margin: 0;
  color: #aeb9cb;
  font-size: 13px;
}

.variant-card > header > div:last-child {
  display: grid;
  justify-items: end;
  gap: 7px;
}

.version-badge {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  padding: 3px 8px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 900;
}

.version-badge--control {
  color: var(--lime);
  background: rgba(123, 168, 35, 0.35);
}

.version-badge--challenger {
  color: #f1d7ff;
  background: rgba(141, 58, 194, 0.78);
}

.funnel-preview {
  min-height: 272px;
  padding: 24px 26px;
  overflow: hidden;
  color: #101018;
  border-radius: 7px;
  background:
    radial-gradient(circle at 82% 38%, rgba(33, 90, 20, 0.3), transparent 84px),
    radial-gradient(circle at 76% 66%, rgba(80, 125, 24, 0.28), transparent 72px),
    linear-gradient(135deg, #f5f4ef 0%, #ffffff 58%, #ece8df 100%);
}

.preview-brand {
  margin-bottom: 28px;
  color: #202722;
  font-size: 11px;
  font-weight: 900;
}

.preview-brand::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 5px;
  border-radius: 3px;
  background: linear-gradient(135deg, #82c547, #5b2bd8);
}

.funnel-preview h3 {
  max-width: 260px;
  margin-bottom: 14px;
  color: #12121a;
  font-size: 25px;
  line-height: 1.18;
}

.funnel-preview--challenger h3 span {
  color: #7c35ff;
}

.funnel-preview p:not(.preview-brand) {
  max-width: 300px;
  margin-bottom: 18px;
  color: #1d2430;
  font-size: 12px;
}

.funnel-preview button {
  min-height: 34px;
  padding: 0 18px;
  color: white;
  border: 0;
  border-radius: 6px;
  background: #4f932e;
  font-size: 12px;
  font-weight: 900;
}

.funnel-preview--challenger button {
  background: #7834bd;
}

.funnel-preview ul {
  display: flex;
  gap: 26px;
  padding: 0;
  margin: 28px 0 0;
  color: #4b5565;
  font-size: 10px;
  list-style: none;
}

.funnel-preview li::before {
  content: "[]";
  margin-right: 5px;
  color: #586574;
}

.versus-chip {
  position: absolute;
  left: 50%;
  top: 160px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 70px;
  height: 70px;
  transform: translateX(-50%);
  color: white;
  border: 2px solid rgba(92, 110, 255, 0.95);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(38, 20, 92, 1), rgba(7, 11, 29, 0.96));
  box-shadow: 0 0 28px rgba(52, 130, 255, 0.8), 0 0 34px rgba(181, 38, 255, 0.5);
  font-size: 21px;
  font-weight: 950;
}

.sample-summary {
  padding: 12px 16px 14px;
  border-radius: 0 0 10px 10px;
  border-top: 0;
}

.sample-summary h2 {
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 850;
}

.sample-summary h2 span,
.guardrails-card h2 span {
  color: #8996ad;
  font-weight: 650;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.metric-grid article {
  min-height: 86px;
  padding: 14px 16px;
  border: 1px solid rgba(135, 165, 220, 0.16);
  border-radius: 8px;
  background: rgba(7, 17, 32, 0.86);
}

.metric-grid span {
  display: block;
  margin-bottom: 8px;
  color: white;
  font-size: 12px;
}

.metric-grid strong {
  display: block;
  margin-bottom: 4px;
  font-size: 23px;
}

.metric-grid small {
  color: #cfd7e6;
}

.metric-grid meter {
  display: block;
  width: 100%;
  height: 7px;
}

.sample-summary > p {
  margin: 12px 0 0;
  color: #8d99ad;
  font-size: 12px;
  text-align: center;
}

.test-side {
  display: grid;
  gap: 16px;
  align-content: start;
  padding-top: 6px;
}

.test-side .panel {
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(10, 24, 45, 0.95), rgba(7, 17, 31, 0.95));
}

.status-card {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 94px;
  padding: 20px 26px;
}

.status-symbol {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: #8f5dff;
  font-size: 43px;
  line-height: 1;
}

.status-card p,
.launch-card p {
  margin: 0 0 3px;
  color: white;
  font-size: 13px;
}

.status-card strong {
  display: block;
  color: var(--lime);
  font-size: 16px;
}

.status-card span,
.launch-card small {
  display: block;
  color: #c1cad8;
  font-size: 12px;
}

.guardrails-card,
.plan-card,
.launch-card {
  padding: 22px 22px 16px;
}

.guardrails-card h2,
.plan-card h2 {
  margin-bottom: 16px;
  font-size: 16px;
}

.guardrails-card ul {
  display: grid;
  gap: 12px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.guardrails-card li,
.plan-card dl div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: #dbe3f0;
  font-size: 13px;
}

.guardrails-card li::before {
  content: "o";
  color: #bac5d7;
}

.guardrails-card li span {
  flex: 1;
}

.guardrails-card strong {
  color: var(--lime);
  font-size: 13px;
}

.plan-card dl {
  display: grid;
  gap: 10px;
  margin: 0 0 18px;
}

.plan-card dt {
  color: #aab5c7;
}

.plan-card dd {
  margin: 0;
  color: white;
  font-weight: 700;
}

.plan-card button,
.launch-card button {
  width: 100%;
}

.launch-card {
  display: grid;
  gap: 12px;
}

.launch-card p::before {
  content: "v";
  margin-right: 6px;
  color: var(--lime);
}

.launch-card .primary-action {
  min-height: 50px;
  font-size: 18px;
}

.launch-card small {
  margin-top: 2px;
  line-height: 1.4;
}

@media (max-width: 1279px) {
  .test-screen {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .test-header {
    min-height: 0;
  }

  .test-config {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 44px;
  }

  .test-config label,
  .test-config select,
  .variant-card,
  .metric-grid article,
  .test-side .panel {
    min-width: 0;
  }

  .settings-action {
    grid-column: 1 / -1;
  }

  .comparison-area {
    gap: 20px;
  }

  .versus-chip {
    top: 145px;
    width: 58px;
    height: 58px;
    font-size: 17px;
  }

  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .test-side {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .launch-card {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .test-header h1::before {
    width: 28px;
    margin-right: 8px;
    font-size: 28px;
  }

  .test-config {
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .test-config select {
    min-height: 44px;
  }

  .swap-button {
    width: 100%;
    min-height: 44px;
  }

  .comparison-area {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .variant-card {
    min-height: 0;
    padding: 14px;
  }

  .variant-card > header {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .variant-card > header > div:last-child {
    justify-items: start;
  }

  .funnel-preview {
    min-height: 238px;
    padding: 18px;
    touch-action: pan-y;
  }

  .funnel-preview h3 {
    max-width: 235px;
    font-size: 22px;
  }

  .funnel-preview ul {
    flex-wrap: wrap;
    gap: 10px 16px;
  }

  .sample-summary {
    padding: 14px;
  }

  .funnel-preview button,
  .settings-action,
  .plan-card button,
  .launch-card button {
    min-height: 44px;
  }

  .versus-chip {
    position: static;
    width: 48px;
    height: 48px;
    margin: -4px auto;
    transform: none;
  }

  .metric-grid,
  .test-side {
    grid-template-columns: 1fr;
  }

  .status-card {
    min-height: 0;
    padding: 16px;
  }

  .guardrails-card li,
  .plan-card dl div {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .guardrails-card,
  .plan-card,
  .launch-card {
    padding: 18px 16px;
  }
}
