:root {
  color-scheme: light;
  --bg: #f7f7f4;
  --surface: #ffffff;
  --ink: #171717;
  --muted: #696963;
  --line: #e5e1d8;
  --soft: #efede7;
  --accent: #173c34;
  --accent-soft: #e3eee8;
  --action-gradient: linear-gradient(135deg, #d4fc79 0%, #96e6a1 100%);
  --warn: #8a4b16;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
}

.site-header {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  min-height: 72px;
  padding: 0 40px;
}

.brand,
.nav,
.hero-panel,
.toolbar,
.competition-card,
.metrics,
.source-link,
.source-strip,
.source-logo-card {
  align-items: center;
  display: flex;
}

.brand {
  gap: 12px;
  font-weight: 700;
  text-decoration: none;
}

.brand-mark {
  background: var(--ink);
  border-radius: 50%;
  color: #fff;
  display: grid;
  font-size: 12px;
  height: 34px;
  letter-spacing: 0.04em;
  place-items: center;
  width: 34px;
}

.nav {
  flex-wrap: wrap;
  gap: 24px;
  font-size: 14px;
  justify-content: flex-end;
}

.nav a,
.source-link {
  color: var(--muted);
  text-decoration: none;
}

.nav a.is-active {
  color: var(--ink);
  font-weight: 700;
}

main {
  margin: 0 auto;
  max-width: 1180px;
  padding: 56px 32px;
}

.hero {
  display: grid;
  gap: 32px;
  grid-template-columns: minmax(0, 1fr) 360px;
  padding: 40px 0 48px;
}

.search-hero {
  padding: 40px 0 32px;
}

.eyebrow {
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  margin: 0 0 12px;
  text-transform: uppercase;
}

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

h1 {
  font-size: clamp(44px, 7vw, 88px);
  letter-spacing: 0;
  line-height: 0.95;
  margin-bottom: 24px;
  max-width: 860px;
}

h2 {
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: 0;
  line-height: 1;
  margin-bottom: 0;
}

.hero-text,
.monitoring p {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.65;
  max-width: 690px;
}

.hero-panel {
  align-self: end;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(23, 23, 23, 0.06);
  gap: 16px;
  padding: 22px;
}

.source-panel {
  margin: -18px 0 28px;
}

.source-panel-title {
  display: inline-block;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.2;
  margin: 0 0 12px;
  text-transform: uppercase;
}

.source-strip {
  gap: 12px;
  flex-wrap: wrap;
}

.source-logo-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: inherit;
  cursor: pointer;
  font: inherit;
  height: 145px;
  justify-content: center;
  padding: 22px;
  text-decoration: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
  width: 145px;
}

.source-logo-card.is-dark {
  background: #111;
  border-color: #111;
}

.source-logo-card.is-active {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.source-logo-card img {
  display: block;
  max-height: 86px;
  max-width: 96px;
}

.source-logo-card:hover {
  transform: translateY(-1px);
}

.source-all-card {
  background: var(--action-gradient);
  border-color: transparent;
  color: #173c34;
  font-size: 18px;
  font-weight: 900;
  text-align: center;
}

.source-all-card.is-active {
  border-color: transparent;
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.status-dot {
  background: #198754;
  border-radius: 50%;
  box-shadow: 0 0 0 8px var(--accent-soft);
  height: 12px;
  width: 12px;
}

.panel-label,
.metric-label,
.meta-label {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 4px;
  text-transform: uppercase;
}

.panel-value {
  font-weight: 700;
  margin-bottom: 0;
}

.metrics {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-bottom: 64px;
}

.metrics > div {
  border-right: 1px solid var(--line);
  padding: 24px;
}

.metrics > div:last-child {
  border-right: 0;
}

.metric-value {
  background: var(--action-gradient);
  background-clip: text;
  color: transparent;
  display: block;
  font-size: 28px;
  font-weight: 800;
  -webkit-background-clip: text;
}

.metric-note {
  color: var(--muted);
  display: block;
  font-size: 13px;
  margin-top: 8px;
}

.section-header {
  align-items: end;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  margin-bottom: 22px;
}

.source-link {
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 14px;
  min-height: 40px;
  padding: 0 16px;
}

.source-link[hidden] {
  display: none;
}

.toolbar {
  gap: 12px;
  margin-bottom: 20px;
}

.global-search-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) 190px;
  margin-bottom: 16px;
  padding: 14px;
}

.search-summary {
  align-items: center;
  color: var(--muted);
  display: flex;
  font-size: 14px;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 22px;
}

.search-label {
  height: 1px;
  overflow: hidden;
  position: absolute;
  width: 1px;
}

input,
select {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font: inherit;
  min-height: 46px;
  padding: 0 14px;
}

input {
  flex: 1;
  min-width: 0;
}

.competition-grid {
  display: grid;
  gap: 14px;
}

.competition-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  gap: 20px;
  justify-content: space-between;
  padding: 14px;
}

.competition-thumb {
  align-self: stretch;
  background: var(--soft);
  border-radius: 6px;
  color: var(--muted);
  display: grid;
  flex: 0 0 188px;
  font-size: 13px;
  min-height: 126px;
  overflow: hidden;
  place-items: center;
  text-decoration: none;
}

.competition-thumb img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.competition-main {
  flex: 1;
  min-width: 0;
}

.competition-title {
  font-size: 18px;
  font-weight: 750;
  line-height: 1.35;
  margin: 0 0 12px;
}

.competition-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.pill {
  background: var(--soft);
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
  padding: 7px 10px;
}

.pill.warning {
  background: #fbecd9;
  color: var(--warn);
}

.sold-progress {
  display: grid;
  gap: 8px;
  max-width: 520px;
}

.sold-progress-track {
  background: var(--soft);
  border-radius: 999px;
  height: 10px;
  overflow: hidden;
}

.sold-progress-track span {
  background: linear-gradient(90deg, var(--accent), #2f7d65);
  border-radius: inherit;
  display: block;
  height: 100%;
  min-width: 3px;
}

.sold-progress strong {
  color: var(--muted);
  font-size: 13px;
}

.competition-side {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(104px, 1fr));
  min-width: 280px;
}

.meta-value {
  display: block;
  font-weight: 800;
}

.discover {
  background: var(--action-gradient);
  border-radius: 8px;
  color: #173c34;
  display: inline-flex;
  font-size: 14px;
  font-weight: 800;
  justify-content: center;
  min-height: 42px;
  padding: 11px 14px;
  text-decoration: none;
  white-space: nowrap;
  grid-column: 1 / -1;
}

.loading,
.empty {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  padding: 24px;
}

.monitoring {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 24px;
  grid-template-columns: 0.8fr 1.2fr;
  margin-top: 64px;
  padding-top: 48px;
}

.simple-page {
  max-width: 820px;
  padding: 72px 0 96px;
}

.simple-page h1 {
  font-size: clamp(42px, 6vw, 72px);
  max-width: 760px;
}

.simple-copy {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.75;
  max-width: 720px;
}

.simple-copy p {
  margin-bottom: 18px;
}

.simple-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.simple-actions .discover {
  min-width: 140px;
}

.not-found {
  text-align: left;
}

.footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
  padding: 24px 40px;
}

.footer p {
  margin-bottom: 0;
}

@media (max-width: 820px) {
  .site-header {
    padding: 0 20px;
  }

  .nav {
    gap: 14px;
  }

  main {
    padding: 32px 18px;
  }

  .hero,
  .monitoring {
    grid-template-columns: 1fr;
  }

  .metrics {
    grid-template-columns: repeat(2, 1fr);
  }

  .metrics > div {
    border-bottom: 1px solid var(--line);
  }

  .metrics > div:nth-child(2n) {
    border-right: 0;
  }

  .competition-card,
  .global-search-panel,
  .section-header,
  .toolbar {
    align-items: stretch;
    display: flex;
    flex-direction: column;
  }

  .source-logo-card {
    height: 112px;
    width: 112px;
  }

  .source-logo-card img {
    max-height: 66px;
    max-width: 74px;
  }

  .competition-thumb {
    aspect-ratio: 16 / 10;
    flex-basis: auto;
    min-height: 0;
    width: 100%;
  }

  .competition-side {
    grid-template-columns: repeat(2, 1fr);
    min-width: 0;
    width: 100%;
  }
}
