:root {
  --performance-bg: #f4f3ee;
  --performance-surface: #ffffff;
  --performance-surface-soft: #f8f7f2;
  --performance-surface-strong: #eef3f0;
  --performance-ink: #12201d;
  --performance-muted: #60706a;
  --performance-line: #dedccf;
  --performance-line-strong: #cfcabb;
  --performance-accent: #822b39;
  --performance-accent-soft: #f3e8ea;
  --performance-warm: #a36b1f;
  --performance-burgundy: #7d3340;
  --performance-shadow: 0 12px 28px rgba(18, 32, 29, 0.04);
  --performance-shadow-soft: 0 1px 0 rgba(18, 32, 29, 0.04);
  --performance-radius-xl: 28px;
  --performance-radius-lg: 22px;
  --performance-radius-md: 16px;
  --performance-radius-sm: 12px;
  --performance-transition: 180ms ease;
}

.performance-page {
  padding: 28px 24px 80px;
  background: var(--performance-bg);
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

.performance-page__inner {
  max-width: 1320px;
  margin: 0 auto;
}

.performance-toolbar,
.performance-summary-panel,
.performance-results-panel,
.performance-map-card,
.performance-reader,
.performance-noscript {
  border: 1px solid var(--performance-line);
  border-radius: var(--performance-radius-xl);
  background: var(--performance-surface);
  box-shadow: none;
}

.performance-toolbar {
  padding: 22px;
}

.performance-toolbar__intro {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
  margin-bottom: 20px;
}

.performance-toolbar__copy {
  max-width: 780px;
}

.performance-toolbar__copy h2 {
  margin: 0;
  font-family: inherit;
  font-weight: 800;
  letter-spacing: -0.03em;
  font-size: clamp(1.7rem, 2.4vw, 2.5rem);
  line-height: 1.08;
  color: var(--performance-ink);
}

.performance-toolbar__copy p {
  margin: 12px 0 0;
  color: var(--performance-muted);
  line-height: 1.72;
}

.performance-status {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--performance-line);
  border-radius: 999px;
  background: var(--performance-surface-soft);
  color: var(--performance-muted);
  font-size: 0.92rem;
  white-space: nowrap;
}

.performance-filter-form {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) repeat(3, minmax(200px, 0.82fr)) auto;
  gap: 14px;
  align-items: end;
}

.performance-filter-field {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.performance-filter-field > span {
  color: var(--performance-muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.performance-input,
.performance-select,
.performance-multi-select__trigger {
  min-height: 58px;
  border: 1px solid var(--performance-line);
  border-radius: 18px;
  background: var(--performance-surface);
}

.performance-input,
.performance-select {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
}

.performance-input i,
.performance-select i {
  color: rgba(130, 43, 57, 0.72);
  flex-shrink: 0;
}

.performance-input input,
.performance-select select,
.performance-multi-select__search input {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--performance-ink);
  font: inherit;
}

.performance-select select {
  appearance: none;
  cursor: pointer;
}

.performance-input input:focus,
.performance-select select:focus,
.performance-multi-select__search input:focus {
  outline: none;
}

.performance-input:focus-within,
.performance-select:focus-within,
.performance-multi-select__trigger[aria-expanded="true"],
.performance-multi-select__search:focus-within {
  border-color: rgba(130, 43, 57, 0.3);
  box-shadow: 0 0 0 3px rgba(130, 43, 57, 0.08);
}

.performance-multi-select {
  position: relative;
}

.performance-multi-select__trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 16px;
  color: var(--performance-ink);
  font: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: border-color var(--performance-transition), box-shadow var(--performance-transition);
}

.performance-multi-select__trigger i {
  color: var(--performance-muted);
  transition: transform var(--performance-transition);
}

.performance-multi-select__trigger[aria-expanded="true"] i {
  transform: rotate(180deg);
}

.performance-multi-select__panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  z-index: 20;
  padding: 14px;
  border: 1px solid var(--performance-line);
  border-radius: 18px;
  background: var(--performance-surface);
  box-shadow: var(--performance-shadow);
}

.performance-multi-select__search {
  display: flex;
  align-items: center;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--performance-line);
  border-radius: 14px;
  background: var(--performance-surface-soft);
}

.performance-multi-select__actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
}

.performance-multi-select__actions button {
  border: 0;
  background: transparent;
  color: var(--performance-accent);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
}

.performance-multi-select__options {
  display: grid;
  gap: 8px;
  max-height: 280px;
  margin-top: 12px;
  overflow-y: auto;
  padding-right: 4px;
}

.performance-multi-select__option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: var(--performance-surface-soft);
  cursor: pointer;
  transition: background var(--performance-transition), border-color var(--performance-transition);
}

.performance-multi-select__option:hover {
  border-color: var(--performance-line);
  background: #fdfcf8;
}

.performance-multi-select__option input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--performance-accent);
}

.performance-multi-select__option-copy {
  display: grid;
  gap: 3px;
}

.performance-multi-select__option-copy strong {
  color: var(--performance-ink);
  font-size: 0.95rem;
}

.performance-multi-select__option-copy span {
  color: var(--performance-muted);
  font-size: 0.84rem;
  letter-spacing: 0;
  text-transform: none;
}

.performance-multi-select__options::-webkit-scrollbar,
.performance-results::-webkit-scrollbar {
  width: 10px;
}

.performance-multi-select__options::-webkit-scrollbar-thumb,
.performance-results::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: rgba(15, 93, 99, 0.22);
  background-clip: padding-box;
}

.performance-filter-actions {
  display: flex;
  gap: 10px;
}

.performance-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 58px;
  padding: 0 18px;
  border: 1px solid var(--performance-line);
  border-radius: 18px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition:
    background var(--performance-transition),
    color var(--performance-transition),
    border-color var(--performance-transition),
    transform var(--performance-transition),
    box-shadow var(--performance-transition);
}

.performance-button:hover {
  transform: translateY(-1px);
}

.performance-button--primary {
  background: var(--performance-accent);
  border-color: var(--performance-accent);
  color: #fff;
  box-shadow: 0 10px 22px rgba(130, 43, 57, 0.16);
}

.performance-button--primary:hover {
  background: #6f2130;
}

.performance-button--ghost {
  background: var(--performance-surface-soft);
  color: var(--performance-accent);
}

.performance-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  gap: 18px;
  margin-top: 22px;
  align-items: start;
}

.performance-summary-panel,
.performance-map-column,
.performance-results-panel,
.performance-reader {
  min-width: 0;
}

.performance-summary-panel {
  padding: 20px 22px 18px;
}

.performance-results-panel {
  overflow: visible;
  grid-column: 1 / -1;
}

.performance-summary__lead {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  align-items: start;
}

.performance-summary__label {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--performance-accent-soft);
  color: var(--performance-accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.performance-summary__copy h2 {
  margin: 12px 0 0;
  font-family: inherit;
  font-weight: 800;
  letter-spacing: -0.03em;
  font-size: clamp(1.65rem, 2.6vw, 2.35rem);
  line-height: 1.06;
  color: var(--performance-ink);
}

.performance-summary__copy p {
  margin: 10px 0 0;
  color: rgba(18, 32, 29, 0.82);
  line-height: 1.68;
}

.performance-summary__report {
  padding: 10px 0 0;
  border: 0;
  border-top: 1px solid var(--performance-line);
  border-radius: 0;
  background: transparent;
}

.performance-summary__report-label {
  color: var(--performance-muted);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.performance-summary__report-score {
  display: block;
  margin-top: 8px;
  font-family: inherit;
  font-weight: 800;
  letter-spacing: -0.03em;
  font-size: clamp(1.85rem, 3vw, 2.6rem);
  line-height: 1;
  color: var(--performance-ink);
}

.performance-summary__report-body {
  margin: 8px 0 0;
  color: var(--performance-muted);
  line-height: 1.6;
}

.performance-summary__stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 18px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--performance-line);
}

.performance-summary__stat {
  padding: 0;
  border: 0;
  background: transparent;
}

.performance-summary__stat strong {
  display: block;
  color: var(--performance-muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.performance-summary__stat span {
  display: block;
  margin-top: 4px;
  color: var(--performance-ink);
  font-size: 0.98rem;
  font-weight: 700;
}

.performance-summary__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.performance-summary__chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: var(--performance-surface-soft);
  color: var(--performance-ink);
  font-size: 0.84rem;
}

.performance-summary__chip-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  flex-shrink: 0;
}

.performance-summary__note {
  margin-top: 14px;
  padding: 10px 12px;
  border-left: 3px solid rgba(130, 43, 57, 0.35);
  border-radius: 0 12px 12px 0;
  background: rgba(130, 43, 57, 0.05);
  color: var(--performance-muted);
  line-height: 1.62;
}

.performance-results {
  padding: 16px 22px 22px;
  overflow: visible;
}

.performance-results__meta {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: start;
  margin-bottom: 14px;
}

.performance-results__meta p {
  margin: 0;
  color: var(--performance-muted);
  line-height: 1.65;
}

.performance-results__counts {
  color: var(--performance-muted);
  font-size: 0.9rem;
  text-align: right;
  line-height: 1.55;
}

.performance-result-list {
  display: grid;
  gap: 14px;
}

.performance-result-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 196px;
  gap: 18px;
  width: 100%;
  padding: 16px;
  border: 1px solid var(--performance-line);
  border-radius: 20px;
  background: #fcfcfa;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition:
    border-color var(--performance-transition),
    background var(--performance-transition);
}

.performance-result-card:hover {
  border-color: var(--performance-line-strong);
  background: #fff;
}

.performance-result-card.is-active {
  border-color: rgba(130, 43, 57, 0.26);
  background: #fff;
}

.performance-result-card__body {
  display: grid;
  gap: 12px;
  align-content: start;
  min-width: 0;
}

.performance-result-card__meta,
.performance-reader__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.performance-result-card__pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--performance-surface-soft);
  color: var(--performance-ink);
  font-size: 0.78rem;
  font-weight: 700;
}

.performance-result-card__swatch {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  flex-shrink: 0;
}

.performance-result-card__title {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.42;
  color: var(--performance-ink);
}

.performance-result-card__summary {
  margin: 0;
  color: rgba(18, 32, 29, 0.78);
  line-height: 1.68;
}

.performance-result-card__footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  color: var(--performance-muted);
  font-size: 0.87rem;
}

.performance-result-card__read {
  color: var(--performance-accent);
  font-weight: 700;
}

.performance-result-card__media {
  min-height: 156px;
  border-radius: 18px;
  background-color: #dfe6e2;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.performance-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.performance-pagination button {
  min-width: 42px;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--performance-line);
  border-radius: 12px;
  background: var(--performance-surface-soft);
  color: var(--performance-ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition:
    background var(--performance-transition),
    border-color var(--performance-transition),
    transform var(--performance-transition);
}

.performance-pagination button:hover {
  transform: translateY(-1px);
}

.performance-pagination button.is-active {
  border-color: rgba(130, 43, 57, 0.26);
  background: var(--performance-accent-soft);
  color: var(--performance-accent);
}

.performance-map-card {
  display: grid;
  grid-template-rows: auto auto auto auto;
  padding: 18px;
  width: 100%;
  margin: 0;
}

.performance-map-card__header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: start;
}

.performance-map-card__header h2 {
  margin: 0;
  font-size: 1.16rem;
  color: var(--performance-ink);
}

.performance-map-card__header p {
  margin: 8px 0 0;
  color: var(--performance-muted);
  line-height: 1.65;
}

.performance-map-card__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--performance-surface-soft);
  color: var(--performance-accent);
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.performance-map-focus {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(130, 43, 57, 0.05);
  color: var(--performance-muted);
  line-height: 1.68;
}

.performance-map-stage {
  position: relative;
  margin-top: 14px;
  padding: 8px;
  border: 1px solid var(--performance-line);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(130, 43, 57, 0.025), rgba(130, 43, 57, 0.008));
  display: grid;
  place-items: center;
  aspect-ratio: 940 / 980;
  width: min(100%, 920px);
  margin-left: auto;
  margin-right: auto;
}

.performance-map-svg {
  width: 100%;
  min-height: 100%;
  max-height: 100%;
  height: auto;
  display: block;
}

.performance-map-svg path {
  stroke: rgba(18, 32, 29, 0.26);
  stroke-width: 1.3;
  cursor: pointer;
  transition:
    opacity var(--performance-transition),
    stroke var(--performance-transition),
    stroke-width var(--performance-transition),
    filter var(--performance-transition);
}

.performance-map-svg path:hover,
.performance-map-svg path.is-selected {
  stroke: var(--performance-accent);
  stroke-width: 2.3;
  filter: brightness(1.03);
}

.performance-map-tooltip {
  position: absolute;
  max-width: 220px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.92);
  color: #fff;
  font-size: 0.82rem;
  line-height: 1.5;
  pointer-events: none;
  z-index: 3;
}

.performance-map-tooltip strong {
  display: block;
  font-size: 0.88rem;
}

.performance-map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--performance-line);
}

.performance-map-legend__item {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  min-height: 28px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: var(--performance-muted);
  line-height: 1.45;
}

.performance-map-legend__swatch {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  flex-shrink: 0;
}

.performance-reader {
  grid-column: 1 / -1;
  padding: 24px;
}

.performance-reader__empty {
  display: grid;
  place-items: center;
  min-height: 220px;
  border: 1px dashed var(--performance-line-strong);
  border-radius: 20px;
  background: var(--performance-surface-soft);
  color: var(--performance-muted);
  text-align: center;
  line-height: 1.7;
}

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

.performance-reader__kicker {
  color: var(--performance-burgundy);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.performance-reader__head a {
  color: var(--performance-accent);
  font-weight: 700;
  text-decoration: none;
}

.performance-reader__article {
  margin-top: 18px;
}

.performance-reader__hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr);
  gap: 24px;
  align-items: start;
}

.performance-reader__copy h2 {
  margin: 14px 0 0;
  font-family: inherit;
  font-weight: 800;
  letter-spacing: -0.03em;
  font-size: clamp(2rem, 3vw, 2.8rem);
  line-height: 1.06;
  color: var(--performance-ink);
}

.performance-reader__lede {
  margin: 16px 0 0;
  color: rgba(18, 32, 29, 0.82);
  font-size: 1rem;
  line-height: 1.82;
}

.performance-reader__image {
  min-height: 300px;
  border-radius: 24px;
  background-color: #dfe6e2;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.performance-reader__body {
  margin-top: 24px;
  color: var(--performance-ink);
  line-height: 1.9;
}

.performance-reader__body > *:first-child {
  margin-top: 0;
}

.performance-reader__body p,
.performance-reader__body ul,
.performance-reader__body ol,
.performance-reader__body blockquote,
.performance-reader__body table {
  margin-top: 0;
  margin-bottom: 1.1em;
}

.performance-reader__body img,
.performance-reader__body iframe,
.performance-reader__body table {
  max-width: 100%;
}

.performance-empty,
.performance-noscript {
  padding: 24px;
  color: var(--performance-muted);
  line-height: 1.7;
}

.performance-skeleton {
  border-radius: 18px;
  background: linear-gradient(90deg, rgba(226, 222, 212, 0.5), rgba(248, 247, 242, 0.95), rgba(226, 222, 212, 0.5));
  background-size: 220% 100%;
  animation: performance-skeleton 1.4s ease infinite;
}

.performance-skeleton--summary {
  min-height: 150px;
}

.performance-skeleton--stories {
  min-height: 320px;
}

.performance-skeleton--reader {
  min-height: 320px;
}

@keyframes performance-skeleton {
  0% {
    background-position: 100% 0;
  }

  100% {
    background-position: -100% 0;
  }
}

@media (max-width: 1240px) {
  .performance-filter-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .performance-filter-actions {
    grid-column: 1 / -1;
  }

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

  .performance-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1100px) {
  .performance-results,
  .performance-map-card {
    overflow: visible;
  }

  .performance-reader {
    grid-column: auto;
  }

  .performance-reader__hero {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 840px) {
  .performance-page {
    padding-left: 16px;
    padding-right: 16px;
  }

  .performance-toolbar,
  .performance-summary-panel,
  .performance-results,
  .performance-map-card,
  .performance-reader {
    padding-left: 18px;
    padding-right: 18px;
  }

  .performance-toolbar__intro,
  .performance-summary__lead,
  .performance-results__meta,
  .performance-map-card__header,
  .performance-reader__head {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: flex-start;
  }

  .performance-filter-form {
    grid-template-columns: 1fr;
  }

  .performance-filter-actions {
    flex-direction: column;
  }

  .performance-summary__stats {
    grid-template-columns: 1fr;
  }

  .performance-result-card {
    grid-template-columns: 1fr;
  }

  .performance-result-card__media {
    min-height: 220px;
    order: -1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .performance-button,
  .performance-result-card,
  .performance-pagination button,
  .performance-multi-select__trigger,
  .performance-map-svg path,
  .performance-skeleton {
    transition: none;
    animation: none;
  }
}
