/* ==========================================================================
   Estate Sale Connect — Marketing page patterns
   Composed on top of design-system.css.
   ========================================================================== */

[hidden] { display: none !important; }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  padding-block: var(--sp-8) var(--sp-9);
  background:
    radial-gradient(125% 95% at 88% -10%, var(--accent-50) 0%, transparent 60%),
    radial-gradient(90% 70% at 5% 100%, var(--paper-sunk) 0%, transparent 55%),
    var(--paper);
  border-bottom: 1px solid var(--rule);
}
@media (min-width: 900px) { .hero { padding-block: var(--sp-10) var(--sp-11); } }

.hero__grid { display: grid; gap: var(--sp-8); align-items: start; }
@media (min-width: 1000px) {
  .hero__grid { grid-template-columns: 1fr 1fr; gap: var(--sp-9); align-items: center; }
}
@media (min-width: 1180px) {
  .hero__grid { grid-template-columns: 1.05fr .95fr; }
}

.hero__copy h1 { margin-bottom: var(--sp-5); }
.hero__copy .lede { margin-bottom: var(--sp-6); }

.hero__points { display: flex; flex-direction: column; gap: var(--sp-4); margin-bottom: var(--sp-6); }
.hero__points li { display: flex; gap: var(--sp-3); align-items: flex-start; font-size: var(--step--1); }
.hero__points svg { flex: none; margin-top: 3px; color: var(--sage-600); }
.hero__points strong { display: block; color: var(--ink); font-weight: 650; }
.hero__points span { color: var(--ink-mute); }

.hero__aside {
  display: flex; align-items: center; gap: var(--sp-4);
  padding-top: var(--sp-5); border-top: 1px solid var(--rule);
  font-size: var(--step--2); color: var(--ink-mute);
}

/* --------------------------------------------------------------------------
   Quote form (the hero's primary job)
   -------------------------------------------------------------------------- */
.quote {
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  padding: var(--sp-6);
  scroll-margin-top: calc(var(--header-h) + 1rem);
}
@media (min-width: 560px) { .quote { padding: var(--sp-7); } }

.quote__head { margin-bottom: var(--sp-6); }
.quote__head h2 { font-size: var(--step-2); margin-bottom: var(--sp-2); }
.quote__sub { font-size: var(--step--1); color: var(--ink-mute); }

.quote__progress { margin-top: var(--sp-5); }
.quote__dots {
  display: flex; gap: var(--sp-4);
  font-size: var(--step--2); font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: var(--sp-3);
}
.quote__dots li { display: flex; align-items: center; gap: .4rem; }
.quote__dots li[aria-current='step'] { color: var(--accent-700); }
.quote__dots li[data-done='true'] { color: var(--sage-600); }

.quote__bar { height: 3px; background: var(--paper-deep); border-radius: var(--r-full); overflow: hidden; }
.quote__bar span {
  display: block; height: 100%; width: 33.33%;
  background: var(--accent-600); border-radius: var(--r-full);
  transition: width .35s var(--ease-out);
}

.quote__step { border: 0; padding: 0; margin: 0; min-width: 0; }
.quote__step legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.quote__nav { display: flex; gap: var(--sp-3); margin-top: var(--sp-5); }
.quote__nav .btn--primary, .quote__nav .btn--dark { flex: 1; }

.quote__foot {
  display: flex; align-items: flex-start; gap: var(--sp-2);
  margin-top: var(--sp-5); padding-top: var(--sp-4);
  border-top: 1px solid var(--rule);
  font-size: var(--step--2); color: var(--ink-mute);
}
.quote__foot svg { flex: none; margin-top: 1px; color: var(--sage-600); }

/* Photo upload */
.photo-drop {
  display: flex; align-items: center; gap: var(--sp-3);
  width: 100%; padding: var(--sp-4);
  border: 1px dashed var(--rule-strong);
  border-radius: var(--r-md);
  background: var(--paper-sunk);
  text-align: left;
  transition: border-color .15s, background .15s;
}
.photo-drop:hover { border-color: var(--accent-600); background: var(--accent-50); }
.photo-drop svg { flex: none; color: var(--brand-600); }
.photo-drop b { display: block; font-size: var(--step--1); color: var(--ink); font-weight: 650; }
.photo-drop small { font-size: var(--step--2); color: var(--ink-mute); }

.photo-preview-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: var(--sp-2); margin-top: var(--sp-3);
}
.photo-preview-item { position: relative; aspect-ratio: 1; border-radius: var(--r-sm); overflow: hidden; border: 1px solid var(--rule); }
.photo-preview-item img { width: 100%; height: 100%; object-fit: cover; }
.photo-remove {
  position: absolute; top: 3px; right: 3px;
  width: 22px; height: 22px; border-radius: 50%;
  background: rgba(26,22,20,.78); color: #fff;
  font-size: 15px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
}
.photo-remove:hover { background: var(--err-600); }

/* --------------------------------------------------------------------------
   Trust bar
   -------------------------------------------------------------------------- */
.trustbar { border-bottom: 1px solid var(--rule); background: var(--paper-sunk); }
.trustbar ul {
  display: grid; gap: var(--sp-5);
  padding-block: var(--sp-6);
  grid-template-columns: 1fr;
}
@media (min-width: 700px) { .trustbar ul { grid-template-columns: repeat(3, 1fr); gap: var(--sp-7); } }
.trustbar li { display: flex; gap: var(--sp-3); align-items: flex-start; }
.trustbar svg { flex: none; margin-top: 2px; color: var(--accent-600); }
.trustbar b { display: block; color: var(--ink); font-size: var(--step--1); font-weight: 650; }
.trustbar span { font-size: var(--step--2); color: var(--ink-mute); line-height: 1.55; }

/* --------------------------------------------------------------------------
   Editorial steps
   -------------------------------------------------------------------------- */
.steps { display: grid; gap: var(--sp-7); counter-reset: step; }
@media (min-width: 860px) { .steps { grid-template-columns: repeat(3, 1fr); gap: var(--sp-8); } }
.steps li { padding-top: var(--sp-5); border-top: 2px solid var(--brand-100); }
.steps h3 { margin-bottom: var(--sp-3); }
.steps p { color: var(--ink-mute); font-size: var(--step--1); }

/* --------------------------------------------------------------------------
   Featurette (alternating text / panel)
   -------------------------------------------------------------------------- */
.featurette { display: grid; gap: var(--sp-7); align-items: center; }
@media (min-width: 900px) { .featurette { grid-template-columns: 1fr 1fr; gap: var(--sp-9); } }

.checklist { display: flex; flex-direction: column; gap: var(--sp-4); }
.checklist li { display: flex; gap: var(--sp-3); align-items: flex-start; font-size: var(--step-0); }
.checklist svg { flex: none; margin-top: 4px; color: var(--sage-600); }
.checklist strong { display: block; color: var(--ink); }
.checklist span { color: var(--ink-mute); font-size: var(--step--1); }

/* --------------------------------------------------------------------------
   Professional (dark) section
   -------------------------------------------------------------------------- */
.pro { background: var(--brand-900); color: rgba(255,255,255,.72); }
.pro h2, .pro h3 { color: #fff; }
.pro .eyebrow { color: var(--accent-500); }
.pro .eyebrow::after, .pro .eyebrow::before { background: rgba(255,255,255,.2); }
.pro__grid { display: grid; gap: var(--sp-8); align-items: start; }
@media (min-width: 960px) { .pro__grid { grid-template-columns: .95fr 1.05fr; gap: var(--sp-9); } }

.pro__features { display: grid; gap: var(--sp-5); }
@media (min-width: 620px) { .pro__features { grid-template-columns: 1fr 1fr; gap: var(--sp-6); } }
.pro__features li { display: flex; gap: var(--sp-4); align-items: flex-start; }
.pro .pro__features .icon-tile { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.14); color: var(--accent-400); }
/* Default to light-background colours; .pro re-colours them for the dark band,
   so the same markup is safe to reuse on an ordinary section. */
.pro__features strong { display: block; color: var(--ink); font-weight: 650; margin-bottom: .2rem; }
.pro__features span { font-size: var(--step--1); color: var(--ink-mute); line-height: 1.55; }
.pro .pro__features strong { color: #fff; }
.pro .pro__features span { color: rgba(255,255,255,.65); }

.pro__stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-4);
  margin-top: var(--sp-8); padding-top: var(--sp-6);
  border-top: 1px solid rgba(255,255,255,.14);
}
.pro__stats dt {
  font-family: var(--font-display); font-size: var(--step-3);
  color: #fff; font-weight: 600; line-height: 1;
  font-variation-settings: 'opsz' 72;
}
.pro__stats dd { margin: var(--sp-2) 0 0; font-size: var(--step--2); color: rgba(255,255,255,.55); line-height: 1.45; }

.pro__actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin-top: var(--sp-7); }
.pro__note { margin-top: var(--sp-4); font-size: var(--step--2); color: rgba(255,255,255,.5); }

/* --------------------------------------------------------------------------
   FAQ
   -------------------------------------------------------------------------- */
.faq { border-top: 1px solid var(--rule); max-width: 820px; }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary {
  display: flex; align-items: flex-start; justify-content: space-between; gap: var(--sp-5);
  padding: var(--sp-5) 0;
  cursor: pointer; list-style: none;
  font-family: var(--font-display);
  font-size: var(--step-1); font-weight: 600; color: var(--ink);
  line-height: 1.3;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--accent-700); }
.faq summary svg { flex: none; margin-top: 4px; color: var(--accent-600); transition: transform .22s var(--ease-out); }
.faq details[open] summary svg { transform: rotate(45deg); }
.faq__body { padding-bottom: var(--sp-5); color: var(--ink-mute); max-width: 68ch; }
.faq__body p + p { margin-top: var(--sp-4); }

/* --------------------------------------------------------------------------
   CTA band
   -------------------------------------------------------------------------- */
.cta-band {
  background: linear-gradient(180deg, var(--accent-50) 0%, var(--paper-sunk) 100%);
  border-block: 1px solid var(--accent-100);
  text-align: center;
}
.cta-band h2 { margin-bottom: var(--sp-4); }
.cta-band p { max-width: 52ch; margin: 0 auto var(--sp-6); color: var(--ink-mute); font-size: var(--step-1); }
.cta-band .actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); justify-content: center; }

/* --------------------------------------------------------------------------
   Interior page hero
   -------------------------------------------------------------------------- */
.page-hero {
  padding-block: var(--sp-8) var(--sp-7);
  border-bottom: 1px solid var(--rule);
  background: radial-gradient(105% 110% at 85% -20%, var(--accent-50) 0%, transparent 64%), var(--paper);
}
.page-hero h1 { margin-bottom: var(--sp-4); }
.page-hero .lede { margin-bottom: 0; }
.page-hero__meta { margin-top: var(--sp-5); font-size: var(--step--2); color: var(--ink-mute); display: flex; flex-wrap: wrap; gap: var(--sp-4); }

.breadcrumb { display: flex; flex-wrap: wrap; gap: .5rem; font-size: var(--step--2); color: var(--ink-faint); margin-bottom: var(--sp-5); }
.breadcrumb a { color: var(--ink-mute); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent-700); text-decoration: underline; text-underline-offset: 3px; }

/* --------------------------------------------------------------------------
   Blog index cards
   -------------------------------------------------------------------------- */
.post-grid { display: grid; gap: var(--sp-6); }
@media (min-width: 720px)  { .post-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1060px) { .post-grid { grid-template-columns: repeat(3, 1fr); } }

.post-card {
  display: flex; flex-direction: column;
  padding: var(--sp-6);
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  text-decoration: none;
  transition: border-color .18s, transform .18s var(--ease-out), box-shadow .18s;
}
.post-card:hover { border-color: var(--brand-500); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.post-card__kicker { font-size: var(--step--2); font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-700); margin-bottom: var(--sp-3); }
.post-card h3 { font-size: var(--step-2); margin-bottom: var(--sp-3); color: var(--ink); }
.post-card p { font-size: var(--step--1); color: var(--ink-mute); flex: 1; }
.post-card__foot { margin-top: var(--sp-5); font-size: var(--step--2); color: var(--ink-faint); display: flex; gap: var(--sp-3); }

/* --------------------------------------------------------------------------
   Auth pages
   -------------------------------------------------------------------------- */
.auth { min-height: calc(100vh - var(--header-h)); display: grid; }
@media (min-width: 960px) { .auth { grid-template-columns: 1fr 1fr; } }

.auth__aside {
  display: none;
  background: var(--brand-900); color: rgba(255,255,255,.7);
  padding: var(--sp-9) var(--sp-8);
  flex-direction: column; justify-content: center;
}
@media (min-width: 960px) { .auth__aside { display: flex; } }
.auth__aside h2 { color: #fff; font-size: var(--step-3); margin-bottom: var(--sp-5); }
.auth__aside .eyebrow { color: var(--accent-400); }
.auth__aside .eyebrow::after, .auth__aside .eyebrow::before { background: rgba(255,255,255,.2); }
.auth__aside .checklist svg { color: var(--accent-500); }
.auth__aside .checklist strong { color: #fff; }
.auth__aside .checklist span { color: rgba(255,255,255,.55); }

.auth__main { display: flex; align-items: center; justify-content: center; padding: var(--sp-8) var(--sp-5) var(--sp-9); }
.auth__form { width: 100%; max-width: 440px; }
.auth__form h1 { font-size: var(--step-4); margin-bottom: var(--sp-3); }
.auth__form > p { color: var(--ink-mute); margin-bottom: var(--sp-7); }
.auth__alt { margin-top: var(--sp-6); padding-top: var(--sp-5); border-top: 1px solid var(--rule); font-size: var(--step--1); color: var(--ink-mute); text-align: center; }

/* --------------------------------------------------------------------------
   Legal / policy callouts (kept on their original class names so the existing
   copy needs no rewriting)
   -------------------------------------------------------------------------- */
.contact-box, .special-note, .important-notice, .section-professional, .callout {
  margin-block: var(--sp-6);
  padding: var(--sp-5) var(--sp-6);
  border-radius: var(--r-lg);
  border: 1px solid var(--rule);
  background: var(--paper-sunk);
  font-size: var(--step-0);
}
.contact-box > *:first-child, .special-note > *:first-child,
.important-notice > *:first-child, .section-professional > *:first-child,
.callout > *:first-child { margin-top: 0; }
.contact-box h2, .contact-box h3,
.special-note h2, .special-note h3,
.important-notice h2, .important-notice h3,
.section-professional h2, .section-professional h3 {
  border-top: 0; padding-top: 0; margin-top: 0; font-size: var(--step-2);
}
.important-notice { background: var(--accent-50); border-color: var(--accent-100); }
.special-note { background: var(--sage-50); border-color: var(--sage-100); }
.contact-box { background: var(--brand-50); border-color: var(--brand-100); }

.data-table { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-block: var(--sp-6); }
.data-table table { min-width: 480px; }

.last-updated {
  font-size: var(--step--2);
  color: var(--ink-mute);
  letter-spacing: .04em;
  text-transform: uppercase;
  font-weight: 600;
}

/* Table of contents for long legal documents */
.toc {
  position: sticky; top: calc(var(--header-h) + var(--sp-5));
  font-size: var(--step--1);
}
.toc h2 {
  font-family: var(--font-sans); font-size: var(--step--2);
  letter-spacing: .12em; text-transform: uppercase; color: var(--ink-mute);
  border: 0; padding: 0; margin: 0 0 var(--sp-4);
}
.toc ol { display: flex; flex-direction: column; gap: var(--sp-2); counter-reset: toc; }
.toc a { color: var(--ink-mute); text-decoration: none; display: block; padding: .2rem 0; }
.toc a:hover { color: var(--accent-700); }

.doc-layout { display: grid; gap: var(--sp-8); }
/* Grid items default to min-width:auto, so a wide table inside .prose would
   otherwise force the whole column (and the page) wider than the viewport. */
.doc-layout > * { min-width: 0; }
@media (min-width: 1040px) {
  .doc-layout { grid-template-columns: 220px minmax(0, 1fr); gap: var(--sp-9); align-items: start; }
}

/* --------------------------------------------------------------------------
   Company directory
   -------------------------------------------------------------------------- */
.dir-search {
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  padding: var(--sp-5);
  box-shadow: var(--shadow-sm);
}
.dir-search__row { display: grid; gap: var(--sp-4); grid-template-columns: 1fr; align-items: end; }
@media (min-width: 760px) { .dir-search__row { grid-template-columns: 1.2fr 1fr auto; } }
/* The sales search carries one more control than the directory does. */
@media (min-width: 760px) { .dir-search__row--four { grid-template-columns: 1fr 1fr 1fr; } }
@media (min-width: 1060px) { .dir-search__row--four { grid-template-columns: 1fr .9fr 1.1fr auto; } }
.dir-search .field { margin-bottom: 0; }

.dir-layout { display: grid; gap: var(--sp-6); margin-top: var(--sp-7); }
.dir-layout > * { min-width: 0; }
@media (min-width: 1000px) { .dir-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; } }

.dir-results { display: flex; flex-direction: column; gap: var(--sp-4); }
.dir-count { font-size: var(--step--1); color: var(--ink-mute); }

.dir-card {
  display: block;
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  padding: var(--sp-5);
  text-decoration: none;
  transition: border-color .18s, box-shadow .18s, transform .18s var(--ease-out);
}
.dir-card:hover, .dir-card:focus-visible { border-color: var(--brand-500); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.dir-card[data-active='true'] { border-color: var(--accent-600); box-shadow: 0 0 0 3px var(--accent-100); }
.dir-card__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-4); }
.dir-card h3 { font-size: var(--step-1); color: var(--ink); margin: 0; }
.dir-card__dist { font-size: var(--step--2); color: var(--ink-mute); white-space: nowrap; }
.dir-card__where { font-size: var(--step--1); color: var(--ink-mute); margin-top: .2rem; }
.dir-card p { font-size: var(--step--1); color: var(--ink-body); margin-top: var(--sp-3); }
.dir-card__tags { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-4); }
.dir-card__contact { display: flex; flex-wrap: wrap; gap: var(--sp-4); margin-top: var(--sp-4); font-size: var(--step--1); }

#dirMap, #salesMap {
  height: 380px;
  border-radius: var(--r-lg);
  border: 1px solid var(--rule);
  background: var(--paper-sunk);
  z-index: 0;                     /* keep Leaflet panes under the site header */
}
@media (min-width: 1000px) {
  #dirMap, #salesMap {
    height: calc(100vh - var(--header-h) - 8rem);
    position: sticky; top: calc(var(--header-h) + var(--sp-5));
  }
}
.leaflet-container { font: inherit; border-radius: var(--r-lg); }
.dir-pin-label { font-weight: 650; color: var(--ink); }

.dir-empty {
  border: 1px dashed var(--rule-strong);
  border-radius: var(--r-lg);
  padding: var(--sp-7) var(--sp-6);
  text-align: center;
  background: var(--paper-sunk);
}
.dir-empty h3 { margin-bottom: var(--sp-3); }
.dir-empty p { color: var(--ink-mute); max-width: 46ch; margin: 0 auto var(--sp-5); }

/* --------------------------------------------------------------------------
   Estate sale listings — browse grid
   -------------------------------------------------------------------------- */
.sale-grid {
  display: grid;
  gap: var(--sp-5);
  grid-template-columns: 1fr;
}
@media (min-width: 620px) { .sale-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1080px) { .sale-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.sale-grid > * { min-width: 0; }

.sale-card {
  display: flex;
  flex-direction: column;
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: border-color .18s, box-shadow .18s, transform .18s var(--ease-out);
}
.sale-card:hover, .sale-card:focus-visible {
  border-color: var(--brand-500);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.sale-card[data-active='true'] { border-color: var(--accent-600); box-shadow: 0 0 0 3px var(--accent-100); }

/* Featured placement.
   A warmer ground and a marigold edge, not a bigger card: a featured sale sits
   in the same grid at the same size as everything around it. Anything louder
   reads as an advert and teaches people to skip that row. */
.sale-card--featured {
  border-color: var(--accent-500);
  background: var(--accent-50, var(--paper-raised));
}
.sale-card--featured:hover, .sale-card--featured:focus-visible { border-color: var(--accent-600); }
.sale-card__flag {
  position: absolute; left: var(--sp-3); top: var(--sp-3);
  background: var(--accent-500); color: var(--ink);
  font-size: var(--step--2); font-weight: 700;
  letter-spacing: .04em;
  padding: .2rem .55rem; border-radius: var(--r-full);
}
/* The empty-photo variant is a flex box that centres its text, so the flag
   needs taking out of that flow or it pushes the caption sideways. */
.sale-card__media--empty { position: relative; }

/* Section furniture used by the home page sales block. */
.section__lede { color: var(--ink-body); max-width: 58ch; margin-top: var(--sp-3); }
.section__more { margin-top: var(--sp-7); }

/* Directory cards get the same treatment, from the same tokens. */
.dir-card--featured {
  border-color: var(--accent-500);
  background: var(--accent-50, var(--paper-raised));
}
.dir-card__flag {
  display: inline-block; vertical-align: middle;
  background: var(--accent-500); color: var(--ink);
  font-size: var(--step--2); font-weight: 700; letter-spacing: .04em;
  padding: .12rem .5rem; border-radius: var(--r-full); margin-left: var(--sp-3);
}

.sale-card__media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--paper-sunk);
  border-bottom: 1px solid var(--rule);
  overflow: hidden;
}
.sale-card__media img { width: 100%; height: 100%; object-fit: cover; }
.sale-card__media--empty {
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-mute); font-size: var(--step--2);
  letter-spacing: .1em; text-transform: uppercase;
}
.sale-card__count {
  position: absolute; right: var(--sp-3); bottom: var(--sp-3);
  background: rgba(27, 51, 37, .88); color: #fff;
  font-size: var(--step--2); font-weight: 600;
  padding: .2rem .55rem; border-radius: var(--r-full);
}
.sale-card__body { padding: var(--sp-5); display: flex; flex-direction: column; gap: var(--sp-2); flex: 1; }
.sale-card h3 { font-size: var(--step-1); color: var(--ink); margin: 0; }
.sale-card__when { font-size: var(--step--1); color: var(--accent-800); font-weight: 650; }
.sale-card__where { font-size: var(--step--1); color: var(--ink-mute); }
.sale-card__summary { font-size: var(--step--1); color: var(--ink-body); margin-top: var(--sp-2); }
.sale-card__foot {
  margin-top: auto; padding-top: var(--sp-4);
  display: flex; justify-content: space-between; align-items: baseline; gap: var(--sp-3);
  font-size: var(--step--2); color: var(--ink-mute);
}

.sale-status {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: var(--step--2); font-weight: 650;
  letter-spacing: .06em; text-transform: uppercase;
}
.sale-status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.sale-status[data-state='live'] { color: var(--ok-700); }
.sale-status[data-state='soon'] { color: var(--accent-800); }
.sale-status[data-state='over'] { color: var(--ink-mute); }

/* --------------------------------------------------------------------------
   One sale — detail page and gallery
   -------------------------------------------------------------------------- */
.sale-layout { display: grid; gap: var(--sp-7); }
.sale-layout > * { min-width: 0; }
@media (min-width: 1000px) {
  .sale-layout { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: var(--sp-9); align-items: start; }
}

.sale-aside {
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  background: var(--paper-raised);
  padding: var(--sp-6);
  box-shadow: var(--shadow-sm);
}
@media (min-width: 1000px) { .sale-aside { position: sticky; top: calc(var(--header-h) + var(--sp-5)); } }
/* On a company profile at one column, the phone number is the point of the
   page, so it goes above the list of sales rather than below all of them.
   Not on a sale page, where the same aside sits behind the photo gallery. */
@media (max-width: 999px) {
  .sale-layout--profile { display: flex; flex-direction: column; }
  .sale-layout--profile > .sale-aside { order: -1; }
}
.sale-aside h2 { font-size: var(--step-1); margin-bottom: var(--sp-4); }
.sale-facts { display: flex; flex-direction: column; gap: var(--sp-4); margin-bottom: var(--sp-5); }
.sale-facts dt {
  font-size: var(--step--2); letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-mute); font-weight: 650;
}
.sale-facts dd { margin: .15rem 0 0; color: var(--ink); font-size: var(--step--1); }
.sale-aside__note { font-size: var(--step--2); color: var(--ink-mute); margin-top: var(--sp-4); }

.gallery {
  display: grid;
  gap: var(--sp-3);
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
}
@media (min-width: 700px) { .gallery { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); } }
.gallery button {
  padding: 0; border: 1px solid var(--rule); border-radius: var(--r-sm);
  overflow: hidden; aspect-ratio: 1; background: var(--paper-sunk);
  transition: border-color .15s, transform .15s var(--ease-out);
}
.gallery button:hover, .gallery button:focus-visible { border-color: var(--accent-600); transform: scale(1.02); }
.gallery img { width: 100%; height: 100%; object-fit: cover; }

.gallery-more { display: flex; justify-content: center; margin-top: var(--sp-5); }

/* Lightbox. A dialog element so Escape and focus trapping come for free. */
.lightbox {
  border: 0; padding: 0; max-width: 100vw; max-height: 100vh;
  width: 100%; height: 100%; background: rgba(20, 26, 22, .94);
}
.lightbox::backdrop { background: rgba(20, 26, 22, .9); }
.lightbox__stage {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%; padding: var(--sp-6);
}
.lightbox__stage img { max-width: 100%; max-height: 82vh; object-fit: contain; border-radius: var(--r-sm); }
.lightbox__bar {
  position: absolute; inset: auto 0 0 0;
  display: flex; align-items: center; justify-content: center; gap: var(--sp-5);
  padding: var(--sp-4); color: rgba(255,255,255,.8); font-size: var(--step--1);
}
.lightbox__bar button {
  color: #fff; border: 1px solid rgba(255,255,255,.3); border-radius: var(--r-full);
  width: 44px; height: 44px; display: grid; place-items: center; font-size: 1.25rem;
}
.lightbox__bar button:hover { background: rgba(255,255,255,.14); }
.lightbox__close {
  position: absolute; top: var(--sp-4); right: var(--sp-4);
  color: #fff; border: 1px solid rgba(255,255,255,.3); border-radius: var(--r-full);
  width: 44px; height: 44px; display: grid; place-items: center; font-size: 1.25rem;
}
.lightbox__caption { position: absolute; top: var(--sp-4); left: var(--sp-6); right: 76px; color: rgba(255,255,255,.75); font-size: var(--step--1); }

/* --------------------------------------------------------------------------
   Listing editor (signed-in companies)
   -------------------------------------------------------------------------- */
.listing-row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: var(--sp-4);
  align-items: start;
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  padding: var(--sp-4);
}
@media (min-width: 760px) {
  .listing-row { grid-template-columns: 140px minmax(0, 1fr) auto; gap: var(--sp-5); align-items: center; }
}
.listing-row + .listing-row { margin-top: var(--sp-4); }
.listing-row__media {
  aspect-ratio: 4 / 3; border-radius: var(--r-sm); overflow: hidden;
  background: var(--paper-sunk); border: 1px solid var(--rule);
  display: grid; place-items: center;
  font-size: var(--step--2); color: var(--ink-mute); text-align: center;
}
.listing-row__media img { width: 100%; height: 100%; object-fit: cover; }
.listing-row__body { min-width: 0; }
.listing-row__body h3 { font-size: var(--step-1); color: var(--ink); margin: var(--sp-2) 0 .2rem; }
.listing-row__body p { font-size: var(--step--1); color: var(--ink-mute); margin: 0; }
.listing-row__meta { font-size: var(--step--2) !important; margin-top: .3rem !important; }
.listing-row__actions {
  grid-column: 1 / -1; display: flex; gap: var(--sp-3); flex-wrap: wrap;
}
@media (min-width: 760px) { .listing-row__actions { grid-column: auto; flex-direction: column; } }

.badge--draft     { background: var(--paper-deep); color: var(--ink-body); border-color: var(--rule-strong); }
.badge--published { background: var(--ok-50); color: var(--ok-700); border-color: var(--ok-100); }
.badge--ended     { background: var(--paper-sunk); color: var(--ink-mute); border-color: var(--rule); }
.badge--featured  { background: var(--accent-500); color: var(--ink); border-color: var(--accent-600); }

.photo-drop[data-over='true'] { border-color: var(--accent-600); background: var(--accent-50); }

.photo-tile {
  position: relative; margin: 0;
  border: 1px solid var(--rule); border-radius: var(--r-sm);
  overflow: hidden; background: var(--paper-sunk); aspect-ratio: 1;
}
.photo-tile img { width: 100%; height: 100%; object-fit: cover; }
.photo-tile figcaption {
  position: absolute; inset: auto 0 0 0;
  display: flex; gap: 1px; opacity: 0; transition: opacity .15s;
}
.photo-tile:hover figcaption, .photo-tile:focus-within figcaption { opacity: 1; }
.photo-tile figcaption button {
  flex: 1; padding: .35rem; font-size: var(--step--2); font-weight: 600;
  background: rgba(27, 51, 37, .9); color: #fff;
}
.photo-tile figcaption button:hover { background: var(--accent-700); }
.photo-tile__pos {
  position: absolute; top: 4px; left: 4px;
  background: rgba(27, 51, 37, .82); color: #fff;
  font-size: var(--step--2); padding: 0 .4rem; border-radius: var(--r-full);
}

.upload-progress { margin-top: var(--sp-4); }
.upload-progress__bar {
  height: 6px; border-radius: var(--r-full);
  background: var(--paper-deep); overflow: hidden;
}
.upload-progress__bar span {
  display: block; height: 100%; background: var(--accent-500);
  transition: width .2s var(--ease-out);
}
.upload-progress p { font-size: var(--step--1); color: var(--ink-mute); margin-top: var(--sp-2); }

.editor-actions {
  display: flex; flex-wrap: wrap; gap: var(--sp-3);
  padding-top: var(--sp-6); margin-top: var(--sp-6); border-top: 1px solid var(--rule);
}
.editor-actions .btn-primary { width: auto; }

/* --------------------------------------------------------------------------
   Contact a company, and follow it
   -------------------------------------------------------------------------- */
.contact-panel {
  margin-top: var(--sp-8);
  padding: var(--sp-6);
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  background: var(--paper-raised);
  box-shadow: var(--shadow-sm);
}
.contact-panel h2 { font-size: var(--step-2); margin-bottom: var(--sp-2); }
.contact-panel > p { color: var(--ink-mute); font-size: var(--step--1); margin-bottom: var(--sp-5); }
.contact-panel .actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin-top: var(--sp-4); }

.subscribe {
  position: relative;
  margin-top: var(--sp-5);
  padding-top: var(--sp-5);
  border-top: 1px solid var(--rule);
}
.subscribe__row { display: flex; gap: var(--sp-2); margin-top: var(--sp-2); }
.subscribe__row input {
  flex: 1; min-width: 0;
  padding: .7rem .8rem; min-height: 44px;
  background: var(--paper-raised);
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-md);
  color: var(--ink);
}
.subscribe__row input:focus-visible {
  outline: none; border-color: var(--accent-600); box-shadow: 0 0 0 3px var(--accent-100);
}
.subscribe__row .btn { flex: none; }

.lightbox__ask {
  width: auto !important; padding: 0 1rem; border-radius: var(--r-full);
  font-size: var(--step--1); font-weight: 600;
  background: var(--accent-500); color: var(--brand-900); border: 0;
}
.lightbox__ask:hover { background: var(--accent-400); }

/* --------------------------------------------------------------------------
   Message threads, both inboxes
   -------------------------------------------------------------------------- */
.inbox { display: grid; gap: var(--sp-5); }
.inbox > * { min-width: 0; }
@media (min-width: 900px) { .inbox { grid-template-columns: minmax(0, 320px) minmax(0, 1fr); align-items: start; } }

.thread-list { display: flex; flex-direction: column; gap: var(--sp-2); }
.thread-item {
  width: 100%; text-align: left;
  padding: var(--sp-4);
  border: 1px solid var(--rule); border-radius: var(--r-md);
  background: var(--paper-raised);
  transition: border-color .15s, background .15s;
}
.thread-item:hover { border-color: var(--brand-500); }
.thread-item[data-active='true'] { border-color: var(--accent-600); background: var(--accent-50); }
.thread-item strong { display: block; color: var(--ink); font-size: var(--step--1); }
.thread-item span { display: block; font-size: var(--step--2); color: var(--ink-mute); margin-top: .2rem; }
.thread-item .badge { margin-top: var(--sp-2); }

.thread-view {
  border: 1px solid var(--rule); border-radius: var(--r-lg);
  background: var(--paper-raised); padding: var(--sp-5);
  min-height: 320px;
}
.thread-view h2 { font-size: var(--step-1); margin-bottom: var(--sp-4); }

.bubble {
  max-width: 46ch; padding: var(--sp-4);
  border-radius: var(--r-lg); margin-bottom: var(--sp-3);
  font-size: var(--step--1); line-height: 1.6;
}
.bubble time { display: block; font-size: var(--step--2); opacity: .7; margin-top: var(--sp-2); }
.bubble[data-mine='false'] { background: var(--paper-sunk); border: 1px solid var(--rule); color: var(--ink-body); }
.bubble[data-mine='true'] { background: var(--brand-700); color: #fff; margin-left: auto; }
.bubble[data-mine='true'] a { color: var(--accent-400); }

.reply-box { margin-top: var(--sp-5); padding-top: var(--sp-5); border-top: 1px solid var(--rule); }
.reply-box textarea { width: 100%; min-height: 96px; }

/* --------------------------------------------------------------------------
   Company profile — the public page, and its editor
   -------------------------------------------------------------------------- */
.profile-head { display: flex; gap: var(--sp-5); align-items: center; flex-wrap: wrap; }
.profile-head__logo {
  width: 120px; height: 120px; flex: none;
  border-radius: var(--r-lg); object-fit: contain;
  background: var(--paper-raised); border: 1px solid var(--rule); padding: var(--sp-2);
}
.profile-head__logo--placeholder {
  display: grid; place-items: center;
  font-family: var(--font-display); font-size: 3rem; font-weight: 600;
  color: var(--brand-600); background: var(--brand-50); border-color: var(--brand-100);
  padding: 0;
}
.profile-head h1 { margin: var(--sp-2) 0; }
.profile-head .dir-card__tags { margin-top: var(--sp-3); }

.logo-row { display: flex; gap: var(--sp-5); align-items: center; flex-wrap: wrap; margin-bottom: var(--sp-5); }
.logo-preview {
  width: 96px; height: 96px; flex: none;
  border: 1px solid var(--rule); border-radius: var(--r-lg);
  background: var(--paper-sunk); display: grid; place-items: center; overflow: hidden;
}
.logo-preview img { width: 100%; height: 100%; object-fit: contain; }
.logo-preview span {
  font-family: var(--font-display); font-size: 2.4rem; font-weight: 600; color: var(--brand-600);
}
.logo-row .btn-secondary { width: auto; margin-right: var(--sp-2); }
.dir-card__more { margin-top: var(--sp-4); font-size: var(--step--2); color: var(--accent-800); font-weight: 600; }
a.dir-card { color: inherit; }
a.dir-card h3 { color: var(--ink); }


/* Sale alerts on the browse page. Four controls on one line at desktop, stacked
   on a phone, because a ZIP and a radius next to each other is the whole point. */
.alert-form__row {
  display: grid; gap: var(--sp-4); align-items: end;
  grid-template-columns: 1fr;
}
@media (min-width: 760px) {
  .alert-form__row { grid-template-columns: 2fr 1fr 1fr auto; }
}
.alert-form .form-note { margin-top: var(--sp-4); font-size: var(--step--1); color: var(--ink-mute); min-height: 1.4em; }
.alert-form .form-note[data-state='error'] { color: var(--err-700); }
.alert-form .form-note[data-state='ok']    { color: var(--ok-700); font-weight: 600; }
