@import url("./lib/trend-chart.css");

#main-view:has(.featured-directory), #main-view:has(.report-page) {
  background: #f4f4f4;
  padding: 3.5rem 2rem 8rem;
}
#main-view:has(.report-page) { padding-top: 1rem; }
#route-root:has(.featured-directory) { max-width: 110rem; }
#route-root:has(.report-page) { max-width: 87.5rem; }
.niche-heading > div { display: flex; align-items: flex-start; gap: .5rem; }
.niche-heading h1 { margin: 0; font-size: 5rem; line-height: 1; letter-spacing: -.025em; font-weight: 500; }
.niche-heading span {
  padding: 0 .5rem; border-radius: 999px; background: #ddd; font-size: .75rem;
  font-weight: 500; line-height: 1rem; text-transform: uppercase;
}
.niche-heading p { margin: .5rem 0 0; font-size: 1rem; line-height: 1.5; }
.niche-chart-mode {
  display: inline-flex; flex-wrap: wrap; align-items: center; align-self: start; width: fit-content;
  max-width: 100%; gap: .2rem; padding: .2rem; border: 1px solid #e0e1df; border-radius: 1.5rem; background: #e9eae8;
}
.featured-directory > .niche-chart-mode { margin-top: 1.25rem; }
.niche-chart-note { margin: .55rem 0 0; font-size: .8125rem; color: #535952; }
.niche-chart-note a { color: inherit; text-decoration: underline; }
.niche-chart-mode button {
  min-height: 2rem; padding: .3rem .85rem; border: 0; border-radius: 1.2rem; background: transparent;
  color: #4d514b; cursor: pointer; line-height: 1.3; font-size: .8125rem; font-weight: 550;
}
.niche-chart-mode button[aria-pressed="true"] { color: #171b16; background: #fff; box-shadow: 0 1px 4px #0002; }
.niche-chart-mode button:focus-visible { outline: 2px solid #3a7344; outline-offset: 1px; }
.trend-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-top: 2.5rem; }
.trend-tile {
  display: flex; flex-direction: column; min-width: 0; overflow: hidden; border-radius: 1.5rem;
  background: white; color: var(--ss-ink); box-shadow: 0 8px 24px -10px #0006;
  transition: transform .16s ease, box-shadow .16s ease;
}
.trend-tile h2 {
  margin: 0; padding: 1rem 1.25rem; font-size: 1.25rem; line-height: 1.1;
  letter-spacing: -.025em; font-weight: 700; overflow-wrap: anywhere;
}
.trend-media {
  --curve-height: 4.125rem;
  position: relative; width: 100%; aspect-ratio: 2 / 3; margin-top: auto; background: #161714;
}
.trend-cover { width: 100%; height: 100%; object-fit: cover; }
.trend-media::after {
  content: ""; position: absolute; inset: 50% 0 0; pointer-events: none;
  background: linear-gradient(to top, rgb(0 0 0 / 85%), rgb(0 0 0 / 55%) 50%, transparent);
}
.trend-metrics {
  position: absolute; z-index: 1; right: 1rem; bottom: calc(var(--curve-height) + .5rem); display: grid;
  justify-items: end; gap: 2px; line-height: 1; text-transform: uppercase; letter-spacing: .08rem;
  font-variant-numeric: tabular-nums; text-shadow: 0 1px 3px rgb(0 0 0 / 65%);
}
.trend-metrics strong { font-size: .875rem; font-weight: 650; color: var(--ss-lime); }
.trend-metrics span { font-size: .625rem; font-weight: 650; color: #eee; }
.trend-curve { --tc-color:#56d86b; position: absolute; z-index: 1; inset: auto 0 0; width: 100%; height: var(--curve-height); pointer-events: none; }
.trend-curve.tc-single-spark { padding: 0 1rem 1rem; color: #d5d9d6; display: flex; align-items: end; justify-content: end; }
.directory-foot {
  margin-top: 2rem; display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap;
  gap: .75rem 1.5rem; font-size: .8125rem; line-height: 1.5; color: var(--ss-muted);
}
.directory-foot a { text-decoration: underline; text-underline-offset: .18em; }
@media (hover: hover) {
  .trend-tile:hover { transform: translateY(-2px); box-shadow: 0 14px 32px -10px rgb(0 0 0 / 45%); }
}
@media (prefers-reduced-motion: reduce) { .trend-tile:hover { transform: none; } }
@media (min-width: 96rem) {
  #main-view:has(.featured-directory), #main-view:has(.report-page) { padding-inline: 5rem; }
}
@media (max-width: 63.999rem) {
  #main-view:has(.featured-directory), #main-view:has(.report-page) { padding: 3rem 1.25rem 5rem; }
  .niche-heading h1 { font-size: 3rem; }
  .trend-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 39.999rem) {
  #main-view:has(.featured-directory), #main-view:has(.report-page) { padding-block: 2rem 4rem; }
  .trend-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.trend-page a:focus-visible { outline: 2px solid var(--blue, #206eea); outline-offset: .2rem; }
.trend-source { margin: 1.5rem 0 0; font-size: .8rem; color: #626262; }
.trend-source a { color: inherit; text-decoration: underline; }
