#performance {
  --henne-text: #f7f8fb;
  --henne-muted: #ccd7e4;
  --henne-border: #58718a;
  --henne-blue: #0966fc;
  --henne-mint: #5ef8c6;
  --henne-surface-top: #344a61;
  --henne-surface-bottom: #263648;
}

html[data-theme="dark"] #performance {
  --henne-border: #475b70;
  --henne-surface-top: #2b3c50;
  --henne-surface-bottom: #1e2b3a;
}

#performance .st-performance-ranking { block-size: 1.4em; }

.henne-performance {
  color-scheme: dark;
  color: var(--henne-text);
  width: 100%;
  min-width: 0;
  position: relative;
  z-index: 1;
  scroll-margin-top: 16px;
  container-type: inline-size;
}

.henne-performance :is(h2, h3, h4, p, dl, dd) {
  margin: 0;
}

.henne-performance :is(button, a):focus-visible {
  outline: 2px solid #9ed5ff;
  outline-offset: 3px;
}

.henne-performance__card {
  overflow: clip;
  background: linear-gradient(145deg, var(--henne-surface-top), var(--henne-surface-bottom));
  border: 1px solid var(--henne-border);
  border-radius: clamp(16px, 3.25cqi, 23px);
}

.henne-performance__tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  padding: clamp(5px, 1.7cqi, 10px);
  border-bottom: 1px solid #ffffff24;
}

.henne-performance__tabs button {
  min-width: 0;
  min-height: clamp(42px, 9.1cqi, 50px);
  padding: 6px 2px;
  border: 0;
  border-radius: clamp(8px, 1.9cqi, 12px);
  background: transparent;
  color: #dce1eb;
  font-size: clamp(10px, 3.1cqi, 16px);
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.henne-performance__tabs button[aria-selected="true"] {
  background-color: var(--henne-blue);
  color: white;
  font-weight: 800;
}

@media (hover: hover) {
  .henne-performance__tabs button:not([aria-selected="true"]):hover {
    background-color: #ffffff19;
    color: white;
  }
}

.henne-performance__viewport {
  overflow: clip;
  touch-action: pan-y pinch-zoom;
}

.henne-performance__track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 100%;
  transform: translateX(calc(var(--henne-slide, 0%) + var(--henne-drag, 0px)));
  transition: transform 320ms cubic-bezier(.22, .72, .28, 1);
}

.henne-performance:not([data-henne-ready]) .henne-performance__track > :not(:first-child) {
  display: none;
}

.henne-performance__track[data-henne-dragging] {
  transition: none;
  user-select: none;
}

.henne-performance__comparison {
  display: flex;
  min-width: 0;
}

#performance .henne-performance__comparison .st-speed-dashboard {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  margin: 0;
  padding: clamp(17px, 5.2cqi, 29px) clamp(13px, 5cqi, 29px);
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.henne-performance__comparison .st-speed-heading { flex-wrap: wrap; }

.henne-performance__comparison .st-speed-info > div {
  max-width: calc(100cqi - 34px);
}

.henne-performance__report {
  min-width: 0;
  padding: clamp(16px, 3.7cqi, 25px) clamp(13px, 4.4cqi, 30px) clamp(16px, 3.2cqi, 23px);
}

.henne-performance__head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: clamp(13px, 4.7cqi, 32px);
  padding: 0 0 clamp(14px, 2.95cqi, 20px) clamp(0px, calc(8cqi - 22px), 34px);
  border-bottom: 1px solid #ffffff50;
}

.henne-performance__score {
  display: grid;
  place-items: center;
  width: clamp(88px, 29cqi, 196px);
  aspect-ratio: 1;
  border: clamp(8px, 2.6cqi, 18px) solid transparent;
  border-radius: 50%;
  background: linear-gradient(145deg, #27384a, #202c3b) padding-box,
              linear-gradient(145deg, #18f5d1, #27ffdb) border-box;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.henne-performance__score > span {
  display: grid;
  justify-items: center;
  gap: clamp(2px, .7cqi, 5px);
  line-height: 1;
}

.henne-performance__score strong {
  color: white;
  font-size: clamp(26px, 8.7cqi, 60px);
  font-weight: 800;
  letter-spacing: -.05em;
}

.henne-performance__score small {
  color: var(--henne-muted);
  font-size: clamp(13px, 3.4cqi, 23px);
}

.henne-performance__head h3 {
  max-width: 13em;
  color: var(--henne-text);
  font-size: clamp(17px, 4.75cqi, 32px);
  font-weight: 800;
  letter-spacing: -.025em;
  line-height: 1.15;
  text-wrap: balance;
}

.henne-performance__head p {
  margin-top: clamp(5px, 1.3cqi, 9px);
  color: var(--henne-muted);
  font-size: clamp(12px, 3.3cqi, 23px);
  line-height: 1.3;
}

.henne-performance__metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: clamp(14px, 3.5cqi, 24px) 0 clamp(16px, 4.9cqi, 34px);
}

.henne-performance__metrics > div {
  display: grid;
  grid-template-rows: 1fr auto;
  gap: clamp(5px, 1.3cqi, 9px);
  padding: 0 clamp(6px, 4.2cqi, 29px);
}

.henne-performance__metrics > div:first-child { padding-left: 2px; }
.henne-performance__metrics > div:last-child { padding-right: 0; }
.henne-performance__metrics > div + div { border-left: 1px solid #ffffff54; }

.henne-performance__metrics dt {
  font-size: clamp(11px, 2.85cqi, 19px);
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.henne-performance__metrics dd {
  color: var(--henne-mint);
  font-size: clamp(18px, 6.7cqi, 46px);
  font-weight: 800;
  letter-spacing: -.04em;
  line-height: 1.1;
}

.henne-performance__report:last-child .henne-performance__metrics dd {
  font-size: clamp(17px, 5.85cqi, 40px);
}

.henne-performance__details-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(9px, 2.5cqi, 17px);
  width: 100%;
  min-height: clamp(48px, 10.65cqi, 72px);
  padding: 9px;
  border: 0;
  border-radius: clamp(10px, 2.35cqi, 16px);
  background: var(--henne-blue);
  color: white;
  font-size: clamp(14px, 3.9cqi, 26px);
  font-weight: 800;
  line-height: 1.2;
}

.henne-performance__details-button:hover { background-color: #075ce3; }

.henne-performance__details-button::after {
  content: "";
  width: .56em;
  height: .56em;
  border: solid currentColor;
  border-width: 0 .11em .11em 0;
  transform: rotate(-45deg);
}

.henne-performance__details-button[aria-expanded="true"]::after { transform: rotate(135deg); }

.henne-performance p.henne-performance__caption {
  margin: clamp(9px, 2.35cqi, 16px) 0 0;
  color: var(--henne-muted);
  font-size: clamp(11px, 2.55cqi, 17px);
  line-height: 1.4;
  text-align: center;
}

.henne-performance__caption a:hover { text-decoration: underline; }

#performance > .henne-performance__details {
  position: relative;
  z-index: 2;
  align-self: stretch;
  contain: size;
  min-width: 0;
  min-height: 0;
  width: 100%;
  margin: 0;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: #667387 transparent;
  padding: clamp(16px, 1.5vw, 26px);
  border: 1px solid var(--henne-border);
  border-radius: clamp(16px, 1.65vw, 24px);
  background: linear-gradient(145deg, var(--henne-surface-top), var(--henne-surface-bottom));
  color: var(--henne-text);
  color-scheme: dark;
  text-align: left;
  scroll-margin-top: 16px;
}

#performance.st-performance--details-open > :is(.st-benefit-copy, .st-performance-brand-backdrop) {
  visibility: hidden;
}

.henne-performance__details-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.henne-performance__details-close {
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  height: 44px;
  padding: 0;
  border: 1px solid #ffffff30;
  border-radius: 12px;
  background: #ffffff0b;
  color: var(--henne-text);
}

.henne-performance__details-close:hover {
  border-color: #9ed5ff;
  background: #ffffff17;
}

.henne-performance__details-close:focus-visible {
  outline: 2px solid #9ed5ff;
  outline-offset: 3px;
}

.henne-performance__details h3 {
  margin: 0;
  color: var(--henne-text);
  font-size: clamp(21px, 2.1vw, 34px);
  font-weight: 800;
  line-height: 1.2;
  scroll-margin-top: 16px;
}

.henne-performance__details h4 {
  margin: 5px 0 15px;
  color: var(--henne-muted);
  font-size: clamp(13px, 1.15vw, 17px);
  font-weight: 600;
}

.henne-performance__details dl { margin: 0; }

.henne-performance__details dl > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: clamp(6px, .55vw, 9px) 0;
  border-bottom: 1px solid #ffffff29;
  font-size: clamp(13px, 1.15vw, 17px);
  line-height: 1.4;
}

.henne-performance__details dd {
  margin: 0;
  color: var(--henne-mint);
  font-weight: 800;
  white-space: nowrap;
}

.henne-performance__details p {
  margin: 13px 0 0;
  color: var(--henne-muted);
  font-size: clamp(12px, .95vw, 14px);
  line-height: 1.5;
}

html body.st-home #performance .st-glass-link > .henne-performance__contact-icon {
  display: grid;
  flex: none;
  place-items: center;
  width: clamp(1.95rem, 2.4vw, 2.45rem);
  aspect-ratio: 1;
  height: auto;
  padding: 0;
  border: 1px solid color-mix(in srgb, currentColor 28%, transparent);
  border-radius: 50%;
  color: #233950;
  background: color-mix(in srgb, var(--performance-corner-primary) 22%, #fff);
  box-shadow: none;
}

html[data-theme="dark"] body.st-home #performance .st-glass-link > .henne-performance__contact-icon {
  color: #eff8ff;
  background: color-mix(in srgb, var(--performance-rim-highlight) 24%, #172331);
}

html body.st-home #performance .henne-performance__contact-icon > svg {
  display: block;
  width: 57%;
  height: auto;
  overflow: visible;
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  #performance .henne-performance__contact-icon svg { transition: transform .18s ease-out; }
  #performance .st-glass-link:is(:hover, :focus-visible) .henne-performance__contact-icon svg {
    transform: translateX(2px);
  }
}

@media (min-width: 960px) {
  #performance.st-performance.st-benefit {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-block: clamp(58px, 6.35vw, 110px);
  }

  #performance > .st-performance-art {
    grid-area: 1 / 1;
    padding-inline-start: clamp(106px, 12.4vw, 218px);
  }

  #performance > :is(.st-benefit-copy, .henne-performance__details) {
    grid-area: 1 / 2;
  }

  html body.st-home #performance .st-glass-link {
    padding: clamp(13px, 1.4vw, 24px) clamp(20px, 2.15vw, 38px);
    gap: clamp(16px, 2vw, 36px);
    font-size: clamp(14px, 1.32vw, 23px);
  }

  .henne-performance__details[data-henne-expanded] {
    animation: henne-report-open-right 430ms cubic-bezier(.22, .72, .28, 1);
  }

  @keyframes henne-report-open-right {
    from { opacity: 0; clip-path: inset(0 100% 0 0 round 20px); }
    to { opacity: 1; clip-path: inset(0 round 20px); }
  }
}

@media (max-width: 959px) {
  #performance.st-performance.st-benefit { grid-template-columns: minmax(0, 1fr); }

  #performance > .st-performance-art { grid-area: 1 / 1; }

  #performance > :is(.st-benefit-copy, .henne-performance__details) {
    grid-area: 2 / 1;
  }

  #performance > .st-benefit-copy {
    min-height: 17rem;
    align-content: center;
  }

  #performance > .henne-performance__details { max-width: 440px; margin-inline: auto; }

  .henne-performance__details[data-henne-expanded] {
    animation: henne-report-open-mobile 250ms ease-out both;
  }

  @keyframes henne-report-open-mobile {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
  }
}

@container (max-width: 405px) {
  .henne-performance__metrics > div { padding-inline: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .henne-performance__track { transition: none; }
  .henne-performance__details[data-henne-expanded] { animation: none; }
}
