/* =========================================================
   MSAC CAPITAL — BROWSE FEED
   Search-first market discovery.
   Warm-neutral, restrained and minimal.
   ========================================================= */

.browse-page {
  --browse-ink: #202124;
  --browse-muted: #70757a;
  --browse-line: #e4e7eb;
  --browse-soft: #f8f9fa;
  --browse-accent: #41464d;

  min-height: 100vh;
  margin: 0;
  background: #fff;
  color: var(--browse-ink);
  font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;

  /* Hide scrollbar without disabling scrolling. */
  scrollbar-width: none;
  -ms-overflow-style: none;
}

html {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar,
.browse-page::-webkit-scrollbar,
.browse-page *::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.browse-page *,
.browse-page *::before,
.browse-page *::after {
  box-sizing: border-box;
}

.browse-page [hidden] {
  display: none !important;
}

/* Hide scrollbars on nested scrollable areas while preserving scrolling. */
.browse-page *,
.browse-page *:hover {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

/* =========================================================
   HEADER
   ========================================================= */

.browse-header {
  position: sticky;
  top: 0;
  z-index: 20;

  min-height: 72px;
  padding: 12px max(4%, calc((100vw - 1240px) / 2));

  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;

  border-bottom: 1px solid rgba(20, 20, 20, .08);
  background: rgba(255, 255, 255, .94);

  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
}

.browse-brand {
  flex: 0 0 auto;
  color: #171717;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: 1.7px;
  line-height: 1.05;
  text-decoration: none;
  transform-origin: left center;
  transition: transform .4s cubic-bezier(.22, .75, .25, 1);
}

.browse-brand span {
  display: block;
  margin-top: 4px;
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 3.2px;
}

.browse-page.browse-search-compact .browse-brand {
  transform: scale(.97);
}

.browse-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 4px;
}

.browse-nav a,
.browse-nav button {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-height: 36px;
  padding: 8px 12px;

  border: 1px solid transparent;
  border-radius: 6px;

  background: transparent;
  color: #555;

  font: inherit;
  font-size: 12px;
  font-weight: 500;

  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;

  transition:
    color .18s ease,
    background .18s ease,
    border-color .18s ease;
}

.browse-nav a:hover,
.browse-nav button:hover {
  background: #f5f5f3;
  color: #111;
}

.browse-nav a[aria-current="page"] {
  background: #f3f3f1;
  border-color: #e8e8e5;
  color: #171717;
  font-weight: 650;
}

.browse-nav button {
  border-color: #deded9;
}

.browse-brand:focus-visible,
.browse-nav a:focus-visible,
.browse-nav button:focus-visible {
  outline: 2px solid var(--browse-accent);
  outline-offset: 3px;
}

.browse-nav button:disabled {
  cursor: wait;
  opacity: .6;
}

/* =========================================================
   MAIN WRAPPER
   ========================================================= */

.browse-wrap {
  width: min(1220px, 92%);
  margin: 0 auto;
  padding: 24px 0 76px;
}

/* =========================================================
   SEARCH HERO
   ========================================================= */

.browse-search-hero {
  display: flex;
  min-height: 405px;
  padding: 58px 18px 45px;

  flex-direction: column;
  align-items: center;
  justify-content: center;

  text-align: center;

  transition:
    min-height .78s cubic-bezier(.22, 1, .36, 1),
    padding .78s cubic-bezier(.22, 1, .36, 1);
}

.browse-search-kicker {
  margin: 0 0 8px;
  color: #777d84;
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 3px;

  transition:
    margin .4s ease,
    opacity .3s ease;
}

.browse-search-wordmark {
  margin: 0;

  color: #30343a;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(58px, 8vw, 82px);
  font-weight: 500;
  letter-spacing: -5px;
  line-height: 1;

  transform-origin: center center;
  transform: scale(var(--browse-wordmark-scale, 1));
  will-change: transform;

  transition: transform .18s linear;
}

.browse-search-wordmark span {
  color: #9299a1;
}

.browse-search-subtitle {
  margin: 17px 0 28px;
  color: #666d75;
  font-size: 15px;
  letter-spacing: .05px;

  transition:
    margin .45s ease,
    opacity .3s ease;
}

/* =========================================================
   SEARCH BAR
   ========================================================= */

.browse-search-box {
  position: relative;
  display: flex;
  align-items: center;

  width: min(720px, 100%);
  min-height: 58px;
  padding: 6px 8px 6px 21px;

  border: 1px solid #dfe3e7;
  border-radius: 999px;

  background: #fff;
  box-shadow: 0 2px 7px rgba(32, 33, 36, .08);

  /* No size or position animation on hover. */
  transition:
    box-shadow .2s ease,
    border-color .2s ease;
}

.browse-search-box:hover,
.browse-search-box:focus-within {
  border-color: transparent;
  box-shadow: 0 2px 9px rgba(32, 33, 36, .17);
}


/* Database-backed location autocomplete on the homepage. */
.browse-location-suggestions {
  position: absolute;
  z-index: 1000;
  top: calc(100% + 9px);
  left: 0;
  right: 0;
  max-height: min(360px, 55vh);
  overflow-y: auto;
  padding: 6px;
  border: 1px solid #e2e5e9;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(25, 31, 38, .16);
  text-align: left;
}

.browse-location-suggestions[hidden] {
  display: none;
}

.browse-location-suggestion {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  min-height: 46px;
  padding: 10px 13px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #202124;
  text-align: left;
  cursor: pointer;
}

.browse-location-suggestion:hover,
.browse-location-suggestion:focus-visible {
  outline: none;
  background: #f3f5f7;
}

.browse-location-suggestion-name {
  min-width: 0;
  overflow: hidden;
  font-size: 14px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.browse-location-suggestion-type {
  flex: 0 0 auto;
  color: #777e86;
  font-size: 11px;
  text-transform: capitalize;
}

.browse-location-suggestions-empty {
  padding: 12px 13px;
  color: #777e86;
  font-size: 13px;
}

.browse-search-icon {
  position: relative;
  flex: 0 0 17px;

  width: 17px;
  height: 17px;
  margin-right: 14px;

  border: 1.8px solid #858b92;
  border-radius: 50%;
}

.browse-search-icon::after {
  position: absolute;
  right: -5px;
  bottom: -3px;

  width: 7px;
  height: 1.8px;

  border-radius: 2px;
  background: #858b92;

  content: "";
  transform: rotate(48deg);
}

.browse-search-box input {
  flex: 1 1 auto;

  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 8px 4px;

  border: 0;
  outline: 0;

  background: transparent;
  box-shadow: none;
  color: #202124;

  font: inherit;
  font-size: 14px;
}

.browse-search-box input:focus {
  border: 0;
  outline: 0;
  box-shadow: none;
}

.browse-search-box input::placeholder {
  color: #8b9096;
}

.browse-search-clear {
  flex: 0 0 30px;

  width: 30px;
  height: 30px;

  border: 0;
  border-radius: 50%;

  background: transparent;
  color: #777d84;

  font-size: 23px;
  line-height: 1;

  cursor: pointer;
}

.browse-search-clear:hover {
  background: #f1f3f4;
}

.browse-search-submit {
  flex: 0 0 auto;

  min-height: 40px;
  padding: 0 19px;

  border: 0;
  border-radius: 999px;

  background: #f1f3f4;
  color: #3c4043;

  font: inherit;
  font-size: 12px;
  font-weight: 600;

  cursor: pointer;

  transition: background .18s ease;
}

.browse-search-submit:hover {
  background: #e8eaed;
}

/* =========================================================
   QUICK CATEGORY SEARCH
   ========================================================= */

.browse-category-shortcuts {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;

  gap: 8px;
  margin-top: 19px;
}

.browse-category-chip {
  min-height: 34px;
  padding: 7px 15px;

  border: 1px solid #e5e8eb;
  border-radius: 999px;

  background: #fff;
  color: #626970;

  font: inherit;
  font-size: 11px;

  cursor: pointer;

  transition:
    background .18s ease,
    border-color .18s ease,
    color .18s ease,
    transform .18s ease;
}

.browse-category-chip:hover {
  background: #f7f8f9;
  border-color: #cfd4d9;
  color: #202124;
}

.browse-category-chip:active {
  transform: scale(.97);
}

.browse-category-chip.is-current {
  border-color: #cbd0d5;
  background: #f1f3f4;
  color: #30363b;
  font-weight: 650;
}

.browse-category-chip:focus-visible {
  outline: 2px solid #8a929a;
  outline-offset: 3px;
}

.browse-search-caption {
  margin: 18px 0 0;
  color: #9aa0a6;
  font-size: 10px;
  letter-spacing: .2px;

  transition:
    margin .4s ease,
    opacity .3s ease;
}

/* =========================================================
   COMPACT SEARCH HERO STATE
   Triggered only by scrolling or search input focus.
   ========================================================= */

.browse-page.browse-search-compact .browse-search-hero {
  min-height: 300px;
  padding-top: 30px;
  padding-bottom: 25px;
}

.browse-page.browse-search-compact .browse-search-kicker {
  margin-bottom: 5px;
}

.browse-page.browse-search-compact .browse-search-subtitle {
  margin-top: 9px;
  margin-bottom: 17px;
}

.browse-page.browse-search-compact .browse-search-caption {
  margin-top: 11px;
}

/* =========================================================
   RESULTS / MASTER DETAIL
   ========================================================= */

.browse-master-detail {
  display: grid;

  grid-template-columns:
    minmax(0, 1fr)
    minmax(0, 0fr);

  align-items: start;
  gap: 0;

  margin-top: 5px;

  transition:
    grid-template-columns .58s cubic-bezier(.22, .75, .25, 1),
    gap .45s ease;
}

.browse-feed-column {
  min-width: 0;
}

.browse-results-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;

  gap: 16px;
  margin: 0 0 15px;
  padding-bottom: 12px;

  border-bottom: 1px solid #eceff1;
}

.browse-results-heading h2 {
  margin: 0;
  color: #30343a;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -.25px;
}

.browse-results-kicker {
  margin: 0 0 5px;
  color: #9299a1;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.6px;
}

.browse-status {
  margin: 0;
  color: #858b92;
  font-size: 11px;
  line-height: 1.6;
}

.requirement-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: 11px;

  transition: gap .4s ease;
}

/* =========================================================
   REQUIREMENT CARDS
   ========================================================= */

.requirement-card {
  min-width: 0;
  padding: 0;

  overflow: hidden;

  border: 1px solid #e7eaed;
  border-radius: 9px;

  background: #fff;
  color: #222;

  box-shadow: none;

  transition:
    transform 680ms cubic-bezier(.2, .78, .2, 1),
    border-color .22s ease,
    background .22s ease,
    box-shadow .22s ease;

  will-change: transform;
  scroll-margin-top: 104px;
}

.requirement-card:hover {
  border-color: #cfd4d9;
  background: #fff;
  box-shadow: 0 3px 12px rgba(32, 33, 36, .055);
}

.requirement-card.is-active {
  border-color: #aab2ba;
  background: #fafbfc;
  box-shadow: inset 3px 0 0 #68727c;
}

.requirement-card-summary {
  display: block;

  width: 100%;
  padding: 15px 15px 13px;

  border: 0;
  background: transparent;
  color: inherit;

  text-align: left;
  cursor: pointer;
  font: inherit;
}

.requirement-card-summary:focus-visible {
  outline: 2px solid #77705c;
  outline-offset: -3px;
  border-radius: 4px;
}

.requirement-card-summary-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.requirement-card-heading-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 6px;
}

.requirement-card-owner-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 7px;
  border: 1px solid #e8dcc2;
  border-radius: 999px;
  background: #fbf7ee;
  color: #79643f;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .2px;
  line-height: 1.2;
  white-space: nowrap;
}

.browse-own-requirement-note {
  padding: 11px 12px;
  border: 1px solid #e8dcc2;
  border-radius: 7px;
  background: #fbf7ee;
  color: #665638;
}

.requirement-card-type {
  margin: 0 !important;
  color: #858d96 !important;
  font-size: 9px !important;
  font-weight: 700 !important;
  letter-spacing: 1.1px;
  text-transform: uppercase;
}

.requirement-card-summary h2 {
  margin: 0 0 7px;
  color: #30363b;
  font-size: 15px;
  font-weight: 620;
  letter-spacing: -.15px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.requirement-card-summary p {
  margin: 7px 0;
  color: #666;
  font-size: 13px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.requirement-card-summary .requirement-card-budget {
  margin: 0;
  color: #4c535a;
  font-size: 12px;
  font-weight: 650;
}

.requirement-card-chevron {
  flex: 0 0 auto;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 25px;
  height: 25px;

  border: 1px solid #e6e9ec;
  border-radius: 50%;

  color: #7a838c;
  font-size: 14px;
  line-height: 1;

  transition:
    transform .18s ease,
    background .18s ease,
    border-color .18s ease;
}

.requirement-card.is-active .requirement-card-chevron {
  border-color: #5d6670;
  background: #5d6670;
  color: #fff;
}

.requirement-card-meta-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;

  margin-top: 11px;
  padding-top: 9px;

  border-top: 1px solid #edf0f2;

  color: #9299a1;
  font-size: 10px;
}

.requirement-card-meta-row span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.requirement-card-details {
  display: none !important;
}

/* =========================================================
   SELECTED REQUIREMENT LAYOUT
   ========================================================= */

.browse-master-detail.has-selection {
  grid-template-columns:
    minmax(0, 2fr)
    minmax(0, 3fr);

  gap: 22px;
}

.browse-master-detail.has-selection .requirement-grid {
  grid-template-columns: minmax(0, 1fr);
  gap: 9px;
}

/* =========================================================
   DETAIL PANEL
   ========================================================= */

.requirement-detail-panel {
  position: sticky;
  top: 94px;

  min-width: 0;
  min-height: 0;
  max-height: 0;

  overflow: hidden;
  visibility: hidden;
  opacity: 0;

  transform: translateY(8px);

  border: 0 solid #e5e8eb;
  border-radius: 10px;

  background: #fff;
  box-shadow: 0 5px 24px rgba(32, 33, 36, 0);

  scrollbar-width: none;
  -ms-overflow-style: none;

  transition:
    opacity .34s ease,
    transform .46s cubic-bezier(.22, .75, .25, 1),
    max-height .58s cubic-bezier(.22, .75, .25, 1),
    min-height .58s ease,
    box-shadow .4s ease,
    border-width .3s ease;
}

.requirement-detail-panel::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.browse-master-detail.has-selection .requirement-detail-panel {
  min-height: 390px;
  max-height: calc(100vh - 116px);

  overflow: auto;
  visibility: visible;
  opacity: 1;

  transform: translateY(0);

  border-width: 1px;

  box-shadow: 0 4px 20px rgba(32, 33, 36, .035);
}

/* =========================================================
   EMPTY DETAIL STATE
   ========================================================= */

.detail-empty-state {
  display: flex;

  min-height: 388px;
  padding: 32px;

  flex-direction: column;
  align-items: center;
  justify-content: center;

  text-align: center;
}

.detail-empty-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 42px;
  height: 42px;
  margin-bottom: 17px;

  border: 1px solid #e5e5df;
  border-radius: 50%;

  color: #77705c;
  font-size: 21px;
}

.detail-empty-state h2 {
  margin: 0;
  color: #202020;
  font-size: 18px;
  font-weight: 650;
}

.detail-empty-state p {
  max-width: 300px;
  margin: 10px 0 0;

  color: #777;
  font-size: 13px;
  line-height: 1.7;
}

/* =========================================================
   DETAIL CONTENT
   ========================================================= */

.detail-back-button {
  display: none;
}

.requirement-detail-content {
  padding: 27px 28px 30px;
}

.detail-eyebrow {
  margin: 0 0 12px;
  color: #8a929a;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 1.6px;
}

.detail-title {
  margin: 0;

  color: #191919;
  font-size: clamp(23px, 2.2vw, 31px);
  font-weight: 620;
  letter-spacing: -.9px;
  line-height: 1.2;

  overflow-wrap: anywhere;
}

.detail-location {
  margin: 9px 0 0;
  color: #656565;
  font-size: 14px;
}

.detail-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 23px;
}

.detail-metric {
  min-width: 0;
  padding: 13px 14px;

  border: 1px solid #edf0f2;
  border-radius: 8px;

  background: #f8f9fa;
}

.detail-metric span {
  display: block;
  margin-bottom: 6px;
  color: #777;
  font-size: 11px;
}

.detail-metric strong {
  display: block;
  color: #242424;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.detail-posted {
  margin: 13px 0 0;
  color: #888;
  font-size: 11px;
}

.detail-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;

  margin: 25px 0 0;
  padding-top: 20px;

  border-top: 1px solid #eceff1;
}

.detail-section-heading h3 {
  margin: 0;
  color: #202020;
  font-size: 16px;
  font-weight: 650;
}

/* =========================================================
   RESPONSE FORM
   ========================================================= */

.browse-response-form {
  margin-top: 18px;
  padding-top: 17px;
  border-top: 1px solid #eeeeea;
}

.browse-response-form label {
  display: block;
  margin: 12px 0 7px;
  color: #383838;
  font-size: 12px;
  font-weight: 600;
}

.browse-response-form select,
.browse-response-form textarea {
  display: block;

  width: 100%;
  min-height: 44px;
  padding: 11px 12px;

  border: 1px solid #deded9;
  border-radius: 6px;

  background: #fff;
  color: #222;

  font: inherit;
  font-size: 13px;
}

.browse-response-form textarea {
  min-height: 110px;
  resize: vertical;
}

.browse-response-form select:focus,
.browse-response-form textarea:focus {
  outline: none;
  border-color: #78828c;
  box-shadow: 0 0 0 3px rgba(90, 101, 112, .12);
}

.browse-response-form button {
  width: auto;
  min-height: 42px;
  margin-top: 12px;
  padding: 10px 17px;

  border: 1px solid #343b42;
  border-radius: 6px;

  background: #343b42;
  color: #fff;

  font: inherit;
  font-size: 13px;
  font-weight: 600;

  cursor: pointer;

  transition:
    background .18s ease,
    color .18s ease,
    transform .18s ease;
}

.browse-response-form button:hover {
  background: #252b30;
}

.browse-response-form button:disabled {
  cursor: wait;
  opacity: .6;
}

.browse-response-status {
  margin: 10px 0 0;
  color: #62635e;
  font-size: 12px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.browse-response-status[data-state="error"] {
  color: #9b2c2c;
}

.browse-response-status[data-state="success"] {
  color: #315e3b;
}

.browse-signin-note {
  margin-top: 17px;
  padding: 13px 14px;

  border: 1px solid #ecece7;
  border-radius: 7px;

  background: #fafaf8;
  color: #62635e;

  font-size: 12px;
  line-height: 1.6;
}

.browse-signin-note a {
  color: #343b42;
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* =========================================================
   RESPONSE THREADS AND FOLLOW-UPS
   ========================================================= */

.browse-my-responses {
  margin-top: 20px;
  padding-top: 17px;
  border-top: 1px solid #eeeeea;
}

.browse-my-responses h3 {
  margin: 0 0 12px;
  font-size: 14px;
}

.browse-response-thread {
  margin-top: 12px;
  padding: 14px;

  border: 1px solid #e5e5df;
  border-radius: 7px;

  background: #fcfcfb;
}

.browse-response-thread > p,
.browse-response-message {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.browse-follow-up {
  margin-top: 14px;
  padding: 12px 14px;

  border-left: 2px solid #b49a68;
  border-radius: 0 6px 6px 0;

  background: #f7f5f0;
}

.browse-follow-up p {
  margin-bottom: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.requirement-detail-content .browse-response-form {
  margin-top: 17px;
  padding-top: 0;
  border-top: 0;
}

.requirement-detail-content .browse-my-responses {
  margin-top: 22px;
}

.requirement-detail-content .browse-response-thread {
  background: #fcfcfb;
}

/* =========================================================
   PUBLIC NOTE
   ========================================================= */

.browse-note {
  display: flex;
  align-items: flex-start;
  gap: 12px;

  margin-top: 25px;
  padding: 18px 0 0;

  border-top: 1px solid #edf0f2;
  color: #777;
}

.browse-note p {
  margin: 0;
  font-size: 12px;
  line-height: 1.75;
}

.browse-note-mark {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;

  width: 19px;
  height: 19px;

  border: 1px solid #dfe3e7;
  border-radius: 50%;

  color: #7e8790;
  font-size: 11px;
  font-weight: 650;
}

/* =========================================================
   ACCESSIBILITY
   ========================================================= */

.visually-hidden {
  position: absolute !important;

  width: 1px !important;
  height: 1px !important;

  padding: 0 !important;
  margin: -1px !important;

  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;

  white-space: nowrap !important;
  border: 0 !important;
}

/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 1100px) and (min-width: 761px) {
  .requirement-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .browse-master-detail.has-selection {
    gap: 14px;
  }

  .browse-master-detail.has-selection .requirement-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .requirement-card-summary {
    padding: 14px;
  }

  .requirement-detail-content {
    padding: 22px 20px;
  }

  .detail-metrics {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 760px) {
  .browse-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    padding: 15px 5%;
  }

  .browse-nav {
    width: 100%;
    justify-content: flex-start;
    gap: 3px;
  }

  .browse-nav a,
  .browse-nav button {
    min-height: 34px;
    padding: 7px 9px;
    font-size: 11px;
  }

  .browse-wrap {
    width: 92%;
    padding-top: 12px;
  }

  .browse-search-hero {
    min-height: 350px;
    padding: 45px 0 38px;
  }

  .browse-search-wordmark {
    font-size: 66px;
  }

  .browse-search-subtitle {
    margin: 13px 0 23px;
    font-size: 13px;
  }

  .browse-search-box {
    min-height: 54px;
    padding-left: 16px;
  }

  .browse-search-box input {
    font-size: 13px;
  }

  .browse-search-submit {
    min-height: 36px;
    padding: 0 13px;
    font-size: 11px;
  }

  .browse-category-shortcuts {
    gap: 7px;
  }

  .browse-category-chip {
    padding: 7px 12px;
    font-size: 10px;
  }

  .browse-master-detail,
  .browse-master-detail.has-selection {
    display: block;
  }

  .requirement-grid,
  .browse-master-detail.has-selection .requirement-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .requirement-detail-panel,
  .browse-master-detail.has-selection .requirement-detail-panel {
    display: none;
    position: static;

    max-height: none;
    min-height: 0;

    overflow: visible;
    margin-top: 0;

    border-radius: 10px;
    box-shadow: none;
  }

  .browse-master-detail.mobile-detail-open .browse-feed-column {
    display: none;
  }

  .browse-master-detail.mobile-detail-open .requirement-detail-panel {
    display: block;
  }

  .detail-back-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    margin: 0 0 20px;
    padding: 9px 0;

    border: 0;
    background: transparent;
    color: #656d75;

    font: inherit;
    font-size: 12px;
    font-weight: 600;

    cursor: pointer;
  }

  .detail-back-button span {
    font-size: 17px;
  }

  .requirement-detail-content {
    padding: 0 20px 23px;
  }

  .requirement-detail-panel.has-selection {
    padding: 17px 0 0;
  }

  .detail-title {
    font-size: 27px;
  }

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

  .browse-note {
    margin-top: 24px;
  }

  /* Compact search state on mobile. */

  .browse-page.browse-search-compact .browse-search-hero {
    min-height: 270px;
    padding-top: 25px;
    padding-bottom: 20px;
  }

  .browse-page.browse-search-compact .browse-search-subtitle {
    margin-top: 8px;
    margin-bottom: 15px;
  }
}

/* =========================================================
   SMALL MOBILE
   ========================================================= */

@media (max-width: 520px) {
  .browse-wrap {
    width: 90%;
    padding-bottom: 48px;
  }

  .browse-search-hero {
    min-height: 330px;
    padding: 39px 0 32px;
  }

  .browse-search-wordmark {
    font-size: 59px;
  }

  .browse-search-kicker {
    font-size: 9px;
  }

  .browse-search-subtitle {
    font-size: 13px;
  }

  .browse-search-caption {
    max-width: 270px;
    line-height: 1.6;
  }

  .browse-results-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .requirement-card-summary {
    padding: 15px;
  }

  .detail-metrics {
    grid-template-columns: minmax(0, 1fr);
  }

  .detail-title {
    font-size: 25px;
  }

  .browse-page.browse-search-compact .browse-search-hero {
    min-height: 255px;
    padding-top: 21px;
    padding-bottom: 17px;
  }

}

/* =========================================================
   HIDDEN SCROLLBARS — FINAL OVERRIDE
   Scrolling remains enabled on the page and detail panel.
   ========================================================= */

html,
body,
.browse-page,
.browse-page * {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar,
.browse-page::-webkit-scrollbar,
.browse-page *::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  background: transparent !important;
}

/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
  .browse-page *,
  .browse-page *::before,
  .browse-page *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
}

/* Multiple-location search chips */
.browse-selected-locations {
  display: flex; flex-wrap: wrap; gap: 7px;
  width: min(720px, 100%); margin: 10px auto 0;
}
.browse-selected-locations[hidden] { display: none; }
.browse-selected-location-chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 9px 6px 12px; border: 1px solid #e2e5e9;
  border-radius: 999px; background: #f7f8f9; color: #30343a;
  font-size: 12px; line-height: 1.3;
}
.browse-selected-location-remove {
  width: 18px; height: 18px; padding: 0; border: 0; border-radius: 50%;
  background: #e8eaed; color: #555; font-size: 15px; line-height: 18px; cursor: pointer;
}
