/* bluebird — the "Field Guide" identity: cream paper, ink borders, serif
   display, letter-spaced sans labels, dotted rules, bordered stamp badges. */
:root {
  /* Field-guide palette */
  --paper: #F6F2E9;      /* page ground */
  --plate: #FFFDF6;      /* card / surface ground */
  --ink: #26241C;        /* text, borders, dark panels */
  --bluebird: #3A6EA5;   /* links, primary accents, tier badges */
  --moss: #6B7F59;       /* secondary accent: success-ish, save-heart, flat-rate */
  --rule: #D8D2C0;       /* light rules */
  --dotted: #A79F86;     /* dotted separators */
  --muted-ink: #6d6753;  /* smallest text still legible on paper */
  --ink-hover: #3a372c;  /* lifted ink for button hover */
  --panel-sub: #B5AD94;  /* sub-lines on dark ink panels */
  --err-ink: #8C3A2B;
  --err-bg: #F3E2DC;
  --err-border: #D9A99B;
  --amber-ink: #91600C;
  --amber-bg: #F4ECD8;
  --amber-border: #D9C79B;

  /* Legacy aliases kept so any residual reference resolves to the new system. */
  --blue: #3A6EA5;
  --blue-dark: #2C557F;
  --ground: #F6F2E9;
  --muted: #6d6753;
  --card-radius: 3px;
  --serif: Georgia, "Times New Roman", serif;
  --shadow: none;
  --shadow-hover: none;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  line-height: 1.55;
}
img { max-width: 100%; display: block; }
a { color: var(--bluebird); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; color: var(--ink); }
h1 { font-size: 1.6rem; margin: 0.4em 0; letter-spacing: 0.01em; }
h2 { font-size: 1.2rem; margin: 0.8em 0 0.4em; }
h3 { font-size: 1.05rem; }
.muted { color: var(--muted-ink); font-weight: 400; }
code {
  background: #EFEAD9;
  border: 1px solid var(--rule);
  padding: 0.08em 0.35em;
  border-radius: 3px;
  font-size: 0.92em;
}

/* Universal visible focus — a 2px bluebird outline everywhere. */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible,
textarea:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--bluebird);
  outline-offset: 2px;
}

/* Header */
.dev-banner {
  background: #B45309;
  color: #fff;
  text-align: center;
  padding: 8px 14px;
  font-weight: 600;
  font-size: 0.9rem;
  border-bottom: 1.5px solid var(--ink);
}
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  background: var(--paper);
  border-bottom: 3px double var(--ink);
  position: sticky;
  top: 0;
  z-index: 50;
}
.wordmark {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--ink);
}
.wordmark svg { align-self: center; }
.wordmark:hover { text-decoration: none; }
.wordmark-name { text-transform: capitalize; }
.wordmark-tag {
  font-size: 0.92rem;
  font-style: italic;
  font-weight: 400;
  color: var(--muted-ink);
}
@media (max-width: 700px) { .wordmark-tag { display: none; } }
.site-nav { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
/* Plain nav links get the label look; the Sign-in .btn keeps its button skin. */
.site-nav a:not(.btn) {
  color: var(--ink);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}
.site-nav a:not(.btn):hover { color: var(--bluebird); }
.site-nav a.muted { color: var(--muted-ink); }

.flash {
  background: var(--plate);
  border: 1.5px solid var(--ink);
  color: var(--ink);
  margin: 14px auto;
  max-width: 1080px;
  padding: 10px 16px;
  border-radius: var(--card-radius);
}
.notice {
  background: var(--amber-bg);
  border: 1px solid var(--amber-border);
  border-radius: var(--card-radius);
  padding: 12px 16px;
  margin: 12px 0;
}
.notice-error { background: var(--err-bg); border-color: var(--err-border); color: var(--err-ink); }
.notice ul { margin: 0; padding-left: 20px; }

main { max-width: 1080px; margin: 0 auto; padding: 12px 18px 48px; }

/* Buttons */
.btn {
  display: inline-block;
  background: var(--ink);
  color: var(--paper);
  border: 1.5px solid var(--ink);
  border-radius: 2px;
  padding: 10px 18px;
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
}
.btn:hover { background: var(--ink-hover); border-color: var(--ink-hover); text-decoration: none; color: var(--paper); }
.btn:disabled { background: var(--muted-ink); border-color: var(--muted-ink); cursor: not-allowed; }
.btn-big { padding: 13px 26px; font-size: 1.05rem; }
.btn-small { padding: 6px 12px; font-size: 0.85rem; }
.btn-secondary {
  background: var(--plate);
  color: var(--ink);
  border: 1.5px solid var(--ink);
  font-family: inherit;
  font-weight: 600;
}
.btn-secondary:hover { background: var(--paper); color: var(--ink); }
.btn-danger { background: var(--err-ink); border-color: var(--err-ink); color: var(--paper); }
.btn-danger:hover { background: #742f22; border-color: #742f22; color: var(--paper); }
.btn-google {
  background: var(--plate);
  color: var(--ink);
  border: 1.5px solid var(--ink);
  font-family: inherit;
  font-weight: 600;
}
.btn-google:hover { background: var(--paper); }
.btn-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
form.inline { display: inline; }

/* Feed */
.feed-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 10px 0 4px;
}
.feed-tagline { font-family: var(--serif); font-size: 1.05rem; font-weight: 700; margin: 0; }
.metro-picker { display: flex; align-items: center; gap: 8px; }
.metro-picker select {
  padding: 8px 12px;
  border-radius: 2px;
  border: 1px solid var(--ink);
  background: var(--plate);
  color: var(--ink);
  font-size: 0.95rem;
}
.metro-heading { margin: 26px 0 12px; font-size: 1.3rem; }
.card-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
}
@media (min-width: 560px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .card-grid { grid-template-columns: repeat(3, 1fr); } }

/* Card — a naturalist's plate: cream surface, ink border, photo cut by an ink
   rule, a species-label stamp top-left. Per founder feedback the plate rests
   slightly OFF the page (a printed plate lying on paper): a crisp offset
   shadow at rest, rising a touch on hover as the shadow deepens. */
.card {
  position: relative;
  background: var(--plate);
  border: 1.5px solid var(--ink);
  border-radius: var(--card-radius);
  overflow: hidden;
  box-shadow: 3px 4px 0 rgba(38, 36, 28, 0.13);
  transition: box-shadow 0.16s ease, transform 0.16s ease;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 5px 9px 0 rgba(38, 36, 28, 0.17);
}
@media (prefers-reduced-motion: reduce) {
  .card, .card:hover { transform: none; transition: none; }
}
.card-link { color: inherit; display: block; }
.card-link:hover { text-decoration: none; }
.slideshow {
  position: relative;
  aspect-ratio: 3 / 2;
  background: var(--paper);
  border-bottom: 1.5px solid var(--ink);
}
.slide {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0; transition: opacity 0.25s ease;
}
.slide.active { opacity: 1; }
.no-photo {
  display: flex; align-items: center; justify-content: center;
  color: var(--muted-ink);
  font-size: 0.74rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
}
/* Fee stamp — the "flat rate" pricing fact, stamped on the photo's bottom-left
   corner (opposite the species label): filled moss, paper text, pops on any
   photo. Frees the card body for the host's perk chips. */
.fee-stamp {
  position: absolute; bottom: 10px; left: 8px; z-index: 2;
  background: var(--moss);
  border: 1px solid var(--ink);
  color: var(--plate);
  font-size: 0.64rem; font-weight: 700;
  letter-spacing: 0.09em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 2px;
  white-space: nowrap;
}
/* Fees-apply variant: same spot, same size — warm amber instead of moss, so
   the pricing fact is equally loud either way (founder: fees must pop). */
.fee-stamp-fees { background: #A2680E; }

/* Plate stamp — bordered chip over the photo, paper ground, label style. */
.plate-stamp {
  position: absolute; top: 8px; left: 8px; z-index: 2;
  background: var(--paper);
  border: 1px solid var(--ink);
  color: var(--ink);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 2px;
  white-space: nowrap;
}
/* Recognition badge (Phase 10) — an outlined stamp in the stamp family (paper
   ground, inked border), so a published-criteria badge reads like a field-guide
   stamp, not a mystery award. Inline by default; pinned top-right on a card
   photo (opposite the species plate at top-left). */
.badge-stamp {
  display: inline-block;
  background: var(--paper);
  border: 1px solid var(--ink);
  color: var(--ink);
  font-size: 0.62rem; font-weight: 700;
  letter-spacing: 0.09em; text-transform: uppercase;
  padding: 2px 7px; border-radius: 2px; white-space: nowrap;
}
.slideshow .badge-stamp { position: absolute; top: 8px; right: 8px; z-index: 2; }
/* Top tier gets the warm-amber ink so a "Rare find" pops. */
.badge-rare_find { border-color: #A2680E; color: #A2680E; }
/* Mid-term market stamp (Phase 11) — a bordered chip in the stamp family, pinned
   just under the species plate (top-left) so "Monthly/Weekly stays" reads at a
   glance without crowding the fee stamp (bottom-left) or the badge (top-right). */
.slideshow .stay-stamp {
  position: absolute; top: 34px; left: 8px; z-index: 2;
  background: var(--paper);
  border: 1px solid var(--ink);
  color: var(--ink);
  font-size: 0.6rem; font-weight: 700;
  letter-spacing: 0.09em; text-transform: uppercase;
  padding: 2px 7px; border-radius: 2px; white-space: nowrap;
}
/* Estimated-total breakdown (Phase 11) — one plain line per rate block / fee, so
   a monthly or weekly total always shows its own arithmetic (no surprise math). */
.est-total-head { margin: 0 0 2px; font-weight: 600; }
.est-breakdown { margin: 4px 0; padding-left: 18px; list-style: disc; }
.est-breakdown li { font-size: 0.86rem; }
.card-habitat {
  margin: -2px 0 6px; color: var(--muted-ink);
  font-size: 0.8rem; font-weight: 600;
}
.listing-habitat { margin: 4px 0 0; color: var(--muted-ink); font-weight: 600; }
.listing-badge-row { margin: 6px 0 0; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.badge-criteria { font-size: 0.72rem; }
.host-aggregate {
  margin: 4px 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.slide-arrow {
  position: absolute; top: 50%;
  transform: translateY(-50%);
  width: 32px; height: 32px;
  border-radius: 2px;
  border: 1px solid var(--ink);
  background: var(--plate);
  color: var(--ink);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s ease;
  z-index: 2;
}
.slideshow:hover .slide-arrow { opacity: 1; }
.slide-arrow.prev { left: 10px; }
.slide-arrow.next { right: 10px; }
.slide-dots {
  position: absolute; bottom: 10px; left: 0; right: 0;
  display: flex; justify-content: center; gap: 6px;
  z-index: 2;
}
.dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: rgba(246, 242, 233, 0.55);
  border: 1px solid rgba(38, 36, 28, 0.35);
}
.dot.active { background: var(--paper); border-color: var(--ink); }
.card-body { padding: 12px 14px 14px; }
.card-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.card-name { margin: 0; font-family: var(--serif); font-size: 1.08rem; font-weight: 700; }
.badge-new {
  background: transparent;
  color: var(--moss);
  border: 1px solid var(--moss);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 2px;
  white-space: nowrap;
}
.card-city {
  margin: 4px 0 6px;
  color: var(--muted-ink);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}
.card-price { margin: 0; font-family: var(--serif); font-weight: 700; font-size: 1.08rem; }
.feed-sentinel { text-align: center; padding: 26px 0; }
.empty-state {
  text-align: center;
  padding: 44px 24px;
  background: var(--paper);
  border: 1px solid var(--ink);
  border-radius: var(--card-radius);
}

/* Search */
.search-form {
  background: var(--plate);
  border: 1.5px solid var(--ink);
  border-radius: var(--card-radius);
  padding: 16px 18px;
  margin-bottom: 22px;
}
.search-row { display: flex; gap: 14px; flex-wrap: wrap; }
.search-row label { display: flex; flex-direction: column; gap: 4px; font-size: 0.9rem; font-weight: 600; }
.search-row input, .search-row select {
  padding: 8px 10px;
  border: 1px solid var(--ink);
  border-radius: 2px;
  background: var(--plate);
  color: var(--ink);
  font-size: 0.95rem;
  width: 130px;
}
.amenity-checks { border: none; padding: 0; margin: 14px 0; display: flex; flex-wrap: wrap; gap: 8px; }
.amenity-checks legend { font-family: var(--serif); font-weight: 700; margin-bottom: 6px; }
.chip-check { display: inline-flex; cursor: pointer; }
.chip-check input { position: absolute; opacity: 0; }
.chip-check span {
  padding: 6px 12px;
  border-radius: 2px;
  border: 1px solid var(--ink);
  background: var(--plate);
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.chip-check input:checked + span {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}
.results-heading { margin-top: 10px; }
.search-notice { margin: 0 0 14px; padding: 10px 14px; border-radius: 2px;
  font-size: 0.92rem; }
.relaxed-notice { background: var(--amber-bg); color: var(--amber-ink); border: 1px solid var(--amber-border); }

/* Listing page */
.gallery {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, 1fr);
  margin: 14px 0 18px;
}
.gallery img { border: 1px solid var(--ink); border-radius: var(--card-radius); aspect-ratio: 3 / 2; object-fit: cover; width: 100%; }
.gallery .gallery-main { grid-column: 1 / -1; aspect-ratio: 2 / 1; }
@media (min-width: 760px) {
  .gallery { grid-template-columns: repeat(3, 1fr); }
  .gallery .gallery-main { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; height: 100%; }
}
.listing-header { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.price-box {
  background: var(--plate);
  border: 1.5px solid var(--ink);
  border-radius: var(--card-radius);
  padding: 12px 18px;
  white-space: nowrap;
}
.price { font-family: var(--serif); font-size: 1.5rem; font-weight: 700; }
.specs { font-weight: 500; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.chip {
  background: var(--plate);
  color: var(--ink);
  border: 1px solid var(--ink);
  padding: 5px 12px;
  border-radius: 2px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.chip-style { background: var(--plate); color: var(--moss); border-color: var(--moss); }
.listing-section { margin: 26px 0; }
.prose p { margin: 0.5em 0; }
.prose ul { margin: 0.5em 0; padding-left: 22px; }
.host-card {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: var(--plate);
  border: 1.5px solid var(--ink);
  border-radius: var(--card-radius);
  padding: 18px;
}
.avatar { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; background: var(--rule); }

/* Forms */
.stack-form { display: flex; flex-direction: column; gap: 14px; max-width: 720px; }
.stack-form label { display: flex; flex-direction: column; gap: 5px; font-weight: 600; font-size: 0.95rem; }
.stack-form input[type="text"], .stack-form input[type="number"],
.stack-form input[type="email"], .stack-form input[type="file"],
.stack-form select, .stack-form textarea {
  padding: 10px 12px;
  border: 1px solid var(--ink);
  border-radius: 2px;
  font-size: 1rem;
  font-family: inherit;
  background: var(--plate);
  color: var(--ink);
}
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.four-col { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
@media (min-width: 640px) { .four-col { grid-template-columns: repeat(4, 1fr); } }
.two-col label, .four-col label { display: flex; flex-direction: column; gap: 5px; font-weight: 600; font-size: 0.95rem; }
.two-col input, .four-col input { padding: 10px 12px; border: 1px solid var(--ink); border-radius: 2px; font-size: 1rem; background: var(--plate); color: var(--ink); }
.steps { line-height: 2; }
.address-edit summary { cursor: pointer; font-weight: 600; }
.address-edit label { margin-top: 10px; }

/* Photo manager */
.photo-grid { display: flex; flex-wrap: wrap; gap: 14px; }
.photo-tile { width: 168px; }
.photo-tile img { border: 1px solid var(--ink); border-radius: 2px; aspect-ratio: 3 / 2; object-fit: cover; }
.photo-actions { display: flex; gap: 6px; margin-top: 6px; }
.photo-actions button {
  border: 1px solid var(--ink);
  background: var(--plate);
  color: var(--ink);
  border-radius: 2px;
  padding: 4px 8px;
  cursor: pointer;
  font-size: 0.82rem;
}
.photo-actions button.is-cover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.photo-actions button:disabled { opacity: 0.4; cursor: not-allowed; }

/* Tables */
.table { width: 100%; border-collapse: collapse; background: var(--plate); border: 1.5px solid var(--ink); border-radius: var(--card-radius); overflow: hidden; }
.table th, .table td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--rule); vertical-align: middle; }
.table th { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; font-weight: 700; color: var(--muted-ink); }
.table tr:last-child td { border-bottom: none; }
.actions { white-space: nowrap; }
.actions form { margin-left: 4px; }
/* Status stamps — bordered, uppercase, label style. */
.status { font-size: 0.66rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; padding: 3px 10px; border-radius: 2px; border: 1px solid; }
.status-published, .status-active { background: transparent; color: var(--moss); border-color: var(--moss); }
.status-draft { background: transparent; color: var(--muted-ink); border-color: var(--rule); }
.status-unpublished, .status-suspended { background: transparent; color: var(--amber-ink); border-color: var(--amber-border); }
.status-banned { background: transparent; color: var(--err-ink); border-color: var(--err-border); }

/* Bulk-import queue (Phase 8) */
.status-import-pending, .status-import-processing { background: transparent; color: var(--amber-ink); border-color: var(--amber-border); }
.status-import-drafted, .status-import-manual { background: transparent; color: var(--moss); border-color: var(--moss); }
.status-import-failed { background: transparent; color: var(--err-ink); border-color: var(--err-border); }
.import-block { border: 1px solid var(--ink); border-radius: var(--card-radius); padding: 10px 14px; background: var(--plate); }
.import-block > summary { font-weight: 700; cursor: pointer; padding: 4px 0; }
.import-queue-list { list-style: none; padding: 0; margin: 18px 0; display: flex; flex-direction: column; gap: 10px; }
.import-item { display: flex; gap: 12px; align-items: center; background: var(--plate); border: 1px solid var(--ink); border-radius: var(--card-radius); padding: 10px 14px; }
.import-item-main { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.import-item-label { font-weight: 600; }
.import-item-meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.import-item-error { font-size: 0.85rem; color: var(--err-ink); }
.import-queue-note { margin-top: 8px; }
.ai-choice { border: 1px solid var(--ink); border-radius: var(--card-radius); padding: 12px 16px; background: var(--plate); }
.ai-choice > legend { font-family: var(--serif); font-weight: 700; padding: 0 6px; }
.radio-row { display: flex; gap: 8px; align-items: baseline; font-weight: 500; }

/* Auth */
.auth-wrap { max-width: 460px; margin: 30px auto; }
.dev-login-box {
  margin-top: 24px;
  background: var(--plate);
  border: 1px dashed #C9A24B;
  border-radius: var(--card-radius);
  padding: 18px;
}
.dev-login-box form { display: flex; flex-direction: column; gap: 12px; }
.dev-login-box label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; }
.dev-login-box input[type="email"], .dev-login-box input[type="text"] {
  padding: 10px 12px; border: 1px solid var(--ink); border-radius: 2px; font-size: 1rem; background: var(--plate); color: var(--ink);
}
.dev-login-box .chip-check { align-self: flex-start; }

.site-footer {
  text-align: center;
  color: var(--muted-ink);
  padding: 26px 16px 40px;
  font-size: 0.88rem;
  border-top: 3px double var(--ink);
  margin-top: 30px;
}

/* ===== Phase 2 ===== */

/* Header pending-requests badge */
.nav-badge {
  display: inline-block;
  background: var(--bluebird);
  color: var(--paper);
  font-size: 0.72rem;
  font-weight: 700;
  min-width: 18px;
  text-align: center;
  padding: 1px 6px;
  border-radius: 2px;
  letter-spacing: 0;
}

/* Feed date chip */
.date-chip {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  background: var(--plate);
  border: 1.5px solid var(--ink);
  border-radius: var(--card-radius);
  padding: 12px 16px;
  margin: 4px 0 14px;
}
.date-chip label { display: flex; flex-direction: column; gap: 4px; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted-ink); }
.date-chip input, .date-chip select {
  padding: 8px 10px; border: 1px solid var(--ink); border-radius: 2px;
  font-size: 0.95rem; font-family: inherit; background: var(--plate); color: var(--ink);
}
.feed-hint { margin: 2px 0 14px; }

/* Calendar */
.cal-legend { display: flex; flex-wrap: wrap; gap: 16px; margin: 8px 0 16px; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted-ink); }
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; }
.swatch { width: 14px; height: 14px; border-radius: 2px; display: inline-block; border: 1px solid var(--ink); }
.sw-open { background: var(--plate); }
.sw-manual { background: var(--paper); border-style: dotted; border-color: var(--dotted); }
.sw-synced { background: #E4EADB; }
.sw-booked { background: #DCE6F0; }

.cal-months { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .cal-months { grid-template-columns: repeat(3, 1fr); } }
.cal-month { background: var(--plate); border: 1.5px solid var(--ink); border-radius: var(--card-radius); padding: 12px; }
.cal-month h3 { margin: 4px 0 8px; font-size: 1rem; text-align: center; }
.cal-weekdays, .cal-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.cal-weekdays { color: var(--muted-ink); font-size: 0.66rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; text-align: center; margin-bottom: 4px; }
.cal-week { margin-bottom: 3px; }
.cal-cell {
  aspect-ratio: 1 / 1;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.82rem;
  border-radius: 2px;
  border: 1px solid transparent;
  padding: 0; margin: 0;
  background: var(--plate);
  color: var(--ink);
}
.cal-blank { background: transparent; }
.cal-past { color: var(--dotted); background: var(--paper); }
button.cal-cell { cursor: pointer; font-family: inherit; }
.cal-open { border-color: var(--rule); }
.cal-open:hover { border-color: var(--bluebird); background: #DCE6F0; }
.cal-manual { background: var(--paper); border: 1px dotted var(--dotted); font-weight: 600; }
.cal-manual:hover { background: #EFE9D8; }
.cal-synced { background: #E4EADB; color: #45542F; font-weight: 600; }
.cal-booked { background: #DCE6F0; color: #2C557F; font-weight: 700; }

.cal-blocks { margin-top: 22px; }
.block-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.block-list li {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: var(--plate); border: 1px solid var(--ink); border-radius: var(--card-radius); padding: 8px 14px;
}
.block-badge { font-size: 0.66rem; font-weight: 700; letter-spacing: 0.08em; padding: 2px 9px; border-radius: 2px; text-transform: uppercase; border: 1px solid; }
.block-manual { background: transparent; color: var(--muted-ink); border-color: var(--dotted); }
.block-synced { background: transparent; color: #45542F; border-color: var(--moss); }
.block-booked { background: transparent; color: #2C557F; border-color: var(--bluebird); }
.block-dates { font-weight: 600; font-size: 0.9rem; }
.block-note { font-size: 0.85rem; }
.block-managed { margin-left: auto; font-size: 0.8rem; font-style: italic; }

.cal-range { margin: 26px 0; background: var(--plate); border: 1.5px solid var(--ink); border-radius: var(--card-radius); padding: 16px 18px; }
.cal-range h3 { margin: 0 0 10px; }
.cal-range-row { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-end; }
.cal-range-row label { display: flex; flex-direction: column; gap: 4px; font-size: 0.85rem; font-weight: 600; }
.cal-range-row input { padding: 9px 11px; border: 1px solid var(--ink); border-radius: 2px; font-size: 0.95rem; font-family: inherit; background: var(--plate); color: var(--ink); }

.cal-feeds { margin-top: 26px; background: var(--plate); border: 1.5px solid var(--ink); border-radius: var(--card-radius); padding: 16px 18px; }
.cal-feeds h3 { margin: 0 0 6px; }
.feed-list { list-style: none; padding: 0; margin: 12px 0; display: flex; flex-direction: column; gap: 10px; }
.feed-list li { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: center; border: 1px solid var(--rule); border-radius: 2px; padding: 10px 12px; }
.feed-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.feed-url { font-size: 0.8rem; word-break: break-all; }
.feed-status { font-size: 0.82rem; color: var(--moss); }
.feed-status.is-error { color: var(--err-ink); }
.feed-actions { display: flex; gap: 8px; align-items: center; }
.feed-add { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.feed-add input[type="url"] { flex: 1 1 320px; padding: 9px 11px; border: 1px solid var(--ink); border-radius: 2px; font-size: 0.9rem; font-family: inherit; background: var(--plate); color: var(--ink); }
.feed-add input[type="text"] { width: 150px; padding: 9px 11px; border: 1px solid var(--ink); border-radius: 2px; font-size: 0.9rem; font-family: inherit; background: var(--plate); color: var(--ink); }

/* ============================================================================
   Search UX polish (Phase 9.5): price dual-slider + date-range picker +
   collapsed events toggle. All hand-rolled, all matching the Field Guide tokens.
   ========================================================================== */

/* -- Price dual-slider ------------------------------------------------------- */
/* The price min/max take a full row so the slider sits beneath them. */
.price-range { flex: 1 1 100%; display: flex; flex-direction: column; gap: 10px; }
.price-nums { display: flex; gap: 14px; }
.price-nums label { display: flex; flex-direction: column; gap: 4px; font-size: 0.9rem; font-weight: 600; }
.price-num { width: 130px; }

.price-slider { position: relative; height: 26px; margin: 2px 8px 4px; }
.price-track {
  position: absolute; left: 0; right: 0; top: 11px; height: 4px;
  background: var(--paper); border: 1px solid var(--ink); border-radius: 3px;
}
.price-fill {
  position: absolute; top: 0; bottom: 0; background: var(--ink); border-radius: 3px;
}
/* Two overlapping range inputs: the track is transparent to the pointer, only the
   thumbs grab, so both handles stay usable. Handle = plate with an ink border. */
/* Scoped under .price-slider to OUTRANK the generic `.search-row input` rule
   (plate bg + border + 130px width), which was winning the specificity war and
   rendering the two range inputs as a small white box — founder-reported. */
.price-slider .price-range-min, .price-slider .price-range-max {
  position: absolute; left: 0; right: 0; top: 0;
  width: 100%; height: 26px; margin: 0; padding: 0;
  border: none; border-radius: 0;
  -webkit-appearance: none; appearance: none;
  background: transparent; pointer-events: none;
}
.price-range-min { z-index: 3; }
.price-range-max { z-index: 4; }
.price-range::-webkit-slider-runnable-track { background: transparent; border: none; height: 26px; }
.price-range::-moz-range-track { background: transparent; border: none; height: 26px; }
.price-range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; pointer-events: auto; cursor: grab;
  width: 18px; height: 18px; margin-top: 4px; border-radius: 50%;
  background: var(--plate); border: 2px solid var(--ink);
}
.price-range::-webkit-slider-thumb:active { cursor: grabbing; }
.price-range::-moz-range-thumb {
  pointer-events: auto; cursor: grab;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--plate); border: 2px solid var(--ink);
}
.price-range:focus-visible::-webkit-slider-thumb { outline: 2px solid var(--bluebird); outline-offset: 2px; }
.price-range:focus-visible::-moz-range-thumb { outline: 2px solid var(--bluebird); outline-offset: 2px; }

/* -- Date-range picker ------------------------------------------------------- */
.daterange { position: relative; display: flex; gap: 14px; flex-wrap: wrap; }
.daterange-native { display: flex; flex-direction: column; gap: 4px; font-size: 0.9rem; font-weight: 600; }
/* Progressive enhancement: the native date fields hide only once JS builds the
   picker. Without JS the .dp-enhanced class is never added, so they stay. */
.dp-enhanced .daterange-native { display: none; }

.dp-trigger {
  padding: 8px 12px; border: 1px solid var(--ink); border-radius: 2px;
  background: var(--plate); color: var(--muted-ink);
  font-family: inherit; font-size: 0.95rem; font-weight: 600; cursor: pointer;
  min-width: 190px; text-align: left;
}
.dp-trigger.dp-has-value { color: var(--ink); }
.dp-trigger:hover { border-color: var(--bluebird); }

.dp-panel {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 60;
  background: var(--paper); border: 1.5px solid var(--ink); border-radius: var(--card-radius);
  padding: 14px 16px 12px; box-shadow: 3px 3px 0 rgba(38, 36, 28, 0.12);
}
/* Arrows overlay the month-title row at the panel's corners; titles are centered
   in each month, so they never collide with the edge-anchored arrows. */
.dp-head {
  position: absolute; top: 14px; left: 16px; right: 16px;
  display: flex; justify-content: space-between; pointer-events: none;
}
.dp-arrow {
  pointer-events: auto;
  width: 28px; height: 28px; line-height: 1; font-size: 1.2rem;
  background: var(--plate); color: var(--ink); border: 1px solid var(--ink); border-radius: 2px;
  cursor: pointer; font-family: var(--serif);
}
.dp-arrow:hover { background: var(--paper); border-color: var(--bluebird); }
.dp-arrow:disabled { color: var(--dotted); border-color: var(--rule); cursor: not-allowed; }

/* ONE month at a time (founder call) — the two-month grid pancaked inside the
   narrow feed chip (min-width vs minmax(0,1fr) squeeze). */
.dp-months { display: block; }
.dp-month { width: 238px; max-width: 100%; }
.dp-month-title { font-family: var(--serif); font-weight: 700; font-size: 1rem; text-align: center; margin: 0 0 8px; }
.dp-weekdays, .dp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.dp-weekdays {
  color: var(--muted-ink); font-size: 0.62rem; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; text-align: center; margin-bottom: 4px;
}
.dp-cell {
  aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; border-radius: 2px; border: 1px solid transparent;
  padding: 0; margin: 0; background: transparent; color: var(--ink);
}
.dp-blank { background: transparent; }
.dp-past { color: var(--dotted); }
button.dp-day { cursor: pointer; font-family: inherit; background: var(--plate); border-color: var(--rule); }
button.dp-day:hover { border-color: var(--bluebird); background: #DCE6F0; }
.dp-in-range { background: #E4EADB; border-color: transparent; }
.dp-start, .dp-end { background: var(--ink) !important; color: var(--paper) !important; border-color: var(--ink) !important; font-weight: 700; }
.dp-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; }
.dp-clear { background: none; border: none; color: var(--muted-ink); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; cursor: pointer; padding: 4px 2px; }
.dp-clear:hover { color: var(--ink); text-decoration: underline; }
.dp-done {
  background: var(--ink); color: var(--paper); border: 1.5px solid var(--ink); border-radius: 2px;
  font-family: var(--serif); font-weight: 700; font-size: 0.85rem; padding: 6px 14px; cursor: pointer;
}
.dp-done:hover { background: var(--ink-hover); }

/* (Single-month everywhere now — the old narrow-screen second-month hide rule
   is gone with the two-month layout.) */

/* -- Collapsed events toggle ------------------------------------------------- */
.events-field { display: flex; flex-direction: column; gap: 4px; }
.field-caption { font-size: 0.9rem; font-weight: 600; }
.events-check { align-self: flex-start; }

/* -- Host edit inline hint --------------------------------------------------- */
.field-hint { font-size: 0.8rem; font-weight: 400; }

/* Booking fields on the edit page */
.booking-fields { border: 1px solid var(--ink); border-radius: var(--card-radius); padding: 14px 16px; margin: 4px 0; display: flex; flex-direction: column; gap: 14px; background: var(--plate); }
.booking-fields legend { font-family: var(--serif); font-weight: 700; padding: 0 6px; }
.booking-fields label { display: flex; flex-direction: column; gap: 5px; font-weight: 600; font-size: 0.95rem; }
.booking-fields input, .booking-fields select, .booking-fields textarea {
  padding: 10px 12px; border: 1px solid var(--ink); border-radius: 2px; font-size: 1rem; font-family: inherit; background: var(--plate); color: var(--ink);
}

/* Request to Stay form (listing page) */
.host-card-body { flex: 1; }
.request-form { margin-top: 14px; display: flex; flex-direction: column; gap: 12px; max-width: 560px; }
.request-form h3 { margin: 0; }
.req-dates { display: flex; gap: 12px; flex-wrap: wrap; }
.req-dates label { display: flex; flex-direction: column; gap: 4px; font-size: 0.85rem; font-weight: 600; }
.req-dates input { padding: 9px 11px; border: 1px solid var(--ink); border-radius: 2px; font-size: 0.95rem; font-family: inherit; background: var(--plate); color: var(--ink); }
.request-form label { font-weight: 600; font-size: 0.9rem; display: flex; flex-direction: column; gap: 5px; }
.request-form textarea { padding: 10px 12px; border: 1px solid var(--ink); border-radius: 2px; font-size: 1rem; font-family: inherit; background: var(--plate); color: var(--ink); }
.agreement-block { border: 1.5px solid var(--ink); background: var(--plate); border-radius: var(--card-radius); padding: 12px 14px; }
.agreement-block h4 { margin: 0 0 8px; }
.agreement-text { max-height: 180px; overflow-y: auto; white-space: pre-wrap; background: var(--paper); border: 1px solid var(--rule); border-radius: 2px; padding: 10px 12px; font-size: 0.9rem; line-height: 1.5; }
.agreement-ack { margin-top: 10px; }

/* Trips */
.trip-list, .req-list { display: flex; flex-direction: column; gap: 16px; margin-top: 16px; }
.trip-card, .req-card { background: var(--plate); border: 1.5px solid var(--ink); border-radius: var(--card-radius); padding: 16px 18px; }
.trip-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.trip-head h2 { margin: 0; font-size: 1.15rem; }
.handoff-card { margin-top: 12px; background: #E7EDDD; border: 1px solid var(--moss); border-radius: var(--card-radius); padding: 12px 14px; }
.handoff-card h3 { margin: 0 0 6px; }
.handoff-contact { font-weight: 600; margin: 4px 0; }
.trip-message { margin-top: 10px; }
.trip-message summary { cursor: pointer; font-weight: 700; font-size: 0.74rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted-ink); }
.handoff-pref { font-style: italic; margin: 4px 0 0; }
.host-public-email { margin: 6px 0 0; font-size: 0.9rem; }

/* ===== Phase 15: request conversations (chat thread) ===== */
.msg-thread { margin-top: 12px; border-top: 1px dotted var(--dotted); padding-top: 10px; }
.msg-thread-summary { cursor: pointer; list-style: none; display: flex; align-items: baseline; gap: 8px; }
.msg-thread-summary::-webkit-details-marker { display: none; }
.msg-thread-label { font-weight: 700; font-size: 0.74rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted-ink); }
.msg-thread-summary::before { content: "▸"; color: var(--dotted); font-size: 0.8rem; }
.msg-thread[open] .msg-thread-summary::before { content: "▾"; }
.msg-count { display: inline-flex; align-items: center; justify-content: center; min-width: 1.35em; height: 1.35em; padding: 0 0.35em; border: 1px solid var(--ink); border-radius: 999px; background: var(--ink); color: var(--paper); font-size: 0.72rem; font-weight: 700; }
.msg-thread-with { font-style: italic; }
.msg-list { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.msg-bubble { max-width: 82%; padding: 8px 12px; border-radius: 3px; border: 1px solid var(--rule); }
/* Sender-differentiated plates: guest on plate ground, host on paper with an
   ink border accent. "mine" (whoever is viewing) aligns to the right. */
.msg-guest { background: var(--plate); border-color: var(--rule); align-self: flex-start; }
.msg-host { background: var(--paper); border-color: var(--ink); align-self: flex-start; }
.msg-bubble.mine { align-self: flex-end; }
.msg-body { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg-meta { margin: 4px 0 0; font-size: 0.72rem; letter-spacing: 0.04em; color: var(--muted-ink); }
.msg-empty { margin: 6px 0; }
.msg-error { margin: 6px 0; }
.msg-locked { margin: 6px 0 0; font-style: italic; }
.msg-form { display: flex; gap: 8px; align-items: flex-end; margin-top: 8px; }
.msg-form textarea { flex: 1; padding: 8px 10px; border: 1px solid var(--ink); border-radius: 2px; font-family: inherit; font-size: 0.9rem; background: var(--plate); color: var(--ink); resize: vertical; }
.msg-foot { margin: 6px 0 0; }
.inline-check { margin-top: 6px; }
@media (max-width: 560px) {
  .msg-bubble { max-width: 100%; }
  .msg-form { flex-direction: column; align-items: stretch; }
}

/* Status chips (requests) */
.status-req-pending { background: transparent; color: var(--amber-ink); border-color: var(--amber-border); }
.status-req-accepted { background: transparent; color: var(--moss); border-color: var(--moss); }
.status-req-declined { background: transparent; color: var(--muted-ink); border-color: var(--rule); }
.status-req-cancelled { background: transparent; color: var(--muted-ink); border-color: var(--rule); }

/* Host request inbox */
.tabs { display: flex; gap: 8px; margin: 14px 0 4px; border-bottom: 1px solid var(--rule); }
.tab { padding: 8px 14px; color: var(--muted-ink); font-size: 0.74rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; border-bottom: 2px solid transparent; }
.tab:hover { text-decoration: none; color: var(--ink); }
.tab.active { color: var(--bluebird); border-bottom-color: var(--bluebird); }
.vetting-card { display: flex; gap: 14px; align-items: flex-start; }
.vetting-body { flex: 1; }
.vetting-body h3 { margin: 0 0 2px; }
.vetting-meta { margin: 2px 0; font-size: 0.88rem; color: var(--muted-ink); }
.vetting-stats { margin: 4px 0; font-size: 0.92rem; }
.vetting-ph { font-size: 0.82rem; font-style: italic; }
.verify-badge { color: var(--moss); font-weight: 600; }
.req-detail { margin: 12px 0; border-top: 1px dotted var(--dotted); padding-top: 12px; }
.req-listing { font-weight: 600; margin: 0 0 4px; }
.req-message { margin: 10px 0 0; padding: 8px 12px; border-left: 3px solid var(--rule); color: var(--ink); background: var(--paper); border-radius: 0 2px 2px 0; }
.req-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.decline-form { display: inline-flex; gap: 6px; align-items: center; }
.decline-form select { padding: 6px 10px; border: 1px solid var(--ink); border-radius: 2px; font-size: 0.85rem; font-family: inherit; background: var(--plate); color: var(--ink); }
.req-footnote { margin-top: 18px; font-size: 0.85rem; }

/* ===== Phase 3 ===== */

/* Smart bar (NL search) */
.smart-bar { display: flex; gap: 10px; margin: 4px 0 14px; }
.smart-input {
  flex: 1; padding: 12px 16px; border: 1.5px solid var(--ink); border-radius: 2px;
  font-size: 1rem; font-family: inherit; background: var(--plate); color: var(--ink);
}
.smart-input:focus { outline: 2px solid var(--bluebird); outline-offset: 2px; border-color: var(--ink); }

/* Interpretation chips (removable) */
.interp-chips { align-items: center; margin: 2px 0 16px; }
.interp-label { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted-ink); margin-right: 2px; }
.chip-removable { display: inline-flex; align-items: center; gap: 6px; background: var(--plate); color: var(--ink); border: 1px solid var(--ink); }
.chip-removable:hover { background: var(--paper); text-decoration: none; }
.chip-x { font-weight: 700; opacity: 0.7; }
.search-advanced { margin: 4px 0 10px; }
.search-advanced > summary { cursor: pointer; font-size: 0.74rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted-ink); margin-bottom: 8px; }

/* Save heart */
.heart {
  cursor: pointer; background: var(--plate); border: 1px solid var(--ink);
  border-radius: 999px; width: 38px; height: 38px; line-height: 1;
  font-size: 1.2rem; color: var(--muted-ink); display: inline-flex; align-items: center;
  justify-content: center; padding: 0; transition: transform 0.08s ease;
}
.heart:hover { transform: scale(1.1); }
.heart.is-saved { color: var(--moss); background: var(--plate); }
.card-heart { position: absolute; top: 10px; right: 10px; z-index: 3; }
.listing-save { margin-top: 8px; }
.listing-save .heart { width: 44px; height: 44px; font-size: 1.4rem; }

/* Card + listing rating */
.card-rating { font-size: 0.82rem; font-weight: 700; color: #8A5A12; white-space: nowrap; }

/* Reviews */
.reviews-section { }
.review-list { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-direction: column; gap: 18px; }
.review { border-top: 1px dotted var(--dotted); padding-top: 14px; }
.review-head { display: flex; gap: 12px; align-items: flex-start; }
.review-meta { flex: 1; }
.avatar-sm { width: 40px; height: 40px; }
.review-who { font-weight: 700; margin: 0; }
.review-stars { margin: 2px 0; color: #B4801F; letter-spacing: 1px; }
.review-date { color: var(--muted-ink); font-size: 0.85rem; letter-spacing: normal; }
.tier-badge { display: inline-block; font-size: 0.64rem; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; padding: 2px 9px; border-radius: 2px; margin: 2px 0; border: 1px solid; background: transparent; }
.tier-baseline { color: var(--bluebird); border-color: var(--bluebird); }
.tier-verified { color: var(--moss); border-color: var(--moss); }
.review-text { margin: 8px 0 0; white-space: pre-wrap; }
.host-reply { margin: 10px 0 0 12px; padding: 10px 14px; background: var(--paper); border-left: 3px solid var(--rule); border-radius: 0 2px 2px 0; }
.host-reply-label { font-weight: 700; font-size: 0.85rem; margin: 0 0 4px; }
.reply-form, .report-form { margin-top: 10px; }
.reply-form textarea { width: 100%; padding: 8px 10px; border: 1px solid var(--ink); border-radius: 2px; font-family: inherit; font-size: 0.95rem; background: var(--plate); color: var(--ink); }
.btn-link-danger { background: none; border: none; color: var(--err-ink); cursor: pointer; font-size: 0.82rem; padding: 4px 0; font-family: inherit; }
.btn-link-danger:hover { text-decoration: underline; }

/* Similar / More-in-metro rails */
.rail-section h2 { margin-bottom: 10px; }
.rail-grid { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }

/* Trips + host: confirmation, check-in, review forms */
.stay-status, .checkin-block, .confirm-block { margin-top: 12px; padding: 12px 14px; background: var(--paper); border: 1px solid var(--rule); border-radius: var(--card-radius); }
.confirm-block p, .checkin-block p { margin: 0 0 8px; }
.small { font-size: 0.8rem; }
.checkin-msg { margin-left: 10px; font-size: 0.88rem; }
.review-form { margin-top: 12px; display: flex; flex-direction: column; gap: 10px; max-width: 520px; }
.review-form h4 { margin: 0; }
.review-form label { font-weight: 600; font-size: 0.9rem; display: flex; flex-direction: column; gap: 4px; max-width: 160px; }
.review-form select, .review-form textarea { padding: 9px 11px; border: 1px solid var(--ink); border-radius: 2px; font-family: inherit; font-size: 0.95rem; background: var(--plate); color: var(--ink); }
.tag-checks { border: 1px solid var(--ink); border-radius: var(--card-radius); padding: 10px 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.tag-checks legend { font-family: var(--serif); font-weight: 700; padding: 0 6px; font-size: 0.9rem; }
.your-review { margin-top: 8px; }
.chip-tag { background: var(--plate); color: var(--ink); border-color: var(--ink); }

/* Vetting card rating */
.vetting-rating { margin: 4px 0; font-size: 0.92rem; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.confirm-nudge { margin: 12px 0; }

/* My listings save count */
.saves-count { white-space: nowrap; color: var(--moss); font-weight: 600; }

/* ============================ Phase 4 ================================== */

/* Card perk chips — the host's inclusions. Deliberately a DIFFERENT voice from
   the outlined pricing/status stamps: filled warm-ochre chips, so "what the
   host offers" never reads like "what the pricing is" (founder feedback). */
.card-perk { margin: 6px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.perk-hint { display: inline-block; font-size: 0.66rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: #4d3f14; background: #EFE4C4; border: 1px solid #C9B98A;
  padding: 3px 10px; border-radius: 2px; }

/* Cross-links under the smart bar */
.browse-links { font-size: 0.9rem; margin: 6px 0 14px; }
.browse-links a { margin: 0 2px; }

/* Topic chips (answer pages) */
.chip-topic { background: var(--plate); color: var(--bluebird); border-color: var(--bluebird); }
.chip-topic:hover { background: var(--paper); text-decoration: none; }

/* "From your host" perk cards on the listing page */
.perks-section .perk-grid { display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.perk-card { display: flex; gap: 12px; padding: 14px; border: 1px solid var(--ink);
  border-radius: var(--card-radius); background: var(--plate); }
.perk-icon { color: var(--bluebird); flex: 0 0 auto; }
.perk-icon svg { width: 30px; height: 30px; }
.perk-icon-sm svg { width: 22px; height: 22px; }
.perk-body { flex: 1; }
.perk-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.perk-title { margin: 0; font-size: 1.02rem; }
.perk-cat { margin: 2px 0; font-size: 0.85rem; }
.perk-desc { margin: 6px 0 0; }
.perk-note { margin-top: 12px; font-style: italic; }
.perk-badge { font-size: 0.64rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; padding: 2px 9px;
  border-radius: 2px; white-space: nowrap; border: 1px solid; background: transparent; }
.perk-how-included { color: var(--moss); border-color: var(--moss); }
.perk-how-addon { color: var(--amber-ink); border-color: var(--amber-border); }
.perk-how-recommendation { color: var(--bluebird); border-color: var(--bluebird); }

/* Perks manager on the edit page */
.perks-manager { margin-top: 30px; padding-top: 20px; border-top: 3px double var(--ink); }
.perk-manage-list { list-style: none; padding: 0; margin: 0 0 16px; display: flex;
  flex-direction: column; gap: 8px; }
.perk-manage-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border: 1px solid var(--ink); border-radius: var(--card-radius); background: var(--plate); }
.perk-manage-main { flex: 1; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.perk-manage-desc { flex-basis: 100%; font-size: 0.86rem; }
.perk-add-form { display: flex; flex-direction: column; gap: 10px; padding: 14px;
  background: var(--paper); border: 1px solid var(--ink); border-radius: var(--card-radius); }

/* Admin 7-day stat strip */
.stat-strip { display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  margin: 6px 0 22px; }
.stat-strip-label { font-weight: 700; color: var(--muted-ink); font-size: 0.72rem; letter-spacing: 0.09em; text-transform: uppercase; }
.stat-pill { background: var(--plate); border: 1px solid var(--ink); border-radius: 2px;
  padding: 4px 11px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink); }
.flag-dismissed { opacity: 0.55; }

/* Analytics dashboard */
.beta-badge { background: transparent; color: var(--moss); border: 1px solid var(--moss); font-weight: 700;
  font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; padding: 5px 12px; border-radius: 2px; }
.panel { border: 1.5px solid var(--ink); border-radius: var(--card-radius);
  background: var(--plate); padding: 18px 20px; margin: 16px 0; }
.panel h2 { margin-top: 0; font-size: 1.15rem; }
.funnel-tiles { display: flex; flex-wrap: wrap; gap: 12px; margin: 10px 0; }
.funnel-tile { flex: 1 1 90px; text-align: center; background: var(--paper);
  border: 1px solid var(--ink); border-radius: var(--card-radius); padding: 12px 8px; }
.funnel-num { display: block; font-family: var(--serif); font-size: 1.7rem; font-weight: 700; color: var(--ink); }
.funnel-lbl { display: block; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted-ink); margin-top: 2px; }
.funnel-combined { margin-bottom: 18px; }
.sparkline { display: flex; align-items: center; gap: 10px; margin-top: 6px;
  font-size: 0.82rem; }
.nm-list, .vibe-list, .answer-links { list-style: none; padding: 0; margin: 8px 0;
  display: flex; flex-direction: column; gap: 5px; }
.nm-list .nm-lever { font-weight: 600; }
.nm-callout { margin-top: 10px; background: var(--amber-bg); border: 1px solid var(--amber-border);
  border-radius: var(--card-radius); padding: 9px 12px; }
.vibe-mark { display: inline-block; width: 1.2em; font-weight: 800; }
.vibe-mark.ok { color: var(--moss); }
.vibe-mark.no { color: var(--err-ink); }
.coach-panel .coach-body { white-space: pre-wrap; line-height: 1.55; margin-top: 6px; }
.coach-date { font-size: 0.82rem; }

/* Answer pages */
.answers-wrap { max-width: 1040px; margin: 0 auto; padding: 8px 4px 40px; }
.answer-page .breadcrumbs { font-size: 0.85rem; }
.answer-intro { margin: 8px 0 20px; font-size: 1.05rem; }
.answers-metro { margin: 18px 0; }
.answer-faq { margin-top: 30px; }
.faq-item { margin: 12px 0; }
.faq-q { margin: 0 0 4px; font-size: 1.02rem; }
.faq-a { margin: 0; color: var(--ink); }
.answer-links-section { margin-top: 26px; }

/* ============================ Phase 5 ================================== */

/* Cover thumbnails on host surfaces */
.cover-thumb { border-radius: 2px; object-fit: cover; background: var(--rule);
  border: 1px solid var(--ink); flex: 0 0 auto; }
.cover-thumb-ph { display: inline-block; border: 1px dashed var(--ink); background: var(--paper); }
.cover-24 { width: 24px; height: 24px; border-radius: 2px; }
.cover-48 { width: 48px; height: 48px; }
.listing-cell { display: flex; align-items: center; gap: 12px; }
.listing-cell h1 { margin: 0; }

/* AI-visibility hero panel — a dark ink panel, serif italic heading. */
.panel-hero { background: var(--ink); border: 1.5px solid var(--ink); color: var(--paper); }
.panel-hero h2 { color: var(--paper); font-style: italic; }
.panel-hero .muted, .panel-hero .hero-kicker { color: var(--panel-sub); }
.panel-hero a { color: #9DBCE0; }
.hero-kicker { margin: 2px 0 10px; font-size: 0.95rem; }
.hero-tiles .funnel-num { font-size: 2.1rem; color: var(--paper); }
.hero-tiles .funnel-tile { background: rgba(246, 242, 233, 0.06); border: 1px solid #4a4636; }
.hero-tiles .funnel-lbl { color: var(--panel-sub); }
.panel-hero .chip { background: rgba(246, 242, 233, 0.08); border: 1px solid #4a4636; color: var(--paper); }

/* Metric explainer intro card */
.intro-card p { margin: 0; }

/* Attention donuts */
.donut-grid { display: grid; gap: 18px; grid-template-columns: 1fr; margin-top: 8px; }
@media (min-width: 560px) { .donut-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .donut-grid { grid-template-columns: repeat(4, 1fr); } }
.donut-card { border: 1px solid var(--ink); border-radius: var(--card-radius); padding: 14px;
  background: var(--plate); text-align: center; }
.donut-title { margin: 0; font-size: 1.02rem; }
/* Small text can't afford a pale grey — keep it dark warm on bright screens. */
.donut-sub { margin: 2px 0 8px; font-size: 0.8rem; color: #4a4636; }
.donut { display: block; margin: 0 auto 10px; }
.donut-legend { list-style: none; padding: 0; margin: 6px 0 0; display: flex;
  flex-direction: column; gap: 5px; text-align: left; }
.donut-leg-row { display: flex; align-items: center; gap: 6px; font-size: 0.82rem; }
.donut-leg-row.is-zero { opacity: 0.65; }
.leg-swatch { width: 11px; height: 11px; border-radius: 2px; flex: 0 0 auto; }
.leg-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.leg-count { font-weight: 700; }
/* Percent labels are tiny — keep them dark enough to survive bright screens. */
.leg-pct { font-size: 0.76rem; min-width: 30px; text-align: right; color: #4a4636; }
.donut-empty { font-size: 0.82rem; }

/* Flat-rate badge + fees on cards / listing page */
.flat-rate-badge { display: inline-block; font-size: 0.66rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--moss); background: transparent; border: 1px solid var(--moss); padding: 2px 10px; border-radius: 2px;
  white-space: nowrap; }
.card-fees { margin: 4px 0 0; font-size: 0.85rem; color: var(--muted-ink); }

/* Listing "Price & fees" section */
.price-fees .fee-table { width: 100%; max-width: 460px; border-collapse: collapse;
  margin: 8px 0 12px; }
.price-fees .fee-table th, .price-fees .fee-table td {
  text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--rule); }
.price-fees .fee-table th[scope="row"] { font-weight: 600; }
.price-fees .fee-per { color: var(--muted-ink); font-size: 0.85rem; }
.price-fees .fee-amt { text-align: right; font-weight: 600; white-space: nowrap; }
.fee-example { margin: 6px 0; font-size: 1.02rem; }
.fee-note { margin: 6px 0 0; font-size: 0.88rem; }
.est-total { margin: 10px 0 0; font-size: 0.9rem; }

/* Fees manager on the edit page */
.fees-manager { margin-top: 30px; padding-top: 20px; border-top: 3px double var(--ink); }
.fee-manage-list { list-style: none; padding: 0; margin: 0 0 16px; display: flex;
  flex-direction: column; gap: 8px; }
.fee-manage-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border: 1px solid var(--ink); border-radius: var(--card-radius); background: var(--plate); }
.fee-manage-main { flex: 1; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.fee-amount { margin-left: auto; font-weight: 700; }
.fee-add-form { display: flex; flex-direction: column; gap: 10px; padding: 14px;
  background: var(--paper); border: 1px solid var(--ink); border-radius: var(--card-radius); }
.fee-add-form input, .fee-add-form select {
  padding: 10px 12px; border: 1px solid var(--ink); border-radius: 2px;
  font-size: 1rem; font-family: inherit; background: var(--plate); color: var(--ink); }
.fee-add-form label { display: flex; flex-direction: column; gap: 5px;
  font-weight: 600; font-size: 0.95rem; }

/* Phase 6: "Good to know" capability block on the listing page */
.good-to-know .gtk-list { list-style: none; padding: 0; margin: 8px 0 0;
  display: flex; flex-direction: column; gap: 8px; }
.good-to-know .gtk-list li { display: flex; gap: 12px; flex-wrap: wrap;
  align-items: baseline; padding: 8px 0; border-bottom: 1px dotted var(--dotted); }
.good-to-know .gtk-list li:last-child { border-bottom: none; }
.good-to-know .gtk-key { flex: 0 0 130px; font-weight: 600; color: var(--muted-ink); }
.good-to-know .gtk-val { flex: 1; min-width: 200px; }

/* Phase 6: capabilities fieldset on the edit page (matches booking-fields) */
.capability-fields { margin-top: 4px; }

/* --- Phase 7: host presence & outbound links ------------------------------- */
/* URL inputs share the padded look of the other stack-form fields. */
.stack-form input[type="url"] {
  padding: 10px 12px; border: 1px solid var(--ink); border-radius: 2px;
  font-size: 1rem; font-family: inherit; background: var(--plate); color: var(--ink);
}
.two-col input[type="url"] { padding: 10px 12px; border: 1px solid var(--ink);
  border-radius: 2px; font-size: 1rem; background: var(--plate); color: var(--ink); }
.online-fields { margin-top: 4px; }

/* Onboarding migration nudge on /host/new */
.callout { background: var(--plate); border: 1.5px solid var(--ink); color: var(--ink);
  border-radius: var(--card-radius); padding: 12px 14px; font-size: 0.95rem; }
.callout strong { color: var(--bluebird); }

/* Outbound-link icon rows (listing "This property online", host card, profile) */
.link-row { list-style: none; display: flex; flex-wrap: wrap; gap: 10px;
  padding: 0; margin: 8px 0 0; }
.out-link { display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 11px; border: 1px solid var(--ink); border-radius: 2px;
  background: var(--plate); color: var(--ink); font-size: 0.9rem; font-weight: 600; }
.out-link:hover { text-decoration: none; border-color: var(--bluebird);
  color: var(--bluebird); background: var(--paper); }
.out-link-icon { display: inline-flex; color: var(--bluebird); }
.link-row-compact .out-link { padding: 6px; border-radius: 50%; }
.property-online .link-row { margin-bottom: 6px; }
.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; }

/* Host card: the profile link + compact host links */
.host-profile-link { color: var(--ink); }
.host-profile-link:hover { color: var(--bluebird); }
.host-links { margin-top: 8px; }

/* Public host profile page */
.host-public { max-width: 1040px; margin: 0 auto; padding: 8px 0 32px; }
.host-public-head { display: flex; gap: 18px; align-items: flex-start;
  background: var(--plate); border: 1.5px solid var(--ink); border-radius: var(--card-radius);
  padding: 20px; }
.avatar-lg { width: 84px; height: 84px; font-size: 2rem; }
.avatar-initial { display: inline-flex; align-items: center; justify-content: center;
  background: var(--bluebird); color: var(--paper); font-weight: 700; font-family: var(--serif); text-transform: uppercase; }
.host-public-meta { flex: 1; }
.host-public-meta h1 { margin: 0 0 2px; }
.host-since { margin: 0 0 8px; }
.host-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px;
  border-radius: 2px; background: transparent; color: var(--muted-ink); border: 1px solid var(--rule);
  font-size: 0.68rem; letter-spacing: 0.07em; text-transform: uppercase;
  font-weight: 700; }
.badge-verified { color: var(--moss); border-color: var(--moss); }
.host-public-bio { max-width: 760px; margin: 18px 2px; color: var(--ink); }
.host-public-listings-title { margin: 22px 0 12px; }
.host-public-note { margin-top: 20px; }

/* Admin listings table: outbound-link indicator */
.link-flag { margin-left: 6px; cursor: help; }

/* ============================ Phase 9.6 ================================== */
/* Browse (/best) — the discovery page. Eyebrow-labelled rails of plates
   (Trending, Highly rated, New to the guide), then the metro Collections.
   Field-guide throughout: serif titles, letter-spaced sans eyebrows, ink
   rules, a double rule to set the Collections apart (like the header/footer). */
.browse-head { margin: 6px 0 24px; }
.browse-head h1 { margin: 2px 0 6px; }
.browse-lead { margin: 0; max-width: 62ch; font-size: 1.02rem; }

/* Eyebrow — the label-style kicker over each serif title. */
.eyebrow {
  margin: 0;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-ink);
}

.browse-rail { margin: 30px 0; }
.browse-rail:first-of-type { margin-top: 20px; }
.rail-head {
  margin: 0 0 16px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--rule);
}
.rail-title { margin: 3px 0 0; font-size: 1.35rem; }
.rail-lead { margin: 4px 0 0; max-width: 62ch; font-size: 0.92rem; }

/* Browse view toggle — label-style tab chips (one active view at a time). The
   selected state mirrors the .chip-check filter chips: ink fill on paper text.
   An <a> per tab so it works as a plain link with JS off; HTMX just swaps the
   #browse-view region on click. */
.browse-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0 4px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--rule);
}
.browse-tab {
  padding: 7px 14px;
  border-radius: 2px;
  border: 1px solid var(--ink);
  background: var(--plate);
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.browse-tab:hover { background: var(--paper); text-decoration: none; }
.browse-tab.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}
.browse-view-lead { margin: 14px 0 16px; max-width: 62ch; font-size: 0.95rem; }
.browse-grid { margin-top: 6px; }

.browse-collections {
  margin: 36px 0 0;
  padding-top: 24px;
  border-top: 3px double var(--ink);
}
.collection-group { margin: 16px 0; }
.collection-metro { margin: 0 0 6px; font-size: 1.05rem; }

.browse-empty { margin-top: 26px; }

/* ===== Phase 15.5 — global messages (header envelope + dropdown panel) ===== */

/* The envelope lives in the nav; the panel drops beneath it, right-aligned. */
.msg-menu { position: relative; display: inline-flex; }
.msg-menu > summary { list-style: none; }
.msg-menu > summary::-webkit-details-marker { display: none; }
.msg-nav {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  cursor: pointer;
  color: var(--ink);
  line-height: 1;
  position: relative;
}
.msg-nav:hover { color: var(--bluebird); }
.msg-icon { display: block; }

/* Unread count bubble, tucked over the envelope's top-right corner. */
.msg-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  margin-left: -6px;
  margin-top: -10px;
}
.msg-badge-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--bluebird);
  color: var(--paper);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0;
  border: 1px solid var(--paper);
}
.msg-badge-empty { min-width: 0; }

/* Dropdown panel — a naturalist's plate resting under the header. */
.msg-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(340px, 90vw);
  max-height: 70vh;
  overflow-y: auto;
  background: var(--plate);
  border: 1.5px solid var(--ink);
  border-radius: var(--card-radius);
  box-shadow: 3px 3px 0 var(--rule);
  padding: 10px 0 6px;
  z-index: 60;
  text-align: left;
}
.msg-panel-loading { padding: 10px 14px; margin: 0; }
.msg-panel-head { padding: 0 14px 8px; border-bottom: 1px dotted var(--dotted); }
.msg-panel-title {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.09em;
  text-transform: uppercase; color: var(--muted-ink);
}
.msg-panel-empty { padding: 12px 14px; margin: 0; }
.msg-panel-all {
  display: block;
  padding: 9px 14px 4px;
  margin-top: 4px;
  border-top: 1px dotted var(--dotted);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--bluebird);
}

.msg-convos { list-style: none; margin: 0; padding: 0; }
.msg-convo { border-bottom: 1px dotted var(--rule); }
.msg-convo:last-child { border-bottom: none; }
.msg-convo > a {
  display: block;
  position: relative;
  padding: 9px 34px 9px 14px;
  color: var(--ink);
}
.msg-convo > a:hover { background: var(--paper); text-decoration: none; }
.msg-convo-line { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.msg-convo-listing {
  font-weight: 700; font-size: 0.9rem;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.msg-convo-when { font-size: 0.7rem; flex-shrink: 0; }
.msg-convo-who { display: block; font-size: 0.72rem; letter-spacing: 0.02em; }
.msg-convo-snippet {
  display: block; margin-top: 2px; font-size: 0.82rem; color: var(--muted-ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.msg-convo.unread .msg-convo-listing { color: var(--ink); }
.msg-convo.unread .msg-convo-snippet { color: var(--ink); font-weight: 600; }
.msg-convo.unread > a::before {
  content: ""; position: absolute; left: 5px; top: 15px;
  width: 6px; height: 6px; border-radius: 999px; background: var(--bluebird);
}
.msg-convo-unread {
  position: absolute; right: 10px; top: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px;
  background: var(--bluebird); color: var(--paper);
  font-size: 0.66rem; font-weight: 700;
}
.msg-convo.locked .msg-convo-listing,
.msg-convo.locked .msg-convo-snippet { color: var(--muted-ink); font-weight: 400; }

/* Full /messages page list. */
.msg-page-list { list-style: none; margin: 18px 0 0; padding: 0; }
.msg-page-convo {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  border: 1.5px solid var(--ink);
  border-radius: var(--card-radius);
  background: var(--plate);
  margin-bottom: 10px;
}
.msg-page-convo > a { display: block; flex: 1; color: var(--ink); min-width: 0; }
.msg-page-convo > a:hover { text-decoration: none; }
.msg-page-convo > a:hover .msg-page-listing { color: var(--bluebird); }
.msg-page-line { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.msg-page-listing { font-family: var(--serif); font-weight: 700; font-size: 1.02rem; }
.msg-page-who { display: block; margin-top: 1px; }
.msg-page-snippet {
  display: block; margin-top: 4px; color: var(--muted-ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.msg-page-convo.unread { border-left-width: 4px; border-left-color: var(--bluebird); }
.msg-page-convo.unread .msg-page-snippet { color: var(--ink); }
.msg-page-unread {
  flex-shrink: 0;
  display: inline-block; padding: 2px 9px; border-radius: 999px;
  background: var(--bluebird); color: var(--paper);
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.03em;
}
.msg-page-convo.locked { border-color: var(--rule); }
.msg-page-convo.locked .msg-page-listing { color: var(--muted-ink); }

@media (max-width: 560px) {
  .msg-panel { width: min(340px, 94vw); }
}

/* =========================================================================
   Phase 12 — interactive map (Field Guide chrome over vendored Leaflet)
   ========================================================================= */

/* Results header row: heading on the left, List/Map toggle on the right. */
.results-head-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
/* List / Map toggle — bordered ink tabs, the active one filled. */
.view-toggle {
  display: inline-flex;
  border: 1.5px solid var(--ink);
  border-radius: 3px;
  overflow: hidden;
}
.view-tab {
  padding: 4px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--plate);
  border-right: 1.5px solid var(--ink);
}
.view-tab:last-child { border-right: 0; }
.view-tab:hover { text-decoration: none; background: #EFEAD9; }
.view-tab.is-active { background: var(--ink); color: var(--paper); }
.view-tab.is-active:hover { background: var(--ink); }

/* The map view wrapper (revealed by JS once Leaflet is up). */
.search-map-wrap { margin: 12px 0 18px; }
.search-wrap.map-active .card-grid { display: none; }   /* map replaces the grid */

.map-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.map-toolbar-actions { display: inline-flex; gap: 8px; flex-wrap: wrap; }
.map-draw-hint { margin: 0 0 8px; font-size: 0.86rem; }

#search-map {
  height: 460px;
  border: 1.5px solid var(--ink);
  border-radius: var(--card-radius);
  background: #E9E4D6;
}
#search-map.map-drawing { cursor: crosshair; }

.map-privacy-note { margin: 8px 0 0; font-size: 0.84rem; }

/* Listing-page mini-map. */
.listing-map-section #listing-mini-map {
  height: 280px;
  border: 1.5px solid var(--ink);
  border-radius: var(--card-radius);
  background: #E9E4D6;
}

/* --- Leaflet overrides — bluebird.css loads BEFORE leaflet.css, so every rule
   here is scoped under an ancestor (.search-map-wrap / .leaflet-container) to
   out-specify Leaflet's own bare-class defaults. --- */
.leaflet-container {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
}
.leaflet-container .leaflet-control-attribution {
  background: rgba(246, 242, 233, 0.85);
  color: var(--muted-ink);
  font-size: 0.68rem;
}
.leaflet-container .leaflet-control-attribution a { color: var(--bluebird); }

/* Zoom control -> ink-bordered Field Guide buttons. */
.leaflet-container .leaflet-bar a {
  background: var(--plate);
  color: var(--ink);
  border-bottom: 1px solid var(--rule);
}
.leaflet-container .leaflet-bar a:hover { background: #EFEAD9; }

/* Popup card styled to the paper/ink tokens. */
.leaflet-popup-content-wrapper {
  background: var(--plate);
  color: var(--ink);
  border: 1.5px solid var(--ink);
  border-radius: var(--card-radius);
  box-shadow: none;
}
.leaflet-popup-tip { background: var(--plate); border: 1.5px solid var(--ink); }
.leaflet-container a.leaflet-popup-close-button { color: var(--muted-ink); }
.map-popup { display: flex; flex-direction: column; gap: 3px; min-width: 140px; }
.map-popup strong { font-family: var(--serif); font-size: 1rem; }
.map-popup-badge {
  align-self: flex-start;
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid var(--bluebird);
  color: var(--bluebird);
  padding: 1px 6px;
  border-radius: 2px;
}
.map-popup-price { color: var(--muted-ink); font-weight: 600; }
.map-popup-link { font-weight: 600; }
/* Phase 12.5: "Exact location" stamp on the pin popup + mini-map — a filled
   bluebird chip so it reads as a positive, host-shared precision signal. */
.map-popup-exact {
  align-self: flex-start;
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--bluebird);
  color: var(--paper);
  padding: 1px 6px;
  border-radius: 2px;
}

@media (max-width: 560px) {
  #search-map { height: 60vh; }
  .map-toolbar { align-items: flex-start; }
}

/* --- Phase 13: stay records, receipts, ledger & lifecycle ------------------ */
.btn-tiny { padding: 3px 8px; font-size: 0.75rem; }
.table-scroll { overflow-x: auto; margin: 8px 0 4px; }

/* "Money & records" block on trips + inbox cards (kept collapsed, uncluttered) */
.money-records { margin-top: 12px; border: 1px solid var(--rule); border-radius: var(--card-radius); background: var(--paper); }
.money-records > summary { cursor: pointer; padding: 10px 14px; font-weight: 700; font-size: 0.82rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted-ink); }
.money-records-body { padding: 4px 14px 14px; display: flex; flex-direction: column; gap: 10px; }
.record-amount { margin: 0; font-size: 1rem; }
.record-label { margin: 0 0 2px; font-weight: 700; font-size: 0.72rem; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted-ink); }
.record-inline-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; margin: 0; }
.record-inline-form label { display: flex; flex-direction: column; gap: 3px; font-weight: 600; }
.record-inline-form input[type="number"], .record-inline-form input[type="text"], .record-inline-form input[type="date"] {
  padding: 7px 9px; border: 1px solid var(--ink); border-radius: 2px; background: var(--plate); color: var(--ink); font-size: 0.95rem; }
.record-receipts ul, .record-adjustments { margin: 4px 0 0; padding-left: 18px; font-size: 0.92rem; }
.record-sub { margin: 2px 0 0; }
.record-sub > summary { cursor: pointer; font-size: 0.85rem; font-weight: 600; color: var(--bluebird); }
.record-sub .record-inline-form { margin-top: 8px; }

/* No-show mark + guest response — travel together everywhere the mark shows */
.no-show-mark { margin-top: 10px; padding: 10px 12px; background: var(--amber-bg); border: 1px solid var(--amber-border); border-radius: var(--card-radius); }
.no-show-flag { margin: 0; font-weight: 700; color: var(--amber-ink); }
.no-show-response { margin-top: 6px; }
.no-show-response blockquote { margin: 2px 0 0; padding-left: 10px; border-left: 3px solid var(--amber-border); font-style: italic; }
.no-show-response-form { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.no-show-response-form textarea { padding: 8px 10px; border: 1px solid var(--ink); border-radius: 2px; background: var(--plate); color: var(--ink); }
.vetting-noshow { margin: 4px 0 0; font-weight: 700; color: var(--amber-ink); font-size: 0.9rem; }

/* Ledger */
.ledger-periods { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 14px 0; border-bottom: 1px solid var(--rule); }
.ledger-range { font-size: 0.85rem; margin-left: auto; padding-bottom: 8px; }
.ledger-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin: 12px 0; }
.ledger-stat { padding: 12px 14px; background: var(--plate); border: 1px solid var(--rule); border-radius: var(--card-radius); }
.ledger-stat-label { margin: 0; font-weight: 700; font-size: 0.72rem; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted-ink); }
.ledger-stat-value { margin: 4px 0; font-size: 1.5rem; font-weight: 700; font-family: var(--serif); }
.ledger-net { background: var(--ink); color: var(--paper); }
.ledger-net .ledger-stat-label, .ledger-net .ledger-stat-value { color: var(--paper); }
.ledger-breakdown { margin: 4px 0 0; padding-left: 16px; font-size: 0.85rem; color: var(--muted-ink); }
.ledger-h2 { margin: 22px 0 6px; font-size: 1.15rem; }
.ledger-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.ledger-table th, .ledger-table td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.ledger-table th { font-size: 0.72rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted-ink); }
.ledger-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ledger-row-expense td { color: var(--err-ink); }
.ledger-row-adjustment td { color: var(--amber-ink); }
.ledger-row-income td { color: var(--ink); }
.ledger-expense-form { display: flex; flex-direction: column; gap: 12px; max-width: 720px; margin-top: 8px; }
.ledger-expense-form > label { display: flex; flex-direction: column; gap: 5px; font-weight: 600; font-size: 0.95rem; }
.ledger-expense-form input, .ledger-expense-form select { padding: 10px 12px; border: 1px solid var(--ink); border-radius: 2px; background: var(--plate); color: var(--ink); font-size: 1rem; }
.ledger-disclaimer { margin-top: 18px; }

/* Receipt document (clean serif; print-friendly) */
.receipt-wrap { max-width: 760px; }
.receipt-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; }
.receipt-doc { background: var(--plate); border: 1px solid var(--ink); border-radius: var(--card-radius); padding: 34px 38px; font-family: var(--serif); }
.receipt-head { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 2px solid var(--ink); padding-bottom: 14px; }
.receipt-brand { margin: 0; font-size: 1.6rem; font-weight: 700; letter-spacing: -0.01em; }
.receipt-num { text-align: right; }
.receipt-number { margin: 0; font-size: 1.15rem; font-weight: 700; }
.receipt-amend-tag { margin: 4px 0 0; font-weight: 700; color: var(--amber-ink); text-transform: uppercase; font-size: 0.72rem; letter-spacing: 0.08em; }
.receipt-notice { margin: 14px 0; padding: 10px 12px; background: var(--amber-bg); border: 1px solid var(--amber-border); border-radius: 2px; font-size: 0.92rem; }
.receipt-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 20px 0; }
.receipt-label { margin: 0 0 3px; font-weight: 700; font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted-ink); font-family: system-ui, sans-serif; }
.receipt-strong { margin: 0; font-weight: 700; font-size: 1.05rem; }
.receipt-parties p, .receipt-property p { margin: 0 0 2px; }
.receipt-property { margin: 16px 0; }
.receipt-table { width: 100%; border-collapse: collapse; margin: 12px 0; }
.receipt-table th, .receipt-table td { text-align: left; padding: 7px 4px; border-bottom: 1px solid var(--rule); }
.receipt-table th { width: 40%; color: var(--muted-ink); font-weight: 600; }
.receipt-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.receipt-lines thead th { width: auto; text-transform: uppercase; font-size: 0.72rem; letter-spacing: 0.05em; }
.receipt-total { display: flex; justify-content: space-between; align-items: baseline; margin: 20px 0 6px; padding-top: 14px; border-top: 2px solid var(--ink); font-size: 1.1rem; font-weight: 700; }
.receipt-amount { font-size: 1.5rem; }
.receipt-foot { margin-top: 18px; border-top: 1px solid var(--rule); padding-top: 12px; }

/* Print: strip the app chrome; the receipt document stands alone. */
@media print {
  .site-header, .site-nav, .site-footer, .dev-banner, .flash,
  .screen-only, .receipt-toolbar { display: none !important; }
  body { background: #fff; }
  main { margin: 0; padding: 0; }
  .receipt-wrap { max-width: none; }
  .receipt-doc { border: none; border-radius: 0; padding: 0; background: #fff; box-shadow: none; }
}

/* ============================ Phase 14 ================================= */
/* Feature decision matrix (Host Pro) — a private, fact-only host surface.   */
.matrix-panel .matrix-h3 { margin: 16px 0 6px; font-size: 0.95rem;
  text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted-ink); }
.matrix-row { border: 1px solid var(--ink); border-radius: var(--card-radius);
  background: var(--paper); padding: 10px 12px; margin: 8px 0; }
.matrix-feature { font-family: var(--serif); font-size: 1.05rem; margin-bottom: 4px; }
.matrix-cols { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px;
  grid-template-columns: 1fr; }
@media (min-width: 720px) { .matrix-cols { grid-template-columns: 1fr 1fr; } }
.matrix-cols > li { font-size: 0.9rem; line-height: 1.4; }
.matrix-col-label { display: inline-block; min-width: 128px; font-size: 0.68rem;
  font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--muted-ink); }
.matrix-delta { color: var(--moss); }
.matrix-bucket { margin-left: 128px; font-size: 0.82rem; }
.matrix-method { margin-top: 14px; }
.matrix-method summary { cursor: pointer; font-size: 0.85rem; }
.matrix-method p { margin: 6px 0 0; line-height: 1.5; }

/* "Biggest missed demand" strip on the analytics rollup. */
.missed-grid { display: grid; gap: 12px; grid-template-columns: 1fr; margin: 8px 0; }
@media (min-width: 560px) { .missed-grid { grid-template-columns: repeat(3, 1fr); } }
.missed-card { border: 1px solid var(--ink); border-radius: var(--card-radius);
  background: var(--paper); padding: 12px; }
.missed-feature { font-family: var(--serif); font-size: 1.05rem; margin: 0 0 4px; }
.missed-num { margin: 0; font-size: 0.95rem; }
.missed-num strong { font-size: 1.4rem; font-family: var(--serif); color: var(--bluebird); }
.missed-card .small { margin: 4px 0 0; }

/* ============================ Home redesign (Option B) =====================
   Search-first landing (founder-approved): a hero prompt bar (the primary
   action), then a light, wrapping "optional" adjuster row (near-me / dates /
   guests / price + the surfaced "Draw on map" link), then the nearby feed.
   Field Guide tokens throughout; the row wraps gracefully and never overflows
   a phone width. The map is NOT embedded here — "Draw on map" navigates to the
   existing /search?view=map, so the home page stays free of OSM/Leaflet. */

.home-hero { margin: 10px 0 4px; }
.home-hero-title { font-size: 2.1rem; margin: 0 0 2px; letter-spacing: 0.01em; }
.home-hero-sub { margin: 0 0 14px; font-size: 1.02rem; }
@media (min-width: 700px) { .home-hero-title { font-size: 2.5rem; } }

/* Hero smart bar — the clear focal point: a taller field, bigger submit. */
.smart-bar-hero { margin: 0 0 10px; gap: 12px; }
.smart-bar-hero .smart-input { padding: 15px 18px; font-size: 1.1rem; }
@media (max-width: 560px) {
  .smart-bar-hero { flex-wrap: wrap; }
  .smart-bar-hero .smart-input,
  .smart-bar-hero .btn { flex: 1 1 100%; }
}

/* The optional adjuster — one light bar that reads as clearly secondary. */
.adjuster {
  margin: 6px 0 18px;
  padding: 12px 14px;
  background: var(--plate);
  border: 1px solid var(--rule);
  border-radius: var(--card-radius);
}
.adjuster-label {
  margin: 0 0 8px;
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--muted-ink);
}
.adjuster-row {
  display: flex; align-items: flex-end; flex-wrap: wrap; gap: 12px 18px;
}

/* Inside the adjuster the old boxed date-chip blends into the light bar (the
   bar carries the border now); its uppercase field captions stay. */
.adjuster-form.date-chip {
  background: transparent; border: none; border-radius: 0;
  padding: 0; margin: 0; align-items: flex-end; gap: 12px 14px;
}

/* Near-me picker: a captioned column so it lines up with the other controls. */
.adjuster .metro-picker { flex-direction: column; align-items: flex-start; gap: 4px; }
.adjuster .metro-picker label {
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--muted-ink);
}

/* Compact price fields — narrow so both fit a phone row without overflow. */
.adj-price { width: 96px; }

/* "Draw on map" — the surfaced feature. A tinted bluebird chip (reusing the
   established light-bluebird surface #DCE6F0) so it stands out from the muted
   refine controls as the one-tap lasso-map action. */
.draw-map-link {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 15px;
  background: #DCE6F0;
  color: var(--bluebird);
  border: 1.5px solid var(--bluebird);
  border-radius: 2px;
  font-family: var(--serif); font-weight: 700; font-size: 0.95rem;
  white-space: nowrap; align-self: flex-end;
}
.draw-map-link:hover { background: var(--bluebird); color: var(--paper); text-decoration: none; }
.draw-map-icon { flex: 0 0 auto; }

@media (max-width: 560px) {
  .adjuster-row { gap: 10px 12px; }
  .draw-map-link { flex: 1 1 100%; justify-content: center; }
}
