:root {
  --accent: #b00b55;
  --accent-dark: #85043f;
  --ink: #121212;
  --muted: #6a6a6a;
  --soft: #f4f4f4;
  --page: #fafafa;
  --line: #e2e2e2;
  --white: #ffffff;
  --danger: #a11616;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.055);
  --shell: 1510px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--page);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  color: inherit;
  font: inherit;
}

button {
  border: 0;
}

button:not(:disabled) {
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: 0.65;
}

img {
  display: block;
  max-width: 100%;
}

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

.site-shell {
  width: min(calc(100% - 52px), var(--shell));
  margin-inline: auto;
}

.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 8px;
  left: 8px;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--white);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: none;
}

.site-header {
  position: sticky;
  z-index: 40;
  top: 0;
  background: rgba(255, 255, 255, 0.98);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.masthead {
  position: relative;
  display: grid;
  grid-template-columns: minmax(190px, 1fr) auto minmax(190px, 1fr);
  align-items: center;
  min-height: 82px;
  gap: 20px;
}

.location-stamp {
  display: flex;
  align-items: baseline;
  gap: 13px;
  color: var(--muted);
  font-size: 0.9rem;
}

.location-stamp strong {
  color: var(--ink);
}

.location-stamp span::before {
  content: "•";
  margin-right: 13px;
  color: #aaa;
}

.brand-button {
  width: 310px;
  padding: 7px 24px;
  background: transparent;
}

.brand-button img {
  width: 100%;
  height: 56px;
  object-fit: contain;
}

.masthead-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
}

.primary-button,
.secondary-button,
.danger-button,
.account-button,
.text-button,
.search-toggle {
  min-height: 42px;
  border-radius: 6px;
  padding: 0 16px;
  font-weight: 750;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease, transform 150ms ease;
}

.primary-button {
  background: var(--accent);
  color: var(--white);
}

.primary-button:hover {
  background: var(--accent-dark);
}

.primary-button:active,
.secondary-button:active,
.account-button:active {
  transform: translateY(1px);
}

.secondary-button {
  background: var(--white);
  border: 1px solid #cfcfcf;
}

.secondary-button:hover {
  border-color: #9f9f9f;
  background: #f8f8f8;
}

.danger-button {
  background: var(--danger);
  color: var(--white);
}

.account-button {
  background: transparent;
  border: 1px solid var(--line);
}

.text-button,
.search-toggle {
  background: transparent;
  color: var(--ink);
}

.text-button:hover,
.search-toggle:hover {
  background: var(--soft);
}

.post-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.search-toggle {
  display: none;
  width: 42px;
  padding: 0;
}

.search-toggle svg,
.search-box svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.profile-avatar {
  display: grid;
  width: 43px;
  height: 43px;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: var(--white);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.section-nav {
  border-top: 1px solid var(--line);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.035);
}

.nav-row {
  display: grid;
  grid-template-columns: 172px minmax(0, 1fr) minmax(230px, 330px);
  align-items: stretch;
  min-height: 63px;
}

.menu-toggle {
  display: flex;
  align-items: center;
  gap: 11px;
  align-self: center;
  width: max-content;
  padding: 10px 0;
  background: transparent;
  font-size: 0.82rem;
  font-weight: 850;
  text-transform: uppercase;
}

.menu-lines {
  display: grid;
  gap: 4px;
  width: 22px;
}

.menu-lines i {
  display: block;
  height: 2px;
  background: currentColor;
}

.nav-scroll {
  display: flex;
  align-items: stretch;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav-scroll::-webkit-scrollbar {
  display: none;
}

.nav-link {
  position: relative;
  flex: 0 0 auto;
  min-width: 92px;
  padding: 0 18px;
  background: transparent;
  font-size: 0.96rem;
  font-weight: 750;
  white-space: nowrap;
}

.nav-link::after {
  position: absolute;
  right: 16px;
  bottom: 0;
  left: 16px;
  height: 3px;
  background: transparent;
  content: "";
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent);
}

.nav-link.active::after {
  background: var(--accent);
}

.site-search-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-left: 18px;
}

.search-box {
  position: relative;
  width: 100%;
}

.search-box input {
  width: 100%;
  height: 42px;
  border: 1px solid #d6d6d6;
  border-radius: 999px;
  outline: 0;
  padding: 0 46px 0 17px;
  background: var(--white);
}

.search-box input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(176, 11, 85, 0.1);
}

.search-box svg {
  position: absolute;
  top: 10px;
  right: 14px;
  pointer-events: none;
}

.search-clear {
  padding: 7px;
  background: transparent;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 750;
}

.status-banner {
  padding: 10px 24px;
  background: #fff4d6;
  border-bottom: 1px solid #edd599;
  color: #5b4300;
  text-align: center;
  font-weight: 700;
}

.page-main {
  min-height: 70vh;
  padding-top: 24px;
  padding-bottom: 64px;
}

.page-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 18px;
  padding: 22px 24px;
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 5px solid var(--accent);
}

.page-heading h1 {
  margin-bottom: 4px;
  font-size: clamp(1.8rem, 3vw, 2.7rem);
  line-height: 1.08;
}

.page-heading p {
  margin-bottom: 0;
  color: var(--muted);
}

.loading-state,
.empty-state {
  min-height: 310px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 9px;
  padding: 40px;
  background: var(--white);
  border: 1px solid var(--line);
  text-align: center;
}

.empty-state h2,
.empty-state p {
  margin-bottom: 0;
}

.empty-state p {
  max-width: 580px;
  color: var(--muted);
}

/* Home */
.home-top {
  display: grid;
  grid-template-columns: minmax(0, 1.58fr) minmax(250px, 0.74fr) minmax(290px, 0.78fr);
  gap: 8px;
}

.hero-secondary {
  display: grid;
  gap: 8px;
  grid-template-rows: 1fr 1fr;
}

.story-card,
.listing-card,
.event-card,
.announcement-card,
.deal-card,
.group-card,
.news-row,
.sidebar-section,
.section-panel {
  background: var(--white);
}

.story-card {
  position: relative;
  min-height: 230px;
  overflow: hidden;
  border-radius: 6px;
  background: #202020;
}

.story-card > button,
.listing-card > button,
.event-card > button,
.announcement-card > button,
.deal-card > button,
.group-card > button,
.sidebar-item > button,
.news-mini > button,
.market-mini > button,
.event-strip-card > button {
  width: 100%;
  padding: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.story-card .card-image,
.story-card .card-placeholder {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.story-card::after {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.02) 12%, rgba(0, 0, 0, 0.84) 100%);
  content: "";
  pointer-events: none;
}

.story-card .card-body {
  position: absolute;
  z-index: 2;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 22px;
  color: var(--white);
}

.hero-lead {
  min-height: 465px;
}

.hero-lead .card-body {
  padding: clamp(24px, 4vw, 34px);
}

.hero-lead .card-title {
  max-width: 760px;
  font-size: clamp(2rem, 3.2vw, 3.2rem);
  line-height: 1.08;
}

.hero-lead .card-excerpt {
  max-width: 700px;
  margin-bottom: 16px;
  font-size: clamp(1rem, 1.6vw, 1.3rem);
}

.compact-card {
  min-height: 228px;
}

.compact-card .card-title {
  font-size: clamp(1.15rem, 1.6vw, 1.45rem);
}

.content-label {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  margin-bottom: 10px;
  padding: 3px 9px;
  border-radius: 5px;
  background: var(--accent);
  color: var(--white);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

.card-title {
  margin-bottom: 8px;
  line-height: 1.2;
}

.card-excerpt {
  margin-bottom: 12px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 14px;
  color: inherit;
  font-size: 0.82rem;
  opacity: 0.78;
}

.card-placeholder {
  display: grid;
  place-items: center;
  background:
    linear-gradient(135deg, rgba(176, 11, 85, 0.96), rgba(62, 0, 29, 0.95)),
    var(--accent);
  color: rgba(255, 255, 255, 0.72);
  font-size: 5rem;
  font-weight: 900;
  text-transform: uppercase;
}

.trending-panel {
  min-height: 465px;
  padding: 20px 23px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.panel-title {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 18px;
  font-size: 1.22rem;
}

.panel-title .trend-mark {
  color: var(--accent);
  font-size: 1.4rem;
}

.trending-list {
  display: grid;
}

.trending-item {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px;
  padding: 13px 0;
  border-top: 1px solid var(--line);
}

.trending-item:first-child {
  border-top: 0;
  padding-top: 0;
}

.trending-number {
  color: var(--accent);
  font-size: 1.35rem;
  font-weight: 900;
}

.trending-item button {
  padding: 0;
  background: transparent;
  text-align: left;
}

.trending-item h3 {
  margin-bottom: 5px;
  font-size: 0.94rem;
  line-height: 1.3;
}

.trending-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
}

.quick-links {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  margin-top: 12px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: var(--shadow);
}

.quick-link {
  display: grid;
  grid-template-columns: 35px 1fr;
  gap: 11px;
  align-items: center;
  min-height: 84px;
  padding: 14px 21px;
  background: transparent;
  text-align: left;
}

.quick-link + .quick-link {
  border-left: 1px solid var(--line);
}

.quick-icon {
  display: grid;
  width: 35px;
  height: 35px;
  place-items: center;
  color: var(--accent);
  font-size: 1.75rem;
  line-height: 1;
}

.quick-link strong,
.quick-link span {
  display: block;
}

.quick-link strong {
  margin-bottom: 2px;
  font-size: 0.94rem;
}

.quick-link span:not(.quick-icon) {
  color: var(--muted);
  font-size: 0.75rem;
}

.home-lower {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 14px;
  margin-top: 14px;
}

.home-feed {
  display: grid;
  gap: 14px;
}

.section-panel,
.sidebar-section {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: var(--shadow);
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 14px;
}

.section-heading h2,
.sidebar-heading {
  margin-bottom: 0;
  font-size: 1.13rem;
}

.section-heading button {
  padding: 5px;
  background: transparent;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 800;
}

.latest-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.news-mini {
  min-width: 0;
}

.news-mini .card-image,
.news-mini .card-placeholder {
  width: 100%;
  height: 132px;
  margin-bottom: 10px;
  border-radius: 5px;
  object-fit: cover;
}

.news-mini .card-placeholder {
  font-size: 3rem;
}

.news-mini .mini-category {
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 850;
  text-decoration: underline;
  text-transform: uppercase;
}

.news-mini h3 {
  margin: 5px 0 12px;
  font-size: 0.94rem;
  line-height: 1.28;
}

.news-mini .mini-meta {
  color: var(--muted);
  font-size: 0.76rem;
}

.event-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.event-strip-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.event-strip-card > button {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 10px;
  min-height: 94px;
  padding: 11px;
}

.event-date-box {
  display: grid;
  align-content: center;
  min-height: 70px;
  border: 1px solid var(--line);
  border-radius: 5px;
  text-align: center;
}

.event-date-box span,
.event-date-box strong {
  display: block;
}

.event-date-box span {
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 850;
  text-transform: uppercase;
}

.event-date-box strong {
  font-size: 1.5rem;
}

.event-strip-card h3 {
  margin-bottom: 3px;
  font-size: 0.87rem;
  line-height: 1.25;
}

.event-strip-card p {
  margin: 2px 0;
  color: var(--muted);
  font-size: 0.73rem;
}

.home-rail {
  display: grid;
  align-content: start;
  gap: 14px;
}

.market-list,
.sidebar-list {
  display: grid;
}

.market-mini > button {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 13px;
  padding: 11px 0;
  border-top: 1px solid var(--line);
}

.market-mini:first-child > button {
  padding-top: 0;
  border-top: 0;
}

.market-mini .card-image,
.market-mini .card-placeholder {
  width: 96px;
  height: 82px;
  border-radius: 5px;
  object-fit: cover;
}

.market-mini .card-placeholder {
  font-size: 2rem;
}

.market-mini h3 {
  margin-bottom: 4px;
  font-size: 0.88rem;
  line-height: 1.24;
}

.market-mini .mini-price {
  display: block;
  margin-bottom: 4px;
  color: var(--accent);
  font-weight: 850;
}

.market-mini p {
  margin: 0;
  color: var(--muted);
  font-size: 0.73rem;
}

.sidebar-item > button {
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.sidebar-item:first-child > button {
  padding-top: 0;
  border-top: 0;
}

.sidebar-item .content-label {
  margin-bottom: 6px;
  padding: 0;
  background: transparent;
  color: var(--accent);
}

.sidebar-item h3 {
  margin-bottom: 4px;
  font-size: 0.91rem;
}

.sidebar-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.75rem;
}

.empty-home {
  display: grid;
  grid-template-columns: 1.6fr 0.85fr;
  min-height: 430px;
  overflow: hidden;
  border-radius: 6px;
  background: var(--white);
  border: 1px solid var(--line);
}

.empty-home-main {
  display: grid;
  align-content: end;
  padding: clamp(28px, 5vw, 64px);
  background:
    linear-gradient(0deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.12)),
    radial-gradient(circle at 18% 20%, #d9347f, #6e0635 55%, #1d0711);
  color: var(--white);
}

.empty-home-main h1 {
  max-width: 760px;
  margin-bottom: 14px;
  font-size: clamp(2.2rem, 5vw, 4.5rem);
  line-height: 0.98;
}

.empty-home-main p {
  max-width: 650px;
  font-size: 1.15rem;
}

.empty-home-side {
  display: grid;
  align-content: center;
  gap: 12px;
  padding: 30px;
}

.empty-home-side h2 {
  margin-bottom: 0;
}

.empty-home-side p {
  color: var(--muted);
}

/* Section pages */
.filters {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 12px;
  margin-bottom: 16px;
  padding: 14px;
  background: var(--white);
  border: 1px solid var(--line);
}

.filters input,
.filters select,
.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid #cacaca;
  border-radius: 5px;
  outline: 0;
  background: var(--white);
}

.filters input,
.filters select,
.field input,
.field select {
  height: 45px;
  padding: 0 13px;
}

.field textarea {
  min-height: 130px;
  padding: 12px 13px;
  resize: vertical;
}

.filters input:focus,
.filters select:focus,
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(176, 11, 85, 0.1);
}

.news-list {
  display: grid;
  background: var(--white);
  border: 1px solid var(--line);
}

.news-row {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 22px;
  padding: 20px;
  border-top: 1px solid var(--line);
}

.news-row:first-child {
  border-top: 0;
}

.news-row > button {
  padding: 0;
  background: transparent;
}

.news-row .card-image,
.news-row .card-placeholder {
  width: 100%;
  height: 185px;
  border-radius: 5px;
  object-fit: cover;
}

.news-row .card-placeholder {
  font-size: 4rem;
}

.news-row .card-body > button {
  padding: 0;
  background: transparent;
  text-align: left;
}

.news-row .content-label,
.listing-card .content-label,
.event-card .content-label,
.announcement-card .content-label,
.deal-card .content-label,
.group-card .content-label {
  padding: 0;
  background: transparent;
  color: var(--accent);
}

.news-row .card-title {
  font-size: 1.45rem;
}

.news-row .card-meta,
.listing-card .card-meta,
.event-card .card-meta,
.announcement-card .card-meta,
.deal-card .card-meta,
.group-card .card-meta {
  color: var(--muted);
  opacity: 1;
}

.market-grid,
.events-grid,
.deals-grid,
.groups-grid,
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px;
}

.listing-card,
.event-card,
.deal-card,
.group-card,
.announcement-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: var(--shadow);
}

.listing-card .card-image,
.listing-card .card-placeholder,
.event-card .card-image,
.event-card .card-placeholder,
.deal-card .card-image,
.deal-card .card-placeholder,
.group-card .card-image,
.group-card .card-placeholder {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.listing-card .card-placeholder,
.event-card .card-placeholder,
.deal-card .card-placeholder,
.group-card .card-placeholder {
  font-size: 4rem;
}

.listing-card .card-body,
.event-card .card-body,
.deal-card .card-body,
.group-card .card-body,
.announcement-card .card-body {
  padding: 17px;
}

.price-badge,
.date-badge {
  display: inline-block;
  margin: 3px 0 12px;
  color: var(--accent);
  font-weight: 850;
}

.date-badge {
  color: var(--ink);
}

.announcement-card {
  border-top: 4px solid var(--accent);
}

/* Dialogs and forms */
.modal {
  width: min(760px, calc(100% - 28px));
  max-height: calc(100vh - 28px);
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 7px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
}

.modal::backdrop {
  background: rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(2px);
}

.modal-frame {
  display: flex;
  max-height: calc(100vh - 28px);
  flex-direction: column;
  background: var(--white);
}

.modal-header,
.modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 21px;
}

.modal-header {
  border-bottom: 1px solid var(--line);
}

.modal-header h2,
.modal-header p {
  margin-bottom: 0;
}

.modal-footer {
  justify-content: flex-end;
  border-top: 1px solid var(--line);
}

.modal-body {
  padding: 21px;
  overflow-y: auto;
}

.icon-button {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  background: var(--soft);
  font-size: 1.45rem;
}

.eyebrow {
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--line);
}

.auth-tab {
  min-height: 46px;
  background: var(--white);
  font-weight: 750;
}

.auth-tab.active {
  color: var(--accent);
  box-shadow: inset 0 -3px var(--accent);
}

.auth-divider {
  position: relative;
  margin: 20px 0;
  color: var(--muted);
  text-align: center;
}

.auth-divider::before {
  position: absolute;
  z-index: 0;
  top: 50%;
  right: 0;
  left: 0;
  height: 1px;
  background: var(--line);
  content: "";
}

.auth-divider span {
  position: relative;
  z-index: 1;
  padding: 0 12px;
  background: var(--white);
}

.text-link-button {
  display: block;
  margin: 14px auto 0;
  padding: 5px;
  background: transparent;
  color: var(--accent);
  font-weight: 750;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.field {
  display: grid;
  gap: 6px;
}

.field label {
  font-weight: 750;
}

.full-span {
  grid-column: 1 / -1;
}

.full-width {
  width: 100%;
}

.field-help {
  color: var(--muted);
  font-size: 0.78rem;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500 !important;
}

.checkbox-row input {
  width: auto;
  height: auto;
}

.form-error {
  margin: 0;
  color: var(--danger);
  font-weight: 700;
}

.upload-progress {
  grid-column: 1 / -1;
  display: grid;
  gap: 7px;
}

.upload-progress progress {
  width: 100%;
  accent-color: var(--accent);
}

.detail-modal {
  width: min(900px, calc(100% - 28px));
}

.detail-content h1 {
  margin-bottom: 10px;
  font-size: clamp(1.8rem, 4vw, 3.1rem);
  line-height: 1.08;
}

.detail-byline {
  color: var(--muted);
}

.detail-image {
  width: 100%;
  max-height: 480px;
  margin: 18px 0;
  object-fit: cover;
}

.detail-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0;
}

.detail-fact {
  padding: 12px;
  background: var(--soft);
}

.detail-fact strong,
.detail-fact span {
  display: block;
}

.detail-fact span {
  margin-top: 3px;
  color: var(--muted);
}

.detail-body {
  white-space: pre-wrap;
}

.detail-link {
  color: var(--accent);
  font-weight: 800;
}

.toast-region {
  position: fixed;
  z-index: 100;
  right: 18px;
  bottom: 18px;
  display: grid;
  gap: 9px;
}

.toast {
  max-width: 340px;
  padding: 13px 15px;
  border-radius: 5px;
  background: var(--ink);
  color: var(--white);
  box-shadow: var(--shadow);
}

.site-footer {
  padding: 42px 0;
  background: #111;
  color: #d5d5d5;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
}

.footer-logo {
  width: 190px;
  margin-bottom: 15px;
  filter: brightness(0) invert(1);
}

.footer-grid p {
  margin: 8px 0 0;
  color: #aaa;
}

.noscript-message {
  padding: 16px;
  background: #ffdddd;
  text-align: center;
}

@media (max-width: 1180px) {
  .masthead {
    grid-template-columns: 1fr auto 1fr;
  }

  .location-stamp span,
  .text-button#sign-out-button {
    display: none;
  }

  .nav-row {
    grid-template-columns: 95px minmax(0, 1fr) 270px;
  }

  .menu-toggle span:last-child {
    display: none;
  }

  .home-top {
    grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.65fr);
  }

  .trending-panel {
    grid-column: 1 / -1;
    min-height: auto;
  }

  .trending-list {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
  }

  .trending-item {
    grid-template-columns: 28px minmax(0, 1fr);
    border-top: 0;
    border-left: 1px solid var(--line);
    padding: 0 0 0 12px;
  }

  .trending-item:first-child {
    border-left: 0;
    padding-left: 0;
  }

  .home-lower {
    grid-template-columns: minmax(0, 1fr) 330px;
  }

  .latest-grid,
  .event-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quick-links {
    grid-template-columns: repeat(3, 1fr);
  }

  .quick-link:nth-child(4) {
    border-left: 0;
  }

  .quick-link:nth-child(n + 4) {
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 840px) {
  .site-shell {
    width: min(calc(100% - 28px), var(--shell));
  }

  .site-header {
    position: static;
  }

  .masthead {
    grid-template-columns: 1fr auto;
    min-height: 68px;
  }

  .location-stamp {
    display: none;
  }

  .brand-button {
    justify-self: start;
    width: 190px;
    padding: 5px 0;
  }

  .brand-button img {
    height: 44px;
  }

  .masthead-actions {
    grid-column: 2;
  }

  .post-button {
    min-width: 46px;
    padding: 0 12px;
  }

  .post-button span + * {
    display: none;
  }

  .search-toggle {
    display: grid;
    place-items: center;
  }

  .account-button {
    display: none;
  }

  .nav-row {
    position: relative;
    display: grid;
    grid-template-columns: 80px minmax(0, 1fr);
    min-height: 54px;
  }

  .menu-toggle {
    align-self: center;
  }

  .nav-scroll {
    display: none;
    position: absolute;
    z-index: 10;
    top: 54px;
    right: 0;
    left: 0;
    flex-direction: column;
    overflow: hidden;
    background: var(--white);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
  }

  .nav-scroll.open {
    display: flex;
  }

  .nav-link {
    min-height: 48px;
    text-align: left;
  }

  .nav-link::after {
    top: 8px;
    right: auto;
    bottom: 8px;
    left: 0;
    width: 3px;
    height: auto;
  }

  .site-search-wrap {
    display: none;
    grid-column: 1 / -1;
    padding: 10px 0 12px;
  }

  .site-search-wrap.open {
    display: flex;
  }

  .home-top,
  .home-lower,
  .empty-home {
    grid-template-columns: 1fr;
  }

  .hero-lead {
    min-height: 420px;
  }

  .hero-secondary {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
  }

  .trending-list {
    grid-template-columns: 1fr 1fr;
  }

  .trending-item:nth-child(odd) {
    border-left: 0;
    padding-left: 0;
  }

  .home-rail {
    grid-template-columns: 1fr 1fr;
  }

  .market-grid,
  .events-grid,
  .deals-grid,
  .groups-grid,
  .news-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .news-row {
    grid-template-columns: 210px minmax(0, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 580px) {
  body {
    font-size: 15px;
  }

  .site-shell {
    width: min(calc(100% - 20px), var(--shell));
  }

  .masthead-actions {
    gap: 4px;
  }

  .text-button#sign-out-button {
    display: none !important;
  }

  .page-main {
    padding-top: 10px;
  }

  .home-top {
    gap: 8px;
  }

  .hero-lead {
    min-height: 410px;
  }

  .hero-lead .card-title {
    font-size: 2rem;
  }

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

  .compact-card {
    min-height: 225px;
  }

  .trending-list,
  .quick-links,
  .home-rail,
  .latest-grid,
  .event-strip,
  .market-grid,
  .events-grid,
  .deals-grid,
  .groups-grid,
  .news-grid,
  .filters,
  .form-grid,
  .detail-facts {
    grid-template-columns: 1fr;
  }

  .trending-item,
  .trending-item:nth-child(odd) {
    border-top: 1px solid var(--line);
    border-left: 0;
    padding: 11px 0;
  }

  .trending-item:first-child {
    border-top: 0;
  }

  .quick-link + .quick-link,
  .quick-link:nth-child(4),
  .quick-link:nth-child(n + 4) {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .news-row {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 14px;
  }

  .news-row .card-image,
  .news-row .card-placeholder {
    height: 200px;
  }

  .listing-card .card-image,
  .listing-card .card-placeholder,
  .event-card .card-image,
  .event-card .card-placeholder,
  .deal-card .card-image,
  .deal-card .card-placeholder,
  .group-card .card-image,
  .group-card .card-placeholder {
    height: 190px;
  }

  .full-span {
    grid-column: auto;
  }

  .modal-header,
  .modal-footer,
  .modal-body {
    padding: 15px;
  }

  .modal-footer {
    flex-wrap: wrap;
  }

  .modal-footer button {
    flex: 1 1 auto;
  }

  .toast-region {
    right: 10px;
    bottom: 10px;
    left: 10px;
  }

  .toast {
    max-width: none;
  }
}

.demo-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.detail-facts > div {
  padding: 12px;
  background: var(--soft);
}

.detail-facts > div strong,
.detail-facts > div span {
  display: block;
}

.detail-facts > div span {
  margin-top: 3px;
  color: var(--muted);
}

.quick-link > span:last-child {
  color: var(--ink);
}

.quick-link > span:last-child > span {
  color: var(--muted);
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 16px;
  color: var(--muted);
  font-size: 0.86rem;
}

.profile-footer-spacer {
  flex: 1;
}
