#root .gr-demand-reference-list {
  --member-accent: #d6000f;
  --member-banner: #bc1a14;
  --member-ink: #222;
  --member-muted: #676260;
  --member-gutter: var(--gr-page-gutter);
  --demand-gutter: var(--gr-page-gutter);
  --demand-section-inset: var(--gr-section-inset);
  min-width: 0;
  container-type: inline-size;
  min-height: calc(100dvh - var(--gr-bottom-navigation-space));
  flex: 1;
  padding-bottom: 92px;
  background: #f6f6f6;
  color: #222;
}

#root .gr-demand-reference-list :is(button, select, a, input):focus-visible {
  outline-color: #d6000f;
}

.gr-demand-ref-header .gr-member-title-row h1 {
  text-align: center;
}

.gr-member-search .gr-demand-ref-search {
  background: url("./assets/demand-reference-search.png") center / contain no-repeat;
}

#root .gr-demand-reference-list .gr-member-search :is(button, input):focus-visible {
  outline-offset: -3px;
}

.gr-demand-ref-views {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 5px var(--demand-gutter);
  border-bottom: 1px solid #eee5e2;
  background: #fffaf9;
}

.gr-demand-ref-views > button {
  min-height: 44px;
  padding: 4px 8px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--member-muted);
  font-size: 0.875rem;
}

.gr-demand-ref-views > button[aria-pressed="true"] {
  background: #f7e9e7;
  color: #9a252d;
  font-weight: 650;
}

.gr-demand-ref-sources {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 var(--demand-gutter);
  border-bottom: 1px solid #f0ebe9;
  background: #fff;
}

.gr-demand-ref-sources > button {
  min-width: 44px;
  min-height: 44px;
  padding: 5px 10px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: #585553;
  font-size: 0.875rem;
  line-height: 1.35;
  white-space: normal;
  overflow-wrap: anywhere;
}

.gr-demand-ref-sources > button[aria-pressed="true"] {
  border-bottom-color: var(--member-accent);
  color: var(--member-accent);
  font-weight: 650;
}

.gr-demand-ref-filters {
  display: flex;
  min-height: 54px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  padding: 4px var(--demand-gutter);
  background: #fff;
}

.gr-demand-ref-types,
.gr-demand-ref-refinements {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

.gr-demand-ref-types { gap: clamp(6px, 2.65vw, 11px); }
.gr-demand-ref-refinements { gap: clamp(4px, 2vw, 9px); }

.gr-demand-ref-types > button {
  min-width: max(44px, 3.125em);
  min-height: 44px;
  padding: 4px 9px;
  border: 0;
  border-radius: 999px;
  background: #f6f6f6;
  color: #222;
  font-size: 0.875rem;
  white-space: nowrap;
}

.gr-demand-ref-types > button[aria-pressed="true"] {
  background: #d6000f;
  color: #fff;
}

.gr-demand-ref-select {
  position: relative;
  display: grid;
  min-width: 44px;
  min-height: 44px;
  place-items: center;
  color: #222;
  font-size: 0.9375rem;
  white-space: nowrap;
}

.gr-demand-ref-select[data-active="true"] { color: #d6000f; }

.gr-demand-ref-select > span {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  pointer-events: none;
}

.gr-demand-ref-select > span svg { color: #777; }
.gr-demand-ref-select[data-active="true"] > span svg { color: currentColor; }

.gr-demand-ref-select > select {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  font: inherit;
  opacity: 0;
  cursor: pointer;
}

.gr-demand-ref-select:focus-within {
  border-radius: 4px;
  outline: 2px solid #d6000f;
  outline-offset: -2px;
}

.gr-demand-ref-sections {
  display: grid;
  gap: 16px;
  padding: 16px var(--demand-section-inset) 0;
  background: #f6f6f6;
}

.gr-demand-matches {
  padding: 16px var(--demand-section-inset) 0;
}

.gr-demand-matches-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  padding: 0 4px;
}

.gr-demand-matches-head h2 {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 650;
  line-height: 1.4;
}

.gr-demand-matches-count {
  margin: 3px 0 0;
  color: var(--member-muted);
  font-size: 0.8125rem;
}

.gr-demand-matches-reset {
  min-height: 44px;
  flex: none;
  padding: 5px 6px;
  border: 0;
  background: none;
  color: #9a252d;
  font-size: 0.8125rem;
  font-weight: 550;
}

.gr-demand-matches-empty {
  margin: 0;
  padding: 18px 14px;
  border: 1px solid #eee5e2;
  border-radius: 9px;
  background: #fffdfc;
  color: var(--member-muted);
  font-size: 0.875rem;
  line-height: 1.55;
}

.gr-demand-ref-section {
  min-width: 0;
  padding-bottom: 13px;
  border-radius: 8px;
  background: #fff center top / 100% auto no-repeat;
}

.gr-demand-ref-section[data-source="recommended"] {
  background-image: url("../local-home/home-reference-activity-bg.png");
}

.gr-demand-ref-section[data-source="member"] {
  background-image: url("../local-home/home-reference-articles-bg.png");
}

.gr-demand-ref-section-head {
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 4px var(--demand-section-inset);
}

.gr-demand-ref-section-head h2 {
  min-width: 0;
  margin: 0;
  color: var(--member-ink);
  font-size: var(--gr-section-heading-size);
  font-weight: var(--gr-section-heading-weight);
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.gr-demand-ref-more {
  display: inline-flex;
  min-height: 44px;
  flex: none;
  align-items: center;
  gap: 5px;
  padding: 0 3px 0 10px;
  border: 0;
  background: transparent;
  color: var(--member-muted);
  font: inherit;
  font-size: 0.8125rem;
  cursor: pointer;
}

.gr-demand-ref-more::after {
  width: 6px;
  height: 6px;
  border-block-start: 1px solid currentColor;
  border-inline-end: 1px solid currentColor;
  content: "";
  transform: rotate(45deg);
}

.gr-demand-ref-feed {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0 var(--demand-section-inset);
  list-style: none;
}

.gr-demand-ref-feed > li { min-width: 0; }

.gr-demand-ref-feed.gr-demand-matches-feed { padding: 0; }

.gr-demand-match-card {
  padding: 13px 13px 9px;
  border: 1px solid #eee5e2;
  border-radius: 9px;
  background: #fffdfc;
}

.gr-demand-match-card-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  margin-top: 10px;
  padding-top: 6px;
  border-top: 1px solid #f0e8e5;
}

.gr-demand-match-reasons {
  flex: 1 1 145px;
  min-width: 0;
  margin: 0;
  color: #6a5553;
  font-size: 0.75rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.gr-demand-match-reasons > strong { font-weight: 650; }

.gr-demand-match-action {
  display: inline-flex;
  min-height: 44px;
  max-width: 100%;
  align-items: center;
  justify-content: center;
  margin-inline-start: auto;
  padding: 4px 12px;
  border: 1px solid #efdbd9;
  border-radius: 7px;
  background: #fff7f6;
  color: #962530;
  font-size: 0.8125rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
}

button.gr-demand-match-action { background: #f7e9e7; }

.gr-demand-match-action:hover { background: #fae2e0; }

.gr-demand-ref-card {
  display: flex;
  min-width: 0;
  min-height: 44px;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 10px;
  color: var(--member-ink);
  text-decoration: none;
}

.gr-demand-ref-cover {
  display: block;
  width: clamp(62px, 21.33vw, 92px);
  aspect-ratio: 1;
  flex: none;
  overflow: hidden;
  border-radius: 4px;
  object-fit: cover;
}

.gr-demand-ref-section[data-source="recommended"] .gr-demand-ref-cover {
  width: clamp(94px, 31vw, 134px);
  aspect-ratio: 1.75;
}

.gr-demand-ref-row-content {
  display: grid;
  min-width: 0;
  flex: 1 1 min(100%, 8rem);
  align-content: start;
  gap: 4px;
}

.gr-demand-ref-publisher {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  gap: 5px;
}

.gr-demand-ref-avatar {
  display: grid;
  width: 1.6em;
  height: 1.6em;
  flex: none;
  overflow: hidden;
  place-items: center;
  border-radius: 50%;
  background: #e8ddd8;
  color: #744e43;
  font-size: 0.625rem;
  font-weight: 500;
}

.gr-demand-ref-avatar > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gr-demand-ref-publisher-info {
  min-width: 0;
  flex: 1;
}

.gr-demand-ref-publisher-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 6px;
}

.gr-demand-ref-publisher-line > strong {
  min-width: 0;
  color: var(--member-muted);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.gr-demand-ref-publisher-line > time {
  max-width: 100%;
  color: var(--member-muted);
  font-size: 0.6875rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.gr-demand-ref-publisher-info > span {
  display: block;
  color: var(--member-muted);
  font-size: 0.75rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.gr-demand-ref-card-title {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  gap: 5px;
  margin: 0;
  color: var(--member-ink);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.4;
}

.gr-demand-ref-card-title > img {
  display: block;
  width: 21px;
  height: 18px;
  flex: none;
  margin-top: 1px;
  object-fit: contain;
}

.gr-demand-ref-card-title > span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.gr-demand-ref-card:hover .gr-demand-ref-title-text {
  text-decoration: underline;
}

.gr-demand-ref-card-title .gr-demand-ref-recommendation {
  display: inline-block;
  margin-inline-start: 6px;
  padding: 1px 5px;
  border-radius: 3px;
  background: #f7e9e7;
  color: #9a252d;
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 1.35;
  white-space: nowrap;
  vertical-align: middle;
}

.gr-demand-ref-industry {
  margin: 0;
  color: var(--member-muted);
  font-size: 0.75rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.gr-demand-ref-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.gr-demand-ref-tags > span {
  display: inline-flex;
  min-height: 19px;
  max-width: 100%;
  align-items: center;
  gap: 3px;
  padding: 1px 5px;
  border-radius: 3px;
  background: #f3f1ef;
  color: #333;
  font-size: 0.6875rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.gr-demand-ref-card[data-kind="supply"] .gr-demand-ref-tags > span { background: #edf2f8; }
.gr-demand-ref-card[data-kind="demand"] .gr-demand-ref-tags > span { background: #f7f1e9; }

.gr-demand-ref-location {
  width: 12px;
  height: 12px;
  flex: none;
  background: url("./assets/demand-reference-location.png") center / contain no-repeat;
}

.gr-demand-ref-section-empty,
.gr-demand-ref-empty {
  margin: 0;
  padding: 12px var(--demand-section-inset) 9px;
  color: var(--member-muted);
  font-size: 0.8125rem;
  line-height: 1.45;
  text-align: center;
}

.gr-demand-ref-empty { padding-block: 22px; }

.gr-demand-ref-publish {
  position: fixed;
  z-index: 5;
  inset-inline-end: max(var(--member-gutter), calc((100% - var(--gr-pro-shell-width, 430px)) / 2 + var(--member-gutter)));
  inset-block-end: calc(var(--gr-bottom-navigation-space) + 54px);
  display: inline-flex;
  width: clamp(6rem, calc(2rem + 20vw), 8.03125rem);
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  text-decoration: none;
}

.gr-demand-ref-publish img { display: block; width: 100%; height: auto; }
.gr-demand-ref-publish:is(:hover, :active) img { filter: brightness(.96); }

@container (width < 15rem) {
  .gr-demand-ref-publish {
    position: static;
    display: flex;
    max-width: calc(100% - 2 * var(--demand-gutter));
    margin: 16px var(--demand-gutter) 0 auto;
  }
}
