.explore-page {
  padding-bottom: 40px;
}
.explore-toolbar,
.explore-actions,
.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.explore-toolbar {
  margin-bottom: 32px;
}
.explore-actions {
  justify-content: flex-start;
  gap: 12px;
}
.explore-page .page-heading p {
  max-width: 640px;
}
.discovery-stage {
  max-width: 880px;
  margin: 0 auto;
}
.discovery-card {
  border: 1px solid #dbe4de;
  border-radius: 24px;
  background: #fffefb;
  padding: 40px;
  box-shadow: 0 12px 40px #193c3505;
  animation: card-enter 0.24s ease-out;
}
.card-top {
  margin-bottom: 28px;
}
.discovery-card h2 {
  font-size: 38px;
  line-height: 1.2;
  overflow-wrap: anywhere;
  margin: 8px 0 20px;
}
.discovery-description {
  font-size: 18px;
  line-height: 1.8;
  min-height: 64px;
  overflow-wrap: anywhere;
}
.discovery-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  padding: 24px 0;
}
.discovery-facts strong {
  display: block;
  color: #176e72;
  font-size: 30px;
  font-weight: 600;
}
.discovery-facts span {
  display: block;
  color: #687477;
  margin-top: 8px;
}
.discovery-reason {
  display: flex;
  gap: 16px;
  padding: 24px;
  border-radius: 16px;
  background: #edf3ef;
  margin: 12px 0 24px;
}
.discovery-reason p {
  line-height: 1.8;
  margin: 8px 0 0;
}
.reason-star {
  color: #176e72;
  font-size: 28px;
}
.discovery-card .explore-actions {
  margin-top: 24px;
}
.empty-star {
  font-size: 48px;
  color: #8ab2a7;
  display: block;
  margin-bottom: 24px;
}
.explore-page > .data-note {
  text-align: center;
  margin-top: 24px;
}
.compare-slots,
.compare-metrics,
.compare-sample-tables {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
}
.compare-slot {
  border: 1px solid #dbe4de;
  border-radius: 20px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.slot-label {
  font-size: 13px;
  letter-spacing: 0.08em;
  color: #687477;
}
.compare-slot h2 {
  font-size: 24px;
  overflow-wrap: anywhere;
  line-height: 1.4;
  margin: 16px 0 8px;
}
.compare-slot p {
  line-height: 1.8;
  overflow-wrap: anywhere;
  flex: 1;
}
.slot-meta {
  color: #687477;
  font-size: 14px;
  line-height: 1.9;
  margin: 16px 0 24px;
}
.compare-picker,
.comparison-summary,
.comparison-chart {
  margin-top: 32px;
  padding: 32px;
}
.compare-picker label {
  display: block;
  font-weight: 600;
  margin-bottom: 12px;
}
.compare-picker input {
  width: 100%;
  min-height: 48px;
  padding: 12px 16px;
  border: 1px solid #dbe4de;
  border-radius: 12px;
  background: #fffefb;
  color: #243033;
  font: inherit;
  box-sizing: border-box;
}
.picker-results {
  margin-top: 16px;
  max-height: 420px;
  overflow-y: auto;
}
.picker-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  text-align: left;
  background: none;
  border: 0;
  border-bottom: 1px solid #e4e9e4;
  padding: 16px;
  width: 100%;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.picker-item:hover {
  background: #edf3ef;
}
.picker-item b,
.picker-item small {
  display: block;
  overflow-wrap: anywhere;
}
.picker-item small {
  color: #687477;
  margin-top: 8px;
  line-height: 1.7;
}
.compare-metrics {
  margin: 28px 0;
}
.compare-metrics > div {
  padding: 20px 24px;
  background: #f0f4ef;
  border-radius: 16px;
  overflow-wrap: anywhere;
}
.compare-metrics strong {
  display: block;
  font-size: 32px;
  color: #176e72;
  margin: 16px 0 8px;
}
.compare-metrics small {
  color: #687477;
  line-height: 1.8;
}
.comparison-conclusion {
  border-top: 1px solid #dbe4de;
  padding-top: 24px;
  line-height: 1.8;
}
.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 32px;
  font-size: 14px;
  margin: 24px 0;
}
.chart-legend span {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-wrap: anywhere;
}
.chart-legend i {
  display: inline-block;
  width: 24px;
  flex-shrink: 0;
  border-top: 3px solid #176e72;
}
.chart-legend .line-1 {
  border-color: #ad784a;
  border-top-style: dashed;
}
.compare-plot svg {
  width: 100%;
  height: auto;
  min-height: 220px;
  overflow: visible;
}
.compare-plot text {
  fill: #687477;
  font: 12px system-ui;
}
.compare-plot .grid-line {
  stroke: #e2e8e1;
  stroke-width: 1;
}
.compare-plot path {
  fill: none;
  stroke-width: 2.5;
  stroke-linejoin: round;
}
.series-0 {
  stroke: #176e72;
}
.series-1 {
  stroke: #ad784a;
  stroke-dasharray: 7 4;
}
.point-0 {
  fill: #176e72;
}
.point-1 {
  fill: #ad784a;
}
.sample-details {
  margin-top: 24px;
}
.sample-details summary {
  cursor: pointer;
  padding: 12px 0;
  color: #176e72;
}
.sample-scroll {
  max-height: 260px;
  overflow: auto;
}
.sample-scroll table {
  min-width: 0;
  width: 100%;
  font-size: 13px;
}
.sample-scroll td,
.sample-scroll th {
  padding: 10px 8px;
}
.compare-tray {
  position: fixed;
  z-index: 25;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: min(850px, calc(100% - 32px));
  box-sizing: border-box;
  border: 1px solid #cbdcd3;
  border-radius: 18px;
  background: #fffefa;
  box-shadow: 0 8px 40px #183d3524;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.compare-tray .tray-label {
  font-size: 14px;
  overflow-wrap: anywhere;
  line-height: 1.6;
}
.compare-tray .explore-actions {
  flex-shrink: 0;
}
.compare-tray ~ * {
  scroll-margin-bottom: 110px;
}
body:has(.compare-tray) footer {
  padding-bottom: 120px;
}
.compare-add {
  font-size: 12px;
  margin-top: 8px;
  padding: 6px 10px;
  min-height: 32px;
}
.explore-entry {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin: 32px 0 48px;
}
.explore-entry a {
  border: 1px solid #dbe4de;
  border-radius: 16px;
  padding: 24px;
  display: block;
}
.explore-entry b {
  font-size: 20px;
  display: block;
  margin-bottom: 10px;
}
.explore-entry span {
  color: #687477;
  font-size: 14px;
  line-height: 1.8;
}
.explore-entry a:hover {
  border-color: #7fa99d;
  background: #f0f4ef;
}
button[data-compare-add][aria-pressed="true"] {
  background: #e5f0e9;
  color: #176e72;
  border-color: #a2c6b5;
}
.explore-page button:focus-visible,
.explore-page input:focus-visible,
.compare-tray a:focus-visible {
  outline: 2px solid #176e72;
  outline-offset: 3px;
}
@keyframes card-enter {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
body.motion-paused .discovery-card {
  animation: none;
}
@media (prefers-reduced-motion: reduce) {
  .discovery-card {
    animation: none;
  }
}
@media (max-width: 640px) {
  .explore-toolbar {
    align-items: flex-start;
    gap: 20px;
  }
  .explore-entry,
  .compare-slots,
  .compare-metrics,
  .compare-sample-tables {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .discovery-card {
    padding: 24px;
    border-radius: 20px;
  }
  .discovery-card h2 {
    font-size: 30px;
  }
  .discovery-reason {
    padding: 16px;
    gap: 12px;
  }
  .discovery-facts {
    gap: 16px;
  }
  .discovery-facts strong {
    font-size: 24px;
  }
  .explore-actions .btn {
    min-height: 44px;
  }
  .compare-slot,
  .compare-picker,
  .comparison-summary,
  .comparison-chart {
    padding: 20px;
  }
  .compare-tray {
    bottom: 12px;
    flex-direction: column;
    align-items: stretch;
    padding: 14px 16px;
    gap: 12px;
  }
  .compare-tray .explore-actions {
    justify-content: space-between;
  }
  .compare-tray .tray-label {
    font-size: 12px;
  }
  .compare-plot svg {
    min-height: 160px;
  }
  .compare-slot h2 {
    font-size: 21px;
  }
  .compare-metrics strong {
    font-size: 28px;
  }
  .comparison-chart .section-head {
    align-items: flex-start;
    gap: 20px;
  }
  .comparison-chart .seg {
    flex-shrink: 0;
  }
  .explore-page .page-heading h1 {
    font-size: 34px;
  }
}

.picker-item small {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.exploration-disabled .explore-entry,
.exploration-disabled [data-compare-add],
.exploration-disabled nav a[href="/discover"] {
  display: none;
}

@media (max-width: 640px) {
  .compare-add {
    min-height: 44px;
  }
}
