/* Filament custom views — dark-mode aware */

.seo-health {
  margin-bottom: 1.5rem;
  overflow: hidden;
  border: 1px solid color-mix(in oklab, var(--gray-950, #111827) 8%, transparent);
  border-radius: 0.75rem;
  background: var(--color-white, #fff);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.dark .seo-health {
  border-color: color-mix(in oklab, var(--color-white, #fff) 10%, transparent);
  background: var(--gray-900, #18181b);
  box-shadow: none;
}

.seo-health__header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--gray-100, #f3f4f6);
}

.dark .seo-health__header {
  border-bottom-color: color-mix(in oklab, var(--color-white, #fff) 8%, transparent);
}

.seo-health__intro {
  min-width: 12rem;
  flex: 1;
}

.seo-health__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray-950, #111827);
}

.dark .seo-health__title {
  color: var(--color-white, #f4f4f5);
}

.seo-health__lede {
  margin: 0.35rem 0 0;
  font-size: 0.875rem;
  line-height: 1.4;
  color: var(--gray-500, #6b7280);
}

.dark .seo-health__lede {
  color: var(--gray-400, #a1a1aa);
}

.seo-health__score {
  padding: 0.5rem 0.85rem;
  border-radius: 0.65rem;
  text-align: right;
}

.seo-health__score-value {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.seo-health__score-label {
  margin-top: 0.2rem;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gray-500, #6b7280);
}

.dark .seo-health__score-label {
  color: var(--gray-400, #a1a1aa);
}

.seo-health__score--good {
  background: #dcfce7;
  color: #15803d;
}

.seo-health__score--mid {
  background: #fef9c3;
  color: #a16207;
}

.seo-health__score--bad {
  background: #fee2e2;
  color: #b91c1c;
}

.dark .seo-health__score--good {
  background: #14532d;
  color: #86efac;
}

.dark .seo-health__score--mid {
  background: #422006;
  color: #fbbf24;
}

.dark .seo-health__score--bad {
  background: #450a0a;
  color: #fca5a5;
}

.seo-health__coverage {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  font-size: 0.875rem;
}

.seo-health__stat {
  border-radius: 0.5rem;
  background: var(--gray-50, #f9fafb);
  padding: 0.65rem 0.75rem;
}

.dark .seo-health__stat {
  background: color-mix(in oklab, var(--color-white, #fff) 5%, transparent);
}

.seo-health__stat-label {
  font-size: 0.75rem;
  color: var(--gray-500, #6b7280);
}

.dark .seo-health__stat-label {
  color: var(--gray-400, #a1a1aa);
}

.seo-health__stat-value {
  margin-top: 0.15rem;
  font-weight: 600;
  color: var(--gray-950, #111827);
}

.dark .seo-health__stat-value {
  color: var(--color-white, #f4f4f5);
}

.seo-health__body {
  padding: 0 1.5rem 1.25rem;
}

.seo-health__heading {
  margin: 0 0 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gray-950, #111827);
}

.dark .seo-health__heading {
  color: var(--color-white, #f4f4f5);
}

.seo-health__checks {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.seo-health__check {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  border: 1px solid var(--gray-100, #f3f4f6);
  border-radius: 0.5rem;
  padding: 0.65rem 0.75rem;
}

.dark .seo-health__check {
  border-color: color-mix(in oklab, var(--color-white, #fff) 8%, transparent);
}

.seo-health__badge {
  margin-top: 0.1rem;
  display: inline-flex;
  height: 1.25rem;
  width: 1.25rem;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 700;
}

.seo-health__badge--ok {
  background: #dcfce7;
  color: #166534;
}

.seo-health__badge--warn {
  background: #fef3c7;
  color: #92400e;
}

.dark .seo-health__badge--ok {
  background: #14532d;
  color: #86efac;
}

.dark .seo-health__badge--warn {
  background: #422006;
  color: #fbbf24;
}

.seo-health__check-body {
  min-width: 0;
  flex: 1;
}

.seo-health__check-label {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--gray-950, #111827);
}

.dark .seo-health__check-label {
  color: var(--color-white, #f4f4f5);
}

.seo-health__check-detail {
  margin-top: 0.15rem;
  font-size: 0.75rem;
  color: var(--gray-500, #6b7280);
  word-break: break-word;
}

.dark .seo-health__check-detail {
  color: var(--gray-400, #a1a1aa);
}

.seo-health__link {
  display: inline-block;
  margin-top: 0.35rem;
  font-size: 0.75rem;
  color: #6e0ad6;
  text-decoration: underline;
}

.dark .seo-health__link {
  color: #c4b5fd;
}

.seo-health__incomplete {
  padding: 1.25rem 1.5rem 1.5rem;
  border-top: 1px solid var(--gray-100, #f3f4f6);
}

.dark .seo-health__incomplete {
  border-top-color: color-mix(in oklab, var(--color-white, #fff) 8%, transparent);
}

.seo-health__incomplete .seo-health__heading {
  margin-bottom: 1rem;
}

.seo-health__groups {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.seo-health__group-label {
  margin-bottom: 0.45rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gray-500, #6b7280);
}

.dark .seo-health__group-label {
  color: var(--gray-400, #a1a1aa);
}

.seo-health__empty {
  margin: 0;
  font-size: 0.875rem;
  color: #15803d;
}

.dark .seo-health__empty {
  color: #86efac;
}

.seo-health__items {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.seo-health__item {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: baseline;
  font-size: 0.875rem;
}

.seo-health__item-link {
  font-weight: 600;
  color: #6e0ad6;
  text-decoration: underline;
}

.dark .seo-health__item-link {
  color: #c4b5fd;
}

.seo-health__item-name {
  font-weight: 600;
  color: var(--gray-950, #111827);
}

.dark .seo-health__item-name {
  color: var(--color-white, #f4f4f5);
}

.seo-health__item-issues {
  font-size: 0.75rem;
  color: var(--gray-500, #6b7280);
}

.dark .seo-health__item-issues {
  color: var(--gray-400, #a1a1aa);
}

/* Lead funnel cards */
.cp-lead-funnel {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

@media (min-width: 640px) {
  .cp-lead-funnel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .cp-lead-funnel {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

.cp-lead-funnel__card {
  border: 1px solid color-mix(in oklab, var(--gray-950, #111827) 8%, transparent);
  border-radius: 0.75rem;
  background: var(--color-white, #fff);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  padding: 1rem 1.1rem;
}

.dark .cp-lead-funnel__card {
  border-color: color-mix(in oklab, var(--color-white, #fff) 10%, transparent);
  background: var(--gray-900, #18181b);
  box-shadow: none;
}

.cp-lead-funnel__label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--gray-500, #6b7280);
}

.dark .cp-lead-funnel__label {
  color: var(--gray-400, #a1a1aa);
}

.cp-lead-funnel__count {
  margin-top: 0.45rem;
  font-size: 1.5rem;
  font-weight: 650;
  line-height: 1.15;
  color: var(--gray-950, #111827);
  font-variant-numeric: tabular-nums;
}

.dark .cp-lead-funnel__count {
  color: var(--color-white, #f4f4f5);
}

.cp-lead-funnel__value {
  margin-top: 0.3rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #6e0ad6;
  font-variant-numeric: tabular-nums;
}

.dark .cp-lead-funnel__value {
  color: #c4b5fd;
}

.cp-lead-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.cp-lead-toolbar__search {
  flex: 1 1 16rem;
  min-width: 16rem;
  max-width: 28rem;
}

/* Marketing dashboard */
.mkt-dashboard {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.mkt-dashboard__stats {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .mkt-dashboard__stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1280px) {
  .mkt-dashboard__stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.mkt-dashboard__card,
.mkt-dashboard__panel,
.mkt-dashboard__channel,
.mkt-property__channel-card,
.mkt-property__panel {
  border: 1px solid color-mix(in oklab, var(--gray-950, #111827) 8%, transparent);
  border-radius: 0.75rem;
  background: var(--color-white, #fff);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.dark .mkt-dashboard__card,
.dark .mkt-dashboard__panel,
.dark .mkt-dashboard__channel,
.dark .mkt-property__channel-card,
.dark .mkt-property__panel {
  border-color: color-mix(in oklab, var(--color-white, #fff) 10%, transparent);
  background: var(--gray-900, #18181b);
  box-shadow: none;
}

.mkt-dashboard__card {
  padding: 1rem 1.1rem;
}

.mkt-dashboard__label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--gray-500, #6b7280);
}

.dark .mkt-dashboard__label {
  color: var(--gray-400, #a1a1aa);
}

.mkt-dashboard__count {
  margin-top: 0.45rem;
  font-size: 1.75rem;
  font-weight: 650;
  line-height: 1.15;
  color: var(--gray-950, #111827);
  font-variant-numeric: tabular-nums;
}

.mkt-dashboard__count--sm {
  font-size: 1.35rem;
}

.dark .mkt-dashboard__count {
  color: var(--color-white, #f4f4f5);
}

.mkt-dashboard__panel {
  padding: 1rem 1.1rem;
}

.mkt-dashboard__panel-title {
  margin: 0 0 1rem;
  font-size: 1rem;
  font-weight: 600;
}

.mkt-dashboard__channels {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .mkt-dashboard__channels {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .mkt-dashboard__channels {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.mkt-dashboard__channel {
  padding: 0.85rem 1rem;
  background: color-mix(in oklab, var(--gray-950, #111827) 3%, transparent);
}

.dark .mkt-dashboard__channel {
  background: color-mix(in oklab, var(--color-white, #fff) 5%, transparent);
}

/* Property marketing page */
.mkt-property {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.mkt-property__channels {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .mkt-property__channels {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .mkt-property__channels {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.mkt-property__channel-card {
  padding: 1rem;
}

.mkt-property__channel-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
}

.mkt-property__channel-status {
  margin-top: 0.25rem;
  font-size: 0.8125rem;
  color: var(--gray-500, #6b7280);
}

.mkt-property__channel-date {
  margin-top: 0.15rem;
  font-size: 0.75rem;
  color: var(--gray-400, #9ca3af);
}

.mkt-property__tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid color-mix(in oklab, var(--gray-950, #111827) 8%, transparent);
}

.dark .mkt-property__tabs {
  border-bottom-color: color-mix(in oklab, var(--color-white, #fff) 10%, transparent);
}

.mkt-property__tab {
  border: 0;
  border-radius: 0.5rem;
  padding: 0.4rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  background: color-mix(in oklab, var(--gray-950, #111827) 6%, transparent);
  color: var(--gray-700, #374151);
}

.dark .mkt-property__tab {
  background: color-mix(in oklab, var(--color-white, #fff) 8%, transparent);
  color: var(--gray-200, #e5e7eb);
}

.mkt-property__tab--active {
  background: #6e0ad6;
  color: #fff;
}

.mkt-property__panel {
  overflow: hidden;
}

.mkt-property__panel-head {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid color-mix(in oklab, var(--gray-950, #111827) 6%, transparent);
  font-weight: 600;
}

.dark .mkt-property__panel-head {
  border-bottom-color: color-mix(in oklab, var(--color-white, #fff) 8%, transparent);
}

.mkt-property__empty,
.mkt-property__hint {
  padding: 1rem;
  font-size: 0.875rem;
  color: var(--gray-500, #6b7280);
}

.mkt-property__hint {
  padding-top: 0;
  padding-bottom: 0.75rem;
}

.mkt-property__list {
  display: flex;
  flex-direction: column;
}

.mkt-property__row {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem;
  border-top: 1px solid color-mix(in oklab, var(--gray-950, #111827) 5%, transparent);
}

.mkt-property__row:first-child {
  border-top: 0;
}

@media (min-width: 640px) {
  .mkt-property__row {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.dark .mkt-property__row {
  border-top-color: color-mix(in oklab, var(--color-white, #fff) 6%, transparent);
}

.mkt-property__row-title {
  font-weight: 600;
}

.mkt-property__row-meta {
  font-size: 0.8125rem;
  color: var(--gray-500, #6b7280);
}

.mkt-property__row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.mkt-property__btn {
  border: 0;
  border-radius: 0.5rem;
  padding: 0.35rem 0.65rem;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  background: color-mix(in oklab, var(--gray-950, #111827) 6%, transparent);
  color: var(--gray-800, #1f2937);
}

.dark .mkt-property__btn {
  background: color-mix(in oklab, var(--color-white, #fff) 10%, transparent);
  color: var(--gray-100, #f3f4f6);
}

.mkt-property__btn--primary {
  background: #6e0ad6;
  color: #fff;
}

.mkt-property__btn--danger {
  background: color-mix(in oklab, #dc2626 12%, transparent);
  color: #b91c1c;
}

.mkt-property__section-title {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.mkt-property__link,
.mkt-property__link-danger {
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 0.75rem;
  padding: 0;
}

.mkt-property__link {
  color: #6e0ad6;
}

.mkt-property__link-danger {
  color: #dc2626;
}

.mkt-competition {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 1024px) {
  .mkt-competition {
    grid-template-columns: 1fr 1fr;
  }
}

.mkt-competition__col {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.mkt-competition__block {
  padding: 1rem;
}

.mkt-competition__add {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.mkt-competition__input {
  flex: 1;
  min-width: 0;
  border-radius: 0.5rem;
  border: 1px solid color-mix(in oklab, var(--gray-950, #111827) 12%, transparent);
  background: var(--color-white, #fff);
  padding: 0.45rem 0.7rem;
  font-size: 0.875rem;
}

.dark .mkt-competition__input {
  border-color: color-mix(in oklab, var(--color-white, #fff) 15%, transparent);
  background: color-mix(in oklab, var(--color-white, #fff) 5%, transparent);
  color: var(--color-white, #fff);
}

.mkt-competition__item {
  border: 1px solid color-mix(in oklab, var(--gray-950, #111827) 6%, transparent);
  border-radius: 0.5rem;
  padding: 0.75rem;
  margin-bottom: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.dark .mkt-competition__item {
  border-color: color-mix(in oklab, var(--color-white, #fff) 8%, transparent);
}

.mkt-competition__url {
  font-size: 0.8125rem;
  word-break: break-all;
}

.mkt-competition__url a {
  color: #6e0ad6;
}

.mkt-competition__analysis {
  font-size: 0.75rem;
  color: var(--gray-600, #4b5563);
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.dark .mkt-competition__analysis {
  color: var(--gray-300, #d1d5db);
}

.mkt-competition__error {
  font-size: 0.75rem;
  color: #dc2626;
}

.mkt-competition__term {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.35rem 0;
  font-size: 0.875rem;
  border-bottom: 1px solid color-mix(in oklab, var(--gray-950, #111827) 4%, transparent);
}

.mkt-competition__term:last-child {
  border-bottom: 0;
}

.mkt-competition__term-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.mkt-competition__compare {
  margin: 0 0 0.75rem;
  padding-left: 1.1rem;
  font-size: 0.875rem;
  color: var(--gray-600, #4b5563);
}

.dark .mkt-competition__compare {
  color: var(--gray-300, #d1d5db);
}

.mkt-competition__subtitle {
  margin: 0.85rem 0 0.35rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--gray-700, #374151);
}

.dark .mkt-competition__subtitle {
  color: var(--gray-200, #e5e7eb);
}

.mkt-competition__badge {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.05rem 0.35rem;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  background: color-mix(in oklab, #6e0ad6 12%, transparent);
  color: #6e0ad6;
}

.mkt-competition__term--stack {
  flex-direction: column;
  align-items: stretch;
}

.mkt-competition__term-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.pagespeed__scores {
  display: flex;
  flex-wrap: wrap;
  flex-shrink: 0;
  gap: 0.75rem;
}

.pagespeed.seo-health {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.pagespeed .seo-health__header {
  align-items: flex-start;
}

.pagespeed .seo-health__intro {
  min-width: 0;
  flex: 1 1 14rem;
}

.pagespeed .seo-health__score {
  min-width: 5.5rem;
  text-align: center;
}

/* PageSpeed Insights panel */
.pagespeed__alert {
  margin: 0 1.5rem 1rem;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.45;
}

.pagespeed__alert--warn {
  background: color-mix(in oklab, #f59e0b 14%, transparent);
  color: #92400e;
}

.dark .pagespeed__alert--warn {
  color: #fcd34d;
}

.pagespeed__alert--info {
  background: color-mix(in oklab, #6e0ad6 10%, transparent);
  color: var(--gray-700, #374151);
}

.dark .pagespeed__alert--info {
  color: var(--gray-200, #e5e7eb);
}

.pagespeed__alert a {
  color: #6e0ad6;
  text-decoration: underline;
}

.pagespeed__alert code {
  font-size: 0.8125rem;
}

.pagespeed__progress,
.pagespeed__meta {
  margin: 0 1.5rem 1rem;
  font-size: 0.875rem;
  color: var(--gray-600, #4b5563);
}

.dark .pagespeed__progress,
.dark .pagespeed__meta {
  color: var(--gray-300, #d1d5db);
}

.pagespeed__progress {
  padding: 0.65rem 0.85rem;
  border-radius: 0.5rem;
  background: color-mix(in oklab, #6e0ad6 10%, transparent);
}

.pagespeed__progress--row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.pagespeed__cancel-btn {
  flex-shrink: 0;
  margin: 0;
  padding: 0.4rem 0.85rem;
  border-radius: 0.45rem;
  border: 1px solid color-mix(in oklab, #dc2626 35%, transparent);
  background: color-mix(in oklab, #dc2626 12%, transparent);
  box-shadow: none;
  color: #b91c1c;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 650;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.pagespeed__cancel-btn:hover {
  background: color-mix(in oklab, #dc2626 20%, transparent);
}

.dark .pagespeed__cancel-btn {
  color: #fca5a5;
  border-color: color-mix(in oklab, #fca5a5 35%, transparent);
}

.pagespeed__body,
.pagespeed__opportunities,
.pagespeed__crux,
.pagespeed__report {
  padding: 1rem 1.5rem 1.25rem;
  border-top: 1px solid color-mix(in oklab, var(--gray-950, #111827) 6%, transparent);
  min-width: 0;
}

.dark .pagespeed__body,
.dark .pagespeed__opportunities,
.dark .pagespeed__crux,
.dark .pagespeed__report {
  border-top-color: color-mix(in oklab, var(--color-white, #fff) 8%, transparent);
}

.pagespeed__crux-note {
  margin: 0.35rem 0 0.5rem;
  font-size: 0.8125rem;
  color: var(--gray-500, #6b7280);
}

.dark .pagespeed__crux-note {
  color: var(--gray-400, #a1a1aa);
}

.pagespeed__crux-overall {
  margin: 0;
  font-size: 0.875rem;
}

.pagespeed__pages {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.pagespeed__page {
  border: 1px solid color-mix(in oklab, var(--gray-950, #111827) 8%, transparent);
  border-radius: 0.65rem;
  overflow: hidden;
  background: var(--color-white, #fff);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.dark .pagespeed__page {
  border-color: color-mix(in oklab, var(--color-white, #fff) 10%, transparent);
  background: color-mix(in oklab, var(--color-white, #fff) 3%, transparent);
  box-shadow: none;
}

.pagespeed__page--open {
  border-color: color-mix(in oklab, #6e0ad6 28%, transparent);
  box-shadow: 0 1px 3px color-mix(in oklab, #6e0ad6 12%, transparent);
}

.dark .pagespeed__page--open {
  border-color: color-mix(in oklab, #a855f7 35%, transparent);
}

.pagespeed__page-summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem 0.85rem;
  width: 100%;
  margin: 0;
  padding: 0.85rem 1rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  text-align: left;
  cursor: pointer;
  color: inherit;
  font: inherit;
  appearance: none;
  -webkit-appearance: none;
}

.pagespeed__page-summary:hover {
  background: color-mix(in oklab, var(--gray-950, #111827) 3%, transparent);
}

.dark .pagespeed__page-summary:hover {
  background: color-mix(in oklab, var(--color-white, #fff) 5%, transparent);
}

.pagespeed__page-summary:focus-visible {
  outline: 2px solid color-mix(in oklab, #6e0ad6 55%, transparent);
  outline-offset: -2px;
}

.pagespeed__page-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 999px;
  background: color-mix(in oklab, var(--gray-950, #111827) 5%, transparent);
  color: var(--gray-500, #6b7280);
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.dark .pagespeed__page-chevron {
  background: color-mix(in oklab, var(--color-white, #fff) 8%, transparent);
  color: var(--gray-300, #d1d5db);
}

.pagespeed__page--open .pagespeed__page-chevron {
  transform: rotate(90deg);
  background: color-mix(in oklab, #6e0ad6 14%, transparent);
  color: #6e0ad6;
}

.dark .pagespeed__page--open .pagespeed__page-chevron {
  background: color-mix(in oklab, #a855f7 18%, transparent);
  color: #d8b4fe;
}

.pagespeed__page-main {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.pagespeed__page-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

.pagespeed__page-time {
  font-size: 0.75rem;
  color: var(--gray-500, #6b7280);
  font-variant-numeric: tabular-nums;
}

.pagespeed__page-time--pending {
  display: inline-flex;
  align-items: center;
  padding: 0.05rem 0.4rem;
  border-radius: 999px;
  background: color-mix(in oklab, #6e0ad6 10%, transparent);
  color: #6e0ad6;
  font-weight: 600;
  font-size: 0.6875rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.dark .pagespeed__page-time {
  color: var(--gray-400, #a1a1aa);
}

.dark .pagespeed__page-time--pending {
  background: color-mix(in oklab, #a855f7 16%, transparent);
  color: #e9d5ff;
}

.pagespeed__page-scores {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.45rem;
}

.pagespeed__score-chip {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1rem;
  min-width: 4.5rem;
  padding: 0.35rem 0.55rem;
  border-radius: 0.5rem;
  line-height: 1.15;
}

.pagespeed__score-device {
  font-size: 0.625rem;
  font-weight: 650;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  opacity: 0.8;
}

.pagespeed__score-value {
  font-size: 1.05rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.pagespeed__score-chip--good {
  background: #dcfce7;
  color: #15803d;
}

.pagespeed__score-chip--mid {
  background: #fef9c3;
  color: #a16207;
}

.pagespeed__score-chip--bad {
  background: #fee2e2;
  color: #b91c1c;
}

.dark .pagespeed__score-chip--good {
  background: #14532d;
  color: #86efac;
}

.dark .pagespeed__score-chip--mid {
  background: #422006;
  color: #fbbf24;
}

.dark .pagespeed__score-chip--bad {
  background: #450a0a;
  color: #fca5a5;
}

.pagespeed__page-details {
  padding: 0 1rem 1rem 3.1rem;
  border-top: 1px solid color-mix(in oklab, var(--gray-950, #111827) 6%, transparent);
  background: color-mix(in oklab, var(--gray-950, #111827) 1.5%, transparent);
}

.dark .pagespeed__page-details {
  border-top-color: color-mix(in oklab, var(--color-white, #fff) 8%, transparent);
  background: color-mix(in oklab, var(--color-white, #fff) 2%, transparent);
}

.pagespeed__page-url {
  margin: 0.75rem 0 0.85rem;
  font-size: 0.75rem;
  color: var(--gray-500, #6b7280);
  word-break: break-all;
}

.dark .pagespeed__page-url {
  color: var(--gray-400, #a1a1aa);
}

.pagespeed__detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 0.75rem;
}

.pagespeed__detail-card {
  padding: 0.85rem;
  border: 1px solid color-mix(in oklab, var(--gray-950, #111827) 7%, transparent);
  border-radius: 0.55rem;
  background: var(--color-white, #fff);
}

.dark .pagespeed__detail-card {
  border-color: color-mix(in oklab, var(--color-white, #fff) 10%, transparent);
  background: color-mix(in oklab, var(--color-white, #fff) 4%, transparent);
}

.pagespeed__detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}

.pagespeed__detail-title {
  font-size: 0.8125rem;
  font-weight: 650;
  color: var(--gray-950, #111827);
}

.dark .pagespeed__detail-title {
  color: var(--color-white, #f4f4f5);
}

.pagespeed__detail-empty {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--gray-500, #6b7280);
}

.pagespeed__metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.4rem;
  margin: 0 0 0.75rem;
}

.pagespeed__metric {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
  padding: 0.4rem 0.5rem;
  border-radius: 0.4rem;
  background: color-mix(in oklab, var(--gray-950, #111827) 3.5%, transparent);
}

.dark .pagespeed__metric {
  background: color-mix(in oklab, var(--color-white, #fff) 5%, transparent);
}

.pagespeed__metric-label {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--gray-500, #6b7280);
}

.dark .pagespeed__metric-label {
  color: var(--gray-400, #a1a1aa);
}

.pagespeed__metric-value {
  font-size: 0.8125rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  color: var(--gray-950, #111827);
  word-break: break-word;
}

.dark .pagespeed__metric-value {
  color: var(--color-white, #f4f4f5);
}

.pagespeed__psi-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #6e0ad6;
  text-decoration: none;
}

.pagespeed__psi-link:hover {
  text-decoration: underline;
}

.dark .pagespeed__psi-link {
  color: #c084fc;
}

.pagespeed__label {
  font-size: 0.9375rem;
  font-weight: 650;
  color: var(--gray-950, #111827);
}

.dark .pagespeed__label {
  color: var(--color-white, #f4f4f5);
}

.pagespeed__url {
  margin-top: 0.15rem;
  font-size: 0.75rem;
  color: var(--gray-500, #6b7280);
  word-break: break-all;
}

.dark .pagespeed__url {
  color: var(--gray-400, #a1a1aa);
}

.pagespeed__error {
  margin: 0 0 0.55rem;
  padding: 0.45rem 0.55rem;
  border-radius: 0.4rem;
  background: color-mix(in oklab, #dc2626 10%, transparent);
  font-size: 0.75rem;
  line-height: 1.4;
  color: #b91c1c;
}

.dark .pagespeed__error {
  color: #fca5a5;
}

.pagespeed__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.pagespeed__badge--good {
  background: #dcfce7;
  color: #15803d;
}

.pagespeed__badge--mid {
  background: #fef9c3;
  color: #a16207;
}

.pagespeed__badge--bad {
  background: #fee2e2;
  color: #b91c1c;
}

.dark .pagespeed__badge--good {
  background: #14532d;
  color: #86efac;
}

.dark .pagespeed__badge--mid {
  background: #422006;
  color: #fbbf24;
}

.dark .pagespeed__badge--bad {
  background: #450a0a;
  color: #fca5a5;
}

@media (max-width: 640px) {
  .pagespeed__page-summary {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .pagespeed__page-scores {
    grid-column: 1 / -1;
    justify-content: flex-start;
    padding-left: 2.35rem;
  }

  .pagespeed__page-details {
    padding-left: 1rem;
  }
}

.pagespeed__opp-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.pagespeed__opp-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid color-mix(in oklab, var(--gray-950, #111827) 5%, transparent);
  font-size: 0.875rem;
}

.dark .pagespeed__opp-list li {
  border-bottom-color: color-mix(in oklab, var(--color-white, #fff) 6%, transparent);
}

.pagespeed__opp-savings {
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
  color: var(--gray-500, #6b7280);
}

.dark .pagespeed__opp-savings {
  color: var(--gray-400, #a1a1aa);
}

.pagespeed__report-lede {
  margin: 0.35rem 0 0.85rem;
  font-size: 0.8125rem;
  color: var(--gray-500, #6b7280);
}

.dark .pagespeed__report-lede {
  color: var(--gray-400, #a1a1aa);
}

.pagespeed__subheading {
  margin: 0.85rem 0 0.4rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--gray-700, #374151);
}

.dark .pagespeed__subheading {
  color: var(--gray-200, #e5e7eb);
}

.pagespeed__weak-list,
.pagespeed__improve-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.pagespeed__weak-list li {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid color-mix(in oklab, var(--gray-950, #111827) 5%, transparent);
  font-size: 0.875rem;
}

.dark .pagespeed__weak-list li {
  border-bottom-color: color-mix(in oklab, var(--color-white, #fff) 6%, transparent);
}

.pagespeed__weak-title {
  font-weight: 600;
}

.pagespeed__device {
  margin-left: 0.35rem;
  font-weight: 500;
  font-size: 0.75rem;
  color: var(--gray-500, #6b7280);
}

.pagespeed__weak-meta {
  font-size: 0.75rem;
  color: var(--gray-500, #6b7280);
  font-variant-numeric: tabular-nums;
}

.dark .pagespeed__device,
.dark .pagespeed__weak-meta {
  color: var(--gray-400, #a1a1aa);
}

.pagespeed__improve-list {
  counter-reset: psi-improve;
}

.pagespeed__improve-item {
  counter-increment: psi-improve;
  padding: 0.65rem 0;
  border-bottom: 1px solid color-mix(in oklab, var(--gray-950, #111827) 5%, transparent);
}

.dark .pagespeed__improve-item {
  border-bottom-color: color-mix(in oklab, var(--color-white, #fff) 6%, transparent);
}

.pagespeed__improve-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.pagespeed__improve-head strong::before {
  content: counter(psi-improve) ". ";
  color: var(--gray-500, #6b7280);
  font-weight: 600;
}

.pagespeed__improve-desc {
  margin: 0.35rem 0 0.45rem;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--gray-600, #4b5563);
}

.dark .pagespeed__improve-desc {
  color: var(--gray-300, #d1d5db);
}

.pagespeed__improve-pages {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.pagespeed__chip {
  display: inline-block;
  padding: 0.1rem 0.45rem;
  border-radius: 0.35rem;
  font-size: 0.7rem;
  background: color-mix(in oklab, var(--gray-950, #111827) 6%, transparent);
  color: var(--gray-700, #374151);
}

.dark .pagespeed__chip {
  background: color-mix(in oklab, var(--color-white, #fff) 8%, transparent);
  color: var(--gray-200, #e5e7eb);
}



