:root {
  color-scheme: dark;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #0e0e0f;
  color: #f0f0f2;
  font-synthesis: none;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 28px;
}

.panel {
  width: min(100%, 760px);
  padding: 48px 38px 38px;
  background: #131314;
  border: 1px solid #252527;
  border-radius: 22px;
  box-shadow: 0 20px 70px #0003;
  
}

header { text-align: center; }

.logo {
  display: block;
  margin: 0 auto 12px;
  object-fit: contain;
  width: 112px;
  height: 112px;
}

h1 {
  margin: 0;
  font-size: 30px;
  font-weight: 650;
  letter-spacing: -1px;
}

.subtitle {
  margin: 8px 0 17px;
  color: #a4a4ab;
  font-size: 14px;
  font-weight: 450;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border: 1px solid #333335;
  border-radius: 8px;
  background: #222224;
  color: #c5c5ca;
  font-size: 12px;
}

.status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #bcbcc0;
}

.results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid #29292b;
}

.result {
  min-width: 0;
  padding: 20px;
  border: 1px solid #2c2c2e;
  border-radius: 12px;
  background: #19191b;
  transition: border-color 180ms ease, background 180ms ease;
}

.result:hover {
  background: #1d1d20;
  border-color: #444447;
}

h2 {
  margin: 0;
  color: #b9b9c0;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
}

.score {
  margin: 12px 0 18px;
  font-size: 38px;
  font-weight: 620;
  letter-spacing: -1.6px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.score small {
  margin-left: 3px;
  color: #8f8f97;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0;
}

.meter {
  position: relative;
  height: 10px;
  overflow: hidden;
  border-radius: 3px;
  background: #303033;
}

.fill {
  height: 100%;
  width: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, #a9a9b1, #f1f1f4);
  transform-origin: left center;
  transform: scaleX(var(--ratio));
}

.meter::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(90deg, transparent 0, transparent calc(100% / 40 - 1px), #19191b calc(100% / 40 - 1px), #19191b calc(100% / 40));
  pointer-events: none;
}

.detail {
  margin: 12px 0 0;
  color: #9a9aa3;
  font-size: 11px;
  line-height: 1.5;
}

@media (max-width: 560px) {
  body { padding: 14px; }
  .panel { padding: 28px 18px 20px; border-radius: 16px; }
  .results { grid-template-columns: 1fr; margin-top: 28px; }
  .result { padding: 17px; }
  .logo { width: 96px; height: 96px; }
  .score { font-size: 34px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

.test-date {
  margin-top: 22px;
  text-align: center;
  color: #9a9aa3;
  font-size: 11px;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
}

.test-date span {
  margin: 0 4px;
  color: #68686e;
}

.result:focus-visible {
  outline: 1px solid #8b8b92;
  outline-offset: 3px;
}

.test-tooltip {
  --arrow-x: 50%;
  position: fixed;
  z-index: 10;
  width: max-content;
  max-width: min(320px, calc(100vw - 24px));
  padding: 14px 16px;
  color: #bdbdc6;
  background: #232325;
  border: 1px solid #3b3b40;
  border-radius: 10px;
  box-shadow: 0 8px 28px #0006;
  font-size: 12px;
  line-height: 1.6;
  text-align: left;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 160ms ease, transform 160ms ease, visibility 160ms;
}

.test-tooltip.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.test-tooltip::after {
  content: "";
  position: absolute;
  left: var(--arrow-x);
  bottom: -5px;
  width: 8px;
  height: 8px;
  background: inherit;
  border-right: 1px solid #3b3b40;
  border-bottom: 1px solid #3b3b40;
  transform: translateX(-50%) rotate(45deg);
}

.test-tooltip[data-side="below"]::after {
  bottom: auto;
  top: -5px;
  transform: translateX(-50%) rotate(225deg);
}

.test-tooltip strong {
  display: block;
  margin-bottom: 5px;
  color: #f0f0f2;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
}

.test-tooltip p { margin: 0; }

.credit {
  margin-top: 5px;
  color: #898991;
  font-size: 11px;
}
