:root {
  color-scheme: dark;
  --bg: #eef2f7;
  --body-overlay-start: rgba(255, 255, 255, 0.72);
  --body-overlay-end: rgba(255, 255, 255, 0);
  --page-text: #20242c;
  --heading: #151922;
  --eyebrow: #687181;
  --intro-text: #596273;
  --control-bg: #20242c;
  --control-text: #ffffff;
  --summary-bg: #ffffff;
  --summary-text: #596273;
  --summary-heading: #20242c;
  --card: #232730;
  --card-top: #292d36;
  --card-soft: #2f3440;
  --text: #f4f6fb;
  --muted: #c9ced8;
  --muted-dark: #707785;
  --line: rgba(255, 255, 255, 0.08);
  --yellow: #ffce22;
  --green: #2fd36f;
  --orange: #f4a51c;
  --red: #ef4d4d;
  --score-color: var(--red);
  --shadow: 0 22px 60px rgba(31, 39, 54, 0.18);
}

[data-theme="dark"] {
  --bg: #151922;
  --body-overlay-start: rgba(47, 52, 64, 0.35);
  --body-overlay-end: rgba(21, 25, 34, 0);
  --page-text: #eef2f7;
  --heading: #f4f6fb;
  --eyebrow: #9ba3b2;
  --intro-text: #c9ced8;
  --control-bg: #eef2f7;
  --control-text: #20242c;
  --summary-bg: #232730;
  --summary-text: #c9ced8;
  --summary-heading: #f4f6fb;
  --card: #20242c;
  --card-top: #252a33;
  --card-soft: #2c323d;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  padding-bottom: 126px;
  background:
    linear-gradient(180deg, var(--body-overlay-start), var(--body-overlay-end) 280px),
    var(--bg);
  color: var(--page-text);
  font: 17px/1.5 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

.shell {
  width: min(1060px, calc(100% - 28px));
  margin: 0 auto;
}

.site-header {
  padding: 26px 0 18px;
}

.header-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--eyebrow);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  max-width: 760px;
  color: var(--heading);
  font-size: clamp(34px, 5vw, 58px);
  line-height: 0.96;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  color: var(--text);
  font-size: clamp(34px, 5.4vw, 56px);
  line-height: 0.98;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 0;
  color: var(--text);
  font-size: 20px;
  line-height: 1.2;
}

.theme-toggle,
.toolbar button {
  border: 0;
  border-radius: 999px;
  background: var(--control-bg);
  color: var(--control-text);
  cursor: pointer;
  box-shadow: 0 8px 26px rgba(32, 36, 44, 0.16);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 142px;
  padding: 10px 14px;
  white-space: nowrap;
}

.toggle-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: inset 0 0 0 4px #20242c;
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 18px;
  align-items: stretch;
  padding: 4px 0 18px;
}

.intro p {
  max-width: 760px;
  color: var(--intro-text);
}

.note {
  margin-bottom: 0;
  font-size: 14px;
}

.score-panel {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border-radius: 26px;
  background: var(--card);
  color: var(--text);
  box-shadow: var(--shadow);
}

.score-ring {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at center, var(--card) 0 56%, transparent 57%),
    conic-gradient(var(--score-color) calc(var(--score, 0) * 1%), rgba(255, 255, 255, 0.12) 0);
  flex: 0 0 auto;
}

.score-ring-value {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  line-height: 1;
  transform: translateY(1px);
}

.score-ring span {
  font-size: 30px;
  font-weight: 900;
  line-height: 1;
}

.score-ring small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1;
}

.score-panel strong,
.score-panel span {
  display: block;
}

.score-panel span {
  color: var(--muted);
  font-size: 14px;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 6px 0 18px;
}

.toolbar button {
  padding: 10px 16px;
  font-weight: 800;
}

.switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--intro-text);
  font-size: 14px;
}

.floating-score {
  position: fixed;
  left: 50%;
  bottom: 14px;
  z-index: 10;
  width: min(1060px, calc(100% - 24px));
  transform: translateX(-50%);
  padding: 20px 26px 22px;
  border-radius: 28px;
  background: var(--score-color);
  color: #20242c;
  box-shadow: 0 18px 46px rgba(20, 25, 34, 0.26);
}

.floating-score-line {
  display: flex;
  align-items: baseline;
  gap: 11px;
  white-space: nowrap;
  font-size: clamp(29px, 5vw, 54px);
  line-height: 1;
  letter-spacing: 0;
}

.floating-score-line strong {
  font-weight: 900;
}

.floating-score-line span {
  font-weight: 400;
}

.floating-score-meta {
  display: block;
  margin-top: 4px;
  font-size: clamp(18px, 2.8vw, 30px);
  line-height: 1.15;
}

.floating-score.score-good,
body.score-good {
  --score-color: var(--green);
}

.floating-score.score-medium,
body.score-medium {
  --score-color: var(--orange);
}

.floating-score.score-low,
body.score-low {
  --score-color: var(--red);
}

.test-stack {
  display: grid;
  gap: 22px;
}

.group {
  overflow: hidden;
  border-radius: 32px;
  background: var(--card);
  color: var(--text);
  box-shadow: var(--shadow);
}

.group-head {
  padding: clamp(28px, 5.2vw, 52px) clamp(28px, 6vw, 60px) 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.018), rgba(0, 0, 0, 0.08)),
    var(--card);
}

.group-controls {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.5vw, 28px);
  margin-top: clamp(18px, 3.3vw, 30px);
}

.group-switch {
  position: relative;
  width: 76px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: var(--green);
  cursor: pointer;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.12);
}

.group-switch::after {
  content: "";
  position: absolute;
  top: 5px;
  right: 5px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #252a33;
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.22);
  transition: transform 180ms ease;
}

.is-collapsed .group-switch {
  background: #596170;
}

.is-collapsed .group-switch::after {
  transform: translateX(-34px);
}

.weight {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  border-radius: 8px;
  padding: 7px 16px;
  color: #20242c;
  background: var(--yellow);
  font-size: clamp(16px, 2.1vw, 24px);
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.group-close {
  border: 0;
  border-bottom: 2px dashed rgba(255, 255, 255, 0.18);
  background: transparent;
  color: rgba(231, 235, 244, 0.26);
  cursor: pointer;
  font-size: clamp(17px, 2.1vw, 24px);
  line-height: 1;
}

.group-body {
  padding: 0 clamp(28px, 6vw, 60px) clamp(26px, 5vw, 48px);
}

.group-description {
  max-width: 860px;
  margin-bottom: clamp(18px, 3.5vw, 32px);
  color: rgba(244, 246, 251, 0.82);
  font-size: clamp(19px, 3vw, 30px);
  line-height: 1.55;
  letter-spacing: 0;
}

.is-collapsed .group-body {
  display: none;
}

.service {
  padding: 18px 0;
  border-top: 1px solid var(--line);
}

.service-title {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}

.status-chip {
  border-radius: 999px;
  padding: 6px 11px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.checks {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 14px 0 0;
  list-style: none;
}

.check {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  color: rgba(244, 246, 251, 0.76);
}

.mark {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 900;
  background: rgba(255, 255, 255, 0.12);
  color: var(--muted);
}

.passed .mark {
  background: rgba(47, 211, 111, 0.18);
  color: var(--green);
}

.failed .mark {
  background: rgba(239, 77, 77, 0.18);
  color: #ff8d8d;
}

.warning .mark {
  background: rgba(244, 165, 28, 0.2);
  color: var(--orange);
}

.raw {
  display: none;
  margin-top: 8px;
  padding: 9px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.07);
  color: rgba(244, 246, 251, 0.64);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.bait-zone {
  min-height: 80px;
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.ad,
.adsbox,
.ad-banner,
.sponsor,
.promoted-link {
  min-height: 72px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: rgba(244, 246, 251, 0.6);
  background: rgba(255, 255, 255, 0.06);
  font-size: 13px;
  text-align: center;
}

.bait-zone img {
  width: 100%;
  max-height: 82px;
  object-fit: cover;
  border-radius: 14px;
  opacity: 0.9;
}

.summary {
  margin: 22px 0;
  padding: 24px;
  border-radius: 26px;
  background: var(--summary-bg);
  box-shadow: 0 12px 34px rgba(31, 39, 54, 0.08);
}

.summary h2 {
  margin-bottom: 10px;
  color: var(--summary-heading);
  font-size: 28px;
  line-height: 1.1;
}

.summary p {
  margin-bottom: 0;
  color: var(--summary-text);
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 0 28px;
  color: var(--eyebrow);
  font-size: 14px;
}

@media (max-width: 760px) {
  body {
    padding-bottom: 112px;
  }

  .shell {
    width: min(100% - 12px, 520px);
  }

  .site-header {
    padding-top: 18px;
  }

  .header-row,
  .toolbar,
  .footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .intro {
    grid-template-columns: 1fr;
  }

  .score-panel {
    max-width: 100%;
  }

  .group {
    border-radius: 28px;
  }

  .group-head {
    padding: 34px 32px 16px;
  }

  .group-body {
    padding: 0 32px 32px;
  }

  .group-controls {
    gap: 16px;
  }

  .group-switch {
    width: 74px;
    height: 42px;
  }

  .service-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .bait-zone {
    grid-template-columns: 1fr;
  }

  .floating-score {
    bottom: 8px;
    width: calc(100% - 12px);
    padding: 18px 36px 22px;
    border-radius: 0 0 28px 28px;
  }
}

@media (max-width: 420px) {
  .group-head,
  .group-body {
    padding-left: 26px;
    padding-right: 26px;
  }

  .group-controls {
    gap: 12px;
  }

  .group-switch {
    width: 66px;
    height: 38px;
  }

  .group-switch::after {
    width: 28px;
    height: 28px;
    top: 5px;
    right: 5px;
  }

  .is-collapsed .group-switch::after {
    transform: translateX(-28px);
  }

  .weight {
    min-height: 34px;
    padding: 6px 12px;
  }

  .floating-score {
    padding-left: 26px;
    padding-right: 26px;
  }
}
