/* MacBNB visual layer: loaded last, overrides style/glass/clarity with one restrained system.
   One brand color, neutral ink scale, white surfaces, hairline borders, large confident type. */
:root {
  --ml-coral: #e8484d;
  --ml-coral-deep: #c8323b;
  --ml-coral-soft: #fff1f0;
  --ml-ink: #0f1728;
  --ml-ink-2: #39455a;
  --ml-muted: #5c6678;
  --ml-line: #e6e9ee;
  --ml-line-strong: #d5dae2;
  --ml-bg: #f6f4ef;
  --ml-bg-soft: #efece4;
  --ml-surface: #ffffff;
  --ml-green: #157a4a;
  --ml-radius: 18px;
  --ml-shadow-sm: 0 1px 2px rgba(15, 23, 40, .05);
  --ml-shadow-md: 0 6px 24px rgba(15, 23, 40, .08);
  --ml-shadow-lg: 0 18px 48px rgba(15, 23, 40, .12);
  --ml-header-h: 72px;
  --ml-serif: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", "Noto Serif CJK SC", Georgia, serif;
  --ml-sans: 'Inter', 'PingFang SC', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* The older layers (style, glass, clarity) read these; point them at this palette so no stray blue remains. */
  --bg: var(--ml-bg);
  --ink: var(--ml-ink);
  --muted: var(--ml-muted);
  --line: var(--ml-line);
  --green: var(--ml-ink);
  --green-dark: #000;
  --pale: var(--ml-bg-soft);
  --sans: var(--ml-sans);
}

body {
  background: var(--ml-bg);
  background-image: none;
  color: var(--ml-ink);
  font-family: var(--ml-sans);
}

button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--ml-ink);
  outline-offset: 3px;
}

/* ---------- Header: full width, hairline, no floating capsule ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 30;
  padding: 0;
  border-bottom: 1px solid var(--ml-line);
  background: rgba(246, 244, 239, .86);
  backdrop-filter: saturate(1.8) blur(18px);
  -webkit-backdrop-filter: saturate(1.8) blur(18px);
  pointer-events: auto;
}

.header-inner {
  max-width: 1280px;
  height: var(--ml-header-h);
  padding: 0 32px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.brand { color: var(--ml-ink); letter-spacing: -.6px; }

/* Logo C: text-only wordmark, "bnb" and the dot in brand red. */
.logo-c {
  display: inline-flex;
  align-items: baseline;
  color: var(--ml-ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Helvetica Neue", sans-serif;
  font-size: 25px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.045em;
}

.logo-c span { color: var(--ml-coral); }
.logo-c i { width: .26em; height: .26em; margin-left: .07em; border-radius: 50%; background: var(--ml-coral); }
.footer-brand .logo-c { color: #fff; font-size: 28px; }
input[type=range], input[type=checkbox] { accent-color: var(--ml-coral); }

.desktop-nav { gap: 4px; }

.desktop-nav a {
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--ml-ink-2);
  font-size: 14px;
  font-weight: 500;
  background: transparent;
}

.desktop-nav a:hover { color: var(--ml-ink); background: var(--ml-bg-soft); }
.desktop-nav a.active { color: var(--ml-ink); font-weight: 600; background: var(--ml-bg-soft); }

.header-cta {
  min-height: 40px;
  padding: 0 18px;
  font-size: 13px;
  font-weight: 600;
}

.account-button {
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--ml-line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--ml-ink);
  font-size: 13px;
  font-weight: 600;
  box-shadow: none;
}

.account-button:hover { box-shadow: var(--ml-shadow-md); }

.language-switcher { position: relative; }
.language-switcher > button { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--ml-line-strong); border-radius: 50%; background: transparent; color: var(--ml-ink); font-size: 12px; font-weight: 700; }
.language-menu { position: absolute; top: calc(100% + 9px); right: 0; display: none; min-width: 132px; padding: 5px; border: 1px solid var(--ml-line); border-radius: 12px; background: #fff; box-shadow: var(--ml-shadow-lg); }
.language-switcher:hover .language-menu, .language-switcher:focus-within .language-menu { display: grid; }
.language-menu button { padding: 9px 10px; border-radius: 8px; color: var(--ml-ink-2); font-size: 12px; text-align: left; }
.language-menu button:hover, .language-menu button.active { background: var(--ml-bg-soft); color: var(--ml-ink); }
.mobile-languages { display: flex; gap: 6px; padding-top: 10px; border-top: 1px solid var(--ml-line); }
.mobile-languages button { padding: 7px 9px; border: 1px solid var(--ml-line); border-radius: 8px; color: var(--ml-ink-2); font-size: 11px; }
.mobile-languages button.active { border-color: var(--ml-ink); background: var(--ml-ink); color: #fff; }

html[lang="en"] .desktop-nav a { padding-inline: 10px; font-size: 13px; }
html[lang="en"] .header-cta { padding-inline: 14px; }
html[lang="en"] .listing-spec-grid b { font-size: 8px; }
html[lang="en"] .category-label { font-size: 20px; }

/* ---------- Buttons ---------- */
.primary {
  background: var(--ml-ink);
  border-color: var(--ml-ink);
  color: #fff;
  box-shadow: none;
}

.primary:hover { background: #000; border-color: #000; }
.secondary { background: transparent; border: 1px solid var(--ml-line-strong); color: var(--ml-ink); box-shadow: none; }
.secondary:hover { background: var(--ml-surface); }

/* Search pill */
.hero-search {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  align-items: center;
  max-width: 760px;
  margin-top: 36px;
  padding: 8px 8px 8px 0;
  border: 1px solid var(--ml-line);
  border-radius: 999px;
  background: #fff;
  box-shadow: var(--ml-shadow-lg);
}

.hs-field {
  position: relative;
  display: grid;
  gap: 2px;
  padding: 8px 26px;
  border-radius: 999px;
  cursor: pointer;
}

.hs-field + .hs-field::before {
  content: '';
  position: absolute;
  left: 0;
  top: 22%;
  bottom: 22%;
  width: 1px;
  background: var(--ml-line);
}

.hs-field:hover { background: var(--ml-bg); }

.hs-field span {
  color: var(--ml-ink);
  font-size: 12px;
  font-weight: 700;
}

.hs-field select {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ml-muted);
  font-size: 14px;
  cursor: pointer;
}

.hs-field select:focus-visible { outline: none; }
.hs-field:focus-within { background: var(--ml-bg); }

.hs-submit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 52px;
  padding: 0 24px;
  border-radius: 999px;
  background: var(--ml-ink);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
}

.hs-submit:hover { background: #000; }
.hs-submit svg { width: 18px; height: 18px; stroke: currentColor; }

/* ---------- Market ---------- */
.category-bar {
  margin-top: 56px;
  padding-top: 0;
  border-bottom: 1px solid var(--ml-line);
}

.category-label { color: var(--ml-ink); font-size: 22px; font-weight: 800; letter-spacing: -.02em; }

.category-control {
  padding: 4px;
  border: 0;
  border-radius: 999px;
  background: var(--ml-bg-soft);
  box-shadow: none;
}

.category-button { color: var(--ml-muted); font-weight: 600; }
.category-button:hover { color: var(--ml-ink); }

.category-button.active {
  color: var(--ml-ink);
  background: #fff;
  box-shadow: var(--ml-shadow-sm), 0 0 0 1px var(--ml-line);
}

.market-heading { margin-top: 28px; margin-bottom: 20px; }
.market-tab { color: var(--ml-muted); font-weight: 600; }
.market-tab.active { color: var(--ml-ink); }
.market-tab.active::after { background: var(--ml-ink); height: 2px; }

.search-box {
  border: 1px solid var(--ml-line-strong);
  border-radius: 999px;
  background: #fff;
  box-shadow: none;
}

.search-box:focus-within { border-color: var(--ml-ink); }

.filter-panel,
.listing,
.host-mini,
.step-card,
.info-box,
.host-form,
.faq-aside,
.detail-section,
.rental-card,
.landlord-card {
  border: 1px solid var(--ml-line);
  background: #fff;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.filter-panel { border-radius: var(--ml-radius); }
.filter-title { color: var(--ml-ink); font-weight: 700; }

.chip-option.active {
  color: #fff;
  background: var(--ml-ink);
  border-color: var(--ml-ink);
}

.host-mini {
  background: #fff;
  border-color: var(--ml-line-strong);
  color: #fff;
}

.host-mini h3 { color: var(--ml-ink); font-size: 14px; }
.host-mini p { color: var(--ml-muted); font-size: 12px; line-height: 1.7; }
.host-mini a { color: var(--ml-ink); font-size: 12px; font-weight: 700; }
.host-mini > svg { color: var(--ml-coral); }

/* Counts are quiet badges, not tiny colored squares from the legacy skin. */
.category-button span,
.count-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border: 1px solid var(--ml-line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--ml-muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.category-button.active span {
  border-color: var(--ml-ink);
  background: var(--ml-ink);
  color: #fff;
}

.listing {
  position: relative;
  overflow: hidden;
  border-radius: var(--ml-radius);
  transition: box-shadow .2s ease, border-color .2s ease;
}

.listing::before { display: none; }

.listing:hover {
  transform: none;
  border-color: var(--ml-line-strong);
  box-shadow: var(--ml-shadow-md);
}

.device-image {
  border: 0;
  border-radius: 14px;
  background: var(--ml-bg-soft);
}

.listing-title { color: var(--ml-ink); font-size: 18px; font-weight: 700; letter-spacing: -.01em; }

.available { color: var(--ml-green); background: #e9f6ef; font-weight: 600; }
.available.wait { color: #7a6a52; background: #f4efe6; }

.listing-tags span {
  border: 0;
  background: var(--ml-bg-soft);
  color: var(--ml-ink-2);
}

.price { color: var(--ml-ink); font-weight: 800; letter-spacing: -.02em; }
.price small, .price-period { color: var(--ml-muted); font-weight: 500; }

.detail-button {
  color: #fff;
  background: var(--ml-ink);
  border-color: var(--ml-ink);
  font-weight: 600;
}

.detail-button:hover { color: #fff; background: #000; border-color: #000; }
.listing-footer { border-top-color: var(--ml-line); }
.save-button { color: var(--ml-muted); }
.save-button.saved { color: var(--ml-coral); }

.page-button.active { color: #fff; background: var(--ml-ink); border-color: var(--ml-ink); }

.text-button,
.content-tabs button.active,
.detail-save[aria-pressed=true] {
  color: var(--ml-coral-deep);
}

.small-dot, .signal-dot { background: var(--ml-coral); }

/* ---------- Content pages ---------- */
.content-hero { padding: 104px 0 56px; text-align: center; }
.content-hero h1 { text-wrap: balance; max-width: 860px; margin-inline: auto; color: var(--ml-ink); font-family: var(--ml-serif); font-size: clamp(36px, 5vw, 64px); font-weight: 500; letter-spacing: -.01em; line-height: 1.16; }
.content-hero p { max-width: 640px; margin-inline: auto; color: var(--ml-ink-2); font-size: 17px; line-height: 1.8; }
.content-hero .eyebrow { justify-content: center; padding: 0; border: 0; background: none; color: var(--ml-muted); font-size: 13px; font-weight: 500; letter-spacing: .04em; }
.content-tabs { justify-content: center; }
.step-card h2, .info-box h3, .faq-aside h3, .checklist h3, .host-form h2, .about-visual .big-type { font-family: var(--ml-serif); font-weight: 500; letter-spacing: 0; }
.step-card h2 { font-size: 22px; }
.step-number { font-family: var(--ml-serif); font-weight: 500; }
.benefit-icon { background: var(--ml-bg-soft); color: var(--ml-ink); }
.value-grid .step-card > svg { color: var(--ml-coral); }

/* About: the founding story reads like an essay, the visual is a dark quote card. */
.about-copy p { color: var(--ml-ink-2); font-size: 16px; line-height: 1.95; }
.about-copy p + p { margin-top: 16px; }
.about-copy .about-lead { color: var(--ml-ink); font-family: var(--ml-serif); font-size: 26px; line-height: 1.5; }
.about-visual { border: 0; border-radius: var(--ml-radius); background: var(--ml-ink); box-shadow: none; }
.about-visual .big-type { color: #fff; font-family: var(--ml-serif); font-size: clamp(44px, 5vw, 64px); letter-spacing: -.01em; line-height: 1.1; }
.about-visual .big-type span { color: var(--ml-coral); }
.about-visual p { color: rgba(255, 255, 255, .62); font-size: 13px; }
.faq-list summary { font-weight: 600; }
.info-box { background: var(--ml-ink); border-color: var(--ml-ink); color: rgba(255, 255, 255, .72); }
.info-box h3 { color: #fff; font-size: 24px; }
.info-box p { color: rgba(255, 255, 255, .7); }
.info-box .primary { background: #fff; border-color: #fff; color: var(--ml-ink); }
.info-box .primary:hover { background: var(--ml-bg); border-color: var(--ml-bg); }
.info-box svg { stroke: currentColor; }
.step-card, .info-box, .faq-aside { border-radius: var(--ml-radius); }
.step-number { color: var(--ml-coral); }

/* ---------- Footer: dark band for weight ---------- */
.footer {
  margin-top: 96px;
  border-top: 0;
  background: var(--ml-ink);
  color: rgba(255, 255, 255, .72);
}

.footer p, .footer-bottom, .footer-bottom span { color: rgba(255, 255, 255, .6); }
.footer-links a { color: rgba(255, 255, 255, .85); }
.footer-links a:hover { color: #fff; }
.footer-bottom { border-top-color: rgba(255, 255, 255, .12); }
.footer .staff-demo-entry { color: rgba(255, 255, 255, .5); }

/* ---------- Account dialog ---------- */
.account-modal { width: min(440px, calc(100vw - 32px)); padding: 28px; border-radius: 22px; max-height: calc(100dvh - 24px); overflow-x: hidden; scrollbar-width: thin; scrollbar-color: rgba(23, 32, 51, .25) transparent; }
.account-modal::-webkit-scrollbar { width: 6px; height: 6px; }
.account-modal::-webkit-scrollbar-thumb { background: rgba(23, 32, 51, .22); border-radius: 3px; }
.account-modal::-webkit-scrollbar-track { background: transparent; }
.account-content h2 { margin-top: 11px; font-size: 24px; font-weight: 800; }
.account-content > p { margin: 8px 0 16px; color: var(--ml-muted); font-size: 13px; }
.account-content form { display: grid; gap: 10px; }
.account-content [hidden] { display: none; }
.account-content form label { font-size: 12px; font-weight: 600; }

.account-content form input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--ml-line-strong);
  border-radius: 10px;
  padding: 0 12px;
  background: #fff;
}

.account-content form button { margin-top: 5px; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  :root { --ml-header-h: 64px; }
  .header-inner { padding: 0 20px; }
  .logo-c { font-size: 22px; }
  .content-hero { padding: 64px 0 40px; }

  .hero-search {
    grid-template-columns: 1fr;
    gap: 2px;
    padding: 8px;
    border-radius: 22px;
  }

  .hs-field { padding: 10px 16px; border-radius: 14px; }
  .hs-field + .hs-field::before { left: 16px; right: 16px; top: 0; bottom: auto; width: auto; height: 1px; }
  .hs-submit { justify-content: center; margin-top: 6px; border-radius: 14px; }
  .category-bar { margin-top: 40px; }
  .category-label { font-size: 18px; }
}

@media (max-width: 640px) {
  .account-button { min-height: 34px; padding: 0 12px; font-size: 12px; white-space: nowrap; }
  /* "出租你的 Mac" is in the mobile menu; the header keeps only the account button. */
  .header-cta { display: none; }
  .language-switcher { margin-left: auto; }
  .language-switcher > button { width: 32px; height: 32px; }
  .listing { border-radius: 16px; }
  .footer { margin-top: 64px; }
}

/* Legacy blue from style.css / glass.css / clarity.css, brought onto the paper-and-ink palette.
   Ink marks the active or primary state, coral only marks saved items and live counts. */
.desktop-nav a.active { background: var(--ml-bg-soft); color: var(--ml-ink); }
.category-button.active,
.chip-option.active,
.filter-summary button { border-color: var(--ml-ink); background: var(--ml-ink); color: #fff; box-shadow: none; }
.category-button.active span,
.category-button.active svg { color: #fff; }
.page-button.active,
.review-tabs button.active,
.demo-role-bar button.active { border-color: var(--ml-ink); background: var(--ml-ink); color: #fff; }
.text-button,
.materials-link { color: var(--ml-ink); text-decoration: underline; text-decoration-color: var(--ml-line-strong); text-underline-offset: 4px; }
.text-button:hover,
.materials-link:hover { text-decoration-color: currentColor; }
.save-button.saved,
.detail-save[aria-pressed="true"] { color: var(--ml-coral); }
.detail-save { color: var(--ml-ink-2); }
.detail-button { border-color: var(--ml-line); background: var(--ml-surface); color: var(--ml-ink); }
.detail-button:hover { border-color: var(--ml-ink); background: var(--ml-surface); }
.host-review-actions .button { background: var(--ml-ink); color: #fff; }
.material-agreement input,
.console input[type="checkbox"] { accent-color: var(--ml-ink); }
.switch-row input:checked { background: var(--ml-ink); }

.device-showcase,
.inquiry-preview,
.section-icon,
.avatar { border-color: var(--ml-line); background: var(--ml-bg-soft); color: var(--ml-ink-2); }
.message-bubble.own { border-color: var(--ml-ink); background: var(--ml-ink); color: #fff; }
.workflow-banner,
.workflow-steps,
.submission-result,
.recipient-scope,
.scope-badge,
.demo-badge { border-color: var(--ml-line); background: var(--ml-surface); color: var(--ml-ink-2); }
.workflow-banner strong,
.submission-result strong { color: var(--ml-ink); }
.available { background: #e7f4ec; color: var(--ml-green); }
.empty-state { border: 1px dashed var(--ml-line-strong); background: transparent; }
.toast { border: 0; background: var(--ml-ink); color: #fff; box-shadow: var(--ml-shadow-lg); }
.modal-title,
.rental-total strong,
.quantity b { color: var(--ml-ink); }
.stock-line { color: var(--ml-ink-2); }

/* Public listings are text-first. Photos and large device art can reveal a host's environment,
   so the market shows only a small abstract model mark plus machine and rental specifications. */
#listing-container { display: grid; grid-template-columns: 1fr; gap: 12px; }
#listing-container > .empty-state { grid-column: 1 / -1; }
.listing-compact { display: grid; grid-template-columns: 88px minmax(0, 1fr); padding: 18px 68px 18px 18px; border-radius: 14px; transition: border-color .2s ease, box-shadow .2s ease; }
.listing-compact:hover { border-color: var(--ml-line-strong); box-shadow: var(--ml-shadow-md); transform: none; }
.listing-model { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 68px; height: 68px; align-self: start; border: 1px solid var(--ml-line); border-radius: 12px; background: var(--ml-bg-soft); }
.listing-model strong { max-width: 58px; overflow: hidden; color: var(--ml-ink); font-size: 16px; font-weight: 800; line-height: 1.1; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.listing-model span { margin-top: 5px; color: var(--ml-muted); font-size: 9px; font-weight: 700; letter-spacing: .08em; }
.listing > .save-button { position: absolute; top: 16px; right: 16px; display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 1px solid var(--ml-line); border-radius: 50%; background: #fff; color: var(--ml-ink-2); box-shadow: none; transition: color .2s ease, border-color .2s ease; }
.listing > .save-button:hover { transform: scale(1.08); color: var(--ml-coral); }
.listing > .save-button svg { width: 18px; height: 18px; }
.listing > .save-button.saved { color: var(--ml-coral); }
.listing > .save-button.saved svg { fill: var(--ml-coral); }
.listing-body { display: grid; gap: 12px; padding: 0; }
.listing-topline { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.listing-location { margin: 0 0 3px; color: var(--ml-muted); font-size: 12px; }
.listing-body .listing-title { display: inline-block; color: var(--ml-ink); font-size: 18px; line-height: 1.45; }
.listing-price-block { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; padding-right: 10px; }
.listing-body .price { flex: none; font-family: var(--ml-serif); font-size: 25px; font-weight: 500; white-space: nowrap; }
.listing-body .price small { font-family: var(--ml-sans); font-size: 14px; }
.listing-body .price-period { font-family: var(--ml-sans); font-size: 13px; }
.listing-price-block .available { padding: 3px 8px; border-radius: 999px; font-size: 10px; }
.listing-spec-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.listing-spec-grid span { min-width: 0; padding: 8px 9px; border-radius: 8px; background: var(--ml-bg); color: var(--ml-ink-2); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.listing-spec-grid b { display: block; margin-bottom: 2px; color: var(--ml-muted); font-size: 9px; font-weight: 600; }
.listing-body .listing-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.listing-body .listing-tags span { padding: 3px 9px; border-radius: 99px; font-size: 12px; }
.listing-body .listing-footer { display: flex; align-items: center; gap: 14px; margin: 0; padding-top: 12px; border-top: 1px solid var(--ml-line); color: var(--ml-muted); font-size: 12px; }
.listing-body .landlord { display: inline-flex; align-items: center; gap: 8px; color: var(--ml-ink-2); }
.listing-body .avatar { width: 24px; height: 24px; border: 0; border-radius: 50%; background: var(--ml-ink); color: #fff; font-family: var(--ml-sans); font-size: 11px; font-weight: 600; }
.listing-body .host-code { color: var(--ml-muted); font-size: 11px; }
.listing-detail-link { display: inline-flex; align-items: center; gap: 5px; margin-left: auto; color: var(--ml-ink); font-size: 12px; font-weight: 700; }
.listing-detail-link svg { width: 13px; height: 13px; }

.device-summary { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1px; overflow: hidden; border-radius: var(--ml-radius); background: var(--ml-line); }
.device-summary > div { display: grid; gap: 7px; min-height: 104px; padding: 22px 18px; background: #fff; }
.device-summary-label { color: var(--ml-muted); font-size: 11px; }
.device-summary strong { color: var(--ml-ink); font-size: 15px; overflow-wrap: anywhere; }
.device-summary > p { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; margin: 0; padding: 12px 18px; background: var(--ml-bg-soft); color: var(--ml-muted); font-size: 11px; }
.device-summary > p svg { width: 14px; height: 14px; color: var(--ml-coral); }

@media (max-width: 1080px) and (min-width: 861px) {
  .listing-spec-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  #listing-container { grid-template-columns: 1fr; gap: 14px; }
  .listing-compact { grid-template-columns: 1fr; padding: 16px 48px 16px 16px; }
  .listing-model { display: none; }
  .listing-topline { display: grid; gap: 10px; }
  .listing-price-block { align-items: flex-start; padding: 0; }
  .listing-spec-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .listing-body .listing-footer { flex-wrap: wrap; }
  .listing-detail-link { width: 100%; margin-left: 0; }
  .device-summary { grid-template-columns: 1fr 1fr; }
  .device-summary > p { grid-column: 1 / -1; }
}

/* Slate-blue secondary text and links left in the legacy layers. */
.breadcrumbs a,
.review-navigation a,
.back-to-market a,
.back-to-market,
.inquiry-heading span { color: var(--ml-ink-2); }
.landlord-card p,
.landlord-profile p,
.rental-unit-price span,
.rental-total small,
.stock-line span,
.section-heading p,
.review-card-header p,
.conversation-footer,
.illustration-note span,
.rental-eyebrow,
.rental-eyebrow div { color: var(--ml-muted); }
.workflow-banner svg { color: var(--ml-coral); }
.signal-dot span { background: var(--ml-green); }
.demo-role-bar button,
.review-tabs button,
.message-actions button,
.conversation-footer button { color: var(--ml-ink-2); }
#main .rental-unit-price span,
#main .stock-line span,
#main .illustration-note span { color: var(--ml-muted); }
#main .signal-dot span { background: var(--ml-green); }
#main .host-mini { border-color: var(--ml-line-strong); background: #fff; color: var(--ml-ink); }
#main .host-mini h3 { color: var(--ml-ink); }
#main .host-mini p { color: var(--ml-muted); }
#main .host-mini a { color: var(--ml-ink); }
#main .host-mini svg { color: var(--ml-coral); }

/* Login dialog: password sign-in with a login / register switch */
.account-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin: 0 0 14px; border-radius: 12px; background: var(--ml-bg-soft); }
.account-tabs[hidden] { display: none; }
.account-tabs button { min-height: 36px; border: 0; border-radius: 9px; background: transparent; color: var(--ml-muted); font: 600 13px/1 var(--ml-sans); cursor: pointer; transition: background .2s, color .2s, box-shadow .2s; }
.account-tabs button[aria-selected="true"] { background: var(--ml-surface, #fff); color: var(--ml-ink); box-shadow: var(--ml-shadow-sm); }
.account-register-only { display: grid; gap: 11px; }
.account-fineprint { margin: 2px 0 0; color: var(--ml-muted); font-size: 12px; line-height: 1.6; }
.account-switch { display: block; margin: 14px auto 0; }

/* ---------- Market v2: grid-first browsing + aligned comparison list ---------- */
.market-grid { grid-template-columns: 226px minmax(0, 1fr); }
.toolbar-actions { display: flex; align-items: center; gap: 12px; }
.view-toggle { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border: 1px solid var(--ml-line); border-radius: 10px; background: #fff; }
.view-toggle button { display: inline-flex; align-items: center; gap: 5px; min-height: 30px; padding: 0 9px; border-radius: 7px; color: var(--ml-muted); font-size: 11px; font-weight: 600; }
.view-toggle button.active { background: var(--ml-ink); color: #fff; }
.view-toggle svg { width: 13px; height: 13px; }
.filter-empty { color: var(--ml-muted); font-size: 11px; }

#listing-container.view-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
#listing-container.view-list { display: grid; grid-template-columns: 1fr; gap: 10px; }
#listing-container > .empty-state { grid-column: 1 / -1; }

.listing-grid-card { display: flex; flex-direction: column; padding: 0; border-radius: 18px; }
.listing-grid-card:hover { transform: translateY(-2px); }
.listing-grid-card .listing-media { position: relative; display: grid; place-items: center; height: 152px; margin: 7px 7px 0; overflow: hidden; border-radius: 13px; background: var(--ml-bg-soft); color: inherit; }
.listing-grid-card .listing-chip { position: absolute; left: 50%; top: 50%; color: rgba(15,23,40,.055); font-size: 88px; font-weight: 800; line-height: 1; transform: translate(-50%,-54%); white-space: nowrap; }
.listing-grid-card .device-image { position: relative; width: auto; height: auto; background: none; }
.listing-grid-card .device-image svg { width: 124px; height: 96px; }
.listing-grid-card .listing-place { position: absolute; left: 11px; bottom: 11px; padding: 4px 8px; border-radius: 999px; background: rgba(255,255,255,.9); color: var(--ml-ink); font-size: 11px; font-weight: 600; }
.listing-grid-card .available { position: absolute; right: 11px; bottom: 11px; padding: 4px 8px; border-radius: 999px; font-size: 10px; }
.online-dot { position: absolute; left: 11px; top: 11px; display: inline-flex; align-items: center; gap: 5px; padding: 4px 7px; border-radius: 999px; background: rgba(255,255,255,.92); color: var(--ml-green); font-size: 10px; font-weight: 700; }
.online-dot i,.online-inline i { width: 7px; height: 7px; border-radius: 50%; background: #21a366; box-shadow: 0 0 0 3px rgba(33,163,102,.14); }
.listing-grid-card > .save-button { top: 15px; right: 15px; }
.listing-grid-card .listing-body { padding: 15px 17px 16px; }
.listing-grid-card .listing-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.listing-grid-card .listing-title { font-size: 16px; }
.listing-grid-card .price { text-align: right; font-size: 22px; }
.price em { display: block; margin-top: 2px; color: var(--ml-coral-deep); font-family: var(--ml-sans); font-size: 10px; font-style: normal; font-weight: 700; }
.listing-specs { color: var(--ml-ink-2); font-size: 12px; }
.listing-grid-card .listing-trust { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 11px; border-top: 1px solid var(--ml-line); }
.listing-grid-card .listing-trust .landlord { display: inline-flex; align-items: center; gap: 7px; color: var(--ml-ink-2); font-size: 12px; }
.listing-grid-card .listing-trust small { color: var(--ml-muted); font-size: 10px; }
.escrow-badge { display: inline-flex; align-items: center; gap: 4px; color: var(--ml-green); font-size: 10px; font-weight: 700; white-space: nowrap; }
.escrow-badge svg { width: 12px; height: 12px; }
.listing-grid-card .listing-footer { padding-top: 10px; font-size: 11px; }

.listing-list-card { position: relative; padding: 15px 54px 12px 17px; border-radius: 13px; }
.listing-list-main { display: grid; grid-template-columns: minmax(175px,1.3fr) minmax(420px,3fr) minmax(110px,.7fr); gap: 16px; align-items: center; }
.listing-list-title p { display: flex; align-items: center; gap: 8px; margin: 0 0 4px; color: var(--ml-muted); font-size: 11px; }
.listing-list-title > a { color: var(--ml-ink); font-size: 15px; font-weight: 700; }
.listing-list-title .available { display: inline-flex; margin-top: 6px; padding: 3px 7px; border-radius: 999px; font-size: 10px; }
.online-inline { display: inline-flex; align-items: center; gap: 5px; color: var(--ml-green); font-size: 10px; font-weight: 700; }
.listing-list-price { text-align: right; }
.listing-list-price .price { font-size: 23px; }
.listing-list-footer { display: flex; align-items: center; gap: 14px; margin-top: 11px; padding-top: 10px; border-top: 1px solid var(--ml-line); color: var(--ml-muted); font-size: 11px; }
.listing-list-footer .landlord { display: inline-flex; align-items: center; gap: 7px; color: var(--ml-ink-2); }
.listing-list-footer .landlord small { color: var(--ml-muted); }
.listing-list-footer > a { margin-left: auto; color: var(--ml-ink); font-weight: 700; }
.listing-list-card > .save-button { top: 14px; right: 14px; }

@media (max-width: 1120px) {
  #listing-container.view-grid { grid-template-columns: 1fr; }
  .listing-list-main { grid-template-columns: 1fr; gap: 10px; }
  .listing-list-price { text-align: left; }
  .listing-list-card .listing-spec-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (max-width: 800px) {
  .market-grid { grid-template-columns: 1fr; }
  .toolbar-actions { width: 100%; justify-content: space-between; }
  .view-toggle span { display: none; }
  .view-toggle button { width: 32px; justify-content: center; padding: 0; }
  #listing-container.view-grid { grid-template-columns: 1fr; }
  .listing-grid-card .listing-media { height: 136px; }
  .listing-list-card { padding: 14px 48px 12px 14px; }
  .listing-list-card .listing-spec-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .listing-list-footer { flex-wrap: wrap; }
  .listing-list-footer > a { width: 100%; margin-left: 0; }
}

.listing-status{font-size:12.5px;font-weight:600;color:#475467;margin:0 0 6px}
