:root {
  --ink: #18211d;
  --muted: #62706a;
  --paper: #f7f5ef;
  --panel: #ffffff;
  --line: #dedbd0;
  --brick: #9b4d3c;
  --moss: #46624d;
  --gold: #c69b42;
  --sky: #dcebf0;
  --navy: #223247;
  --shadow: 0 16px 48px rgba(24, 33, 29, 0.12);
}

/* Agent Opportunities ----------------------------------------------------- */
.agent-opportunities {
  border: 1px solid #d7e2dc;
  border-radius: 22px;
  padding: 24px;
  background: linear-gradient(145deg, #f8fbf9, #eef5f1);
  scroll-margin-top: 110px;
}

.opportunities-tool-card {
  border-color: #79a78e !important;
  background: linear-gradient(145deg, #f4fbf6, #e7f4eb) !important;
}

.opportunities-heading { align-items: flex-start; }
.opportunities-heading .form-note { max-width: 760px; margin: 6px 0 0; }
.availability-control { display: flex; align-items: center; gap: 12px; white-space: nowrap; }
.availability-control > span { font-weight: 800; color: #6f7a74; }
.availability-toggle { border: 0; border-radius: 999px; padding: 13px 20px; background: #6d7671; color: #fff; font-weight: 850; cursor: pointer; box-shadow: 0 5px 14px rgba(25, 41, 32, .16); }
.availability-toggle.active { background: #0d6b3b; }
.availability-toggle.active::before { content: "●"; margin-right: 8px; color: #8dffba; }
.opportunity-status-bar { margin: 16px 0; padding: 12px 15px; border-radius: 12px; background: #e9eef2; color: #30404a; font-weight: 700; }
.opportunity-status-bar[data-type="success"] { background: #dcf3e5; color: #165d36; }
.opportunity-status-bar[data-type="error"] { background: #fbe1e1; color: #8a2020; }
.opportunity-layout { display: grid; grid-template-columns: minmax(280px, .8fr) minmax(420px, 1.4fr); gap: 18px; }
.opportunity-panel { border: 1px solid #d8e1dc; border-radius: 17px; padding: 18px; background: #fff; box-shadow: 0 8px 22px rgba(35, 55, 44, .07); }
.available-agent-panel { margin-bottom: 18px; border-color: #9fc9ae; background: linear-gradient(145deg, #fff, #f1faf4); }
.available-agent-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.available-agent-list { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin-top: 12px; }
.available-agent-card { border-left-color: #0d7a44; }
.selected-agent-readout { padding: 12px 14px; border: 1px solid #9fc9ae; border-radius: 11px; background: #edf8f1; color: #245f3e; }
.clear-agent-selection { justify-self: start; width: auto !important; }
.agent-availability-control.locked-tool { display: none; }
.assignment-panel { margin-top: 18px; }
.agent-assignment-panel > summary, .agent-review-list-panel > summary { cursor: pointer; font-size: 1.12rem; font-weight: 800; padding: 2px 0; }
.assignment-panel-controls { margin: 12px 0; }
.opportunity-panel h3 { margin: 0; }
.opportunity-form { display: grid; gap: 12px; }
.opportunity-form label, .opportunity-request-form label { display: grid; gap: 5px; font-weight: 800; color: #39473f; }
.opportunity-form input, .opportunity-form select, .opportunity-request-form input, .opportunity-request-form select, .opportunity-request-form textarea { width: 100%; min-height: 44px; border: 1px solid #cbd7d0; border-radius: 10px; padding: 10px 12px; background: #fff; color: #17221c; font: inherit; box-sizing: border-box; }
.opportunity-request-form textarea { min-height: 88px; resize: vertical; }
.location-readout { padding: 10px; border-radius: 10px; background: #eef3f0; color: #58655e; }
.approval-readout { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.approval-readout span { padding: 9px; border-radius: 9px; background: #fff7dc; color: #705b1a; text-transform: capitalize; }
.opportunity-list { display: grid; gap: 12px; }
.opportunity-card { border: 1px solid #d5dfd9; border-left: 5px solid #2f7651; border-radius: 14px; padding: 15px; background: #fff; }
.assignment-card { padding: 0; overflow: hidden; }
.assignment-card > summary { cursor: pointer; padding: 15px; align-items: center; }
.assignment-card > summary:hover { background: #f4f8f5; }
.assignment-card-body { padding: 0 15px 15px; }
.assignment-card:not([open]) > summary { margin: 0; }
.opportunity-card[data-status="completed"] { border-left-color: #3375a9; }
.opportunity-card[data-status="cancelled"] { border-left-color: #a84242; opacity: .78; }
.opportunity-card-head { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; }
.opportunity-card h4 { margin: 4px 0 0; font-size: 1.02rem; }
.opportunity-type { color: #397253; font-weight: 900; font-size: .76rem; letter-spacing: .04em; text-transform: uppercase; }
.opportunity-state { padding: 6px 10px; border-radius: 999px; background: #e2f0e7; color: #1f6340; font-weight: 900; text-transform: capitalize; }
.opportunity-facts { display: grid; grid-template-columns: repeat(3, minmax(100px, 1fr)); gap: 8px; margin: 13px 0; }
.opportunity-facts span { display: grid; gap: 2px; padding: 9px; border-radius: 9px; background: #f2f5f3; font-size: .84rem; }
.opportunity-facts b { color: #68746d; font-size: .68rem; text-transform: uppercase; }
.opportunity-card p { margin: 8px 0; color: #4b5951; }
.opportunity-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 13px; }
.empty-opportunity-message { margin: 0; padding: 24px; border: 1px dashed #c7d3cc; border-radius: 12px; text-align: center; color: #69756e; }
.opportunity-request-panel { margin-top: 18px; border: 1px solid #cddbd3; border-radius: 16px; background: #fff; overflow: hidden; }
.opportunity-request-panel > summary { padding: 16px 18px; cursor: pointer; font-weight: 900; background: #edf5f0; }
.opportunity-request-form { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding: 18px; }
.opportunity-request-form .wide { grid-column: 1 / -1; }
.public-agent-directory { margin: 24px 0; padding: 24px; border: 1px solid #cddbd3; border-radius: 20px; background: linear-gradient(180deg, #f4faf6 0%, #eef5f1 100%); }
.public-agent-directory .available-agent-panel { margin-bottom: 18px; }
.buyer-availability-explainer { display: grid; gap: 4px; margin: 0 18px; padding: 14px 16px; border-radius: 12px; background: #e0f2e7; color: #225f3e; }
.buyer-availability-explainer span { color: #476557; }
.public-request-history { margin-top: 18px; }
.request-history-controls { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.request-history-controls button:disabled { opacity: .5; cursor: not-allowed; }
#myAgentRequestsBody[hidden] { display: none !important; }
.opportunity-private-contact { padding: 10px 12px; border-radius: 10px; background: #e8f3ff; color: #174d73 !important; }
.opportunity-private-contact a { color: inherit; font-weight: 800; }
.preapproval-upload-field { padding: 14px; border: 1px solid #bdd3c5; border-radius: 12px; background: #f3f9f5; }
.preapproval-upload-field small { color: #647169; font-weight: 600; }
.preapproval-upload-field input[type="file"] { padding: 8px; background: #fff; }
.preapproval-submit-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: -4px; color: #647169; font-size: .9rem; }
.preapproval-submit-button { width: auto !important; min-width: 190px; border-color: #2f7651 !important; color: #245f3e !important; background: #fff !important; }
.opportunity-preapproval { margin-top: 12px; padding: 12px; border: 1px solid #b9cfc1; border-radius: 11px; background: #f0f8f3; color: #285c3e; }
.opportunity-preapproval p { margin: 0; color: inherit; }
.opportunity-preapproval small { display: block; margin-top: 4px; color: #637168; }
.agent-rating-summary { border-left: 3px solid #d3a62f; background: #fff8df !important; }
.agent-rating-panel { margin-top: 12px; padding: 12px; border: 1px solid #e2cd86; border-radius: 11px; background: #fff9e7; color: #624f17; }
.rating-stars { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: 6px; }
.rating-star { border: 0; padding: 2px 4px; background: transparent; color: #bbb29a; font-size: 1.7rem; line-height: 1; cursor: pointer; }
.rating-star:hover, .rating-star:focus-visible, .rating-star.selected { color: #d39a13; transform: translateY(-1px); }
.rating-readonly { font-weight: 800; color: #8b6712; }
.rating-comment { margin: 7px 0 0 !important; color: #66582e !important; font-style: italic; }
.agent-rating-panel small { display: block; margin-top: 5px; color: #756a49; }
.agent-review-reply { margin-top: 10px; padding: 10px; border-left: 3px solid #2f7651; border-radius: 8px; background: #f3f8f4; color: #314b3b; }
.agent-review-reply p { margin: 5px 0 0; }
.review-reply-form { display: grid; gap: 8px; margin-top: 10px; }
.review-reply-form textarea { width: 100%; min-height: 72px; resize: vertical; }
.review-reply-form button { justify-self: start; }
.agent-review-list-panel { margin-top: 18px; }
.agent-chat-panel { margin-top: 12px; border: 1px solid #b8cfe0; border-radius: 12px; background: #f3f8fc; overflow: hidden; }
.agent-chat-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 12px; color: #24536f; }
.agent-chat-body { padding: 0 12px 12px; }
.chat-message-list { display: grid; gap: 8px; max-height: 300px; overflow-y: auto; padding: 10px; border-radius: 10px; background: #fff; }
.chat-message { max-width: 78%; padding: 9px 11px; border-radius: 12px; background: #edf1f4; color: #33444e; }
.chat-message.mine { justify-self: end; background: #dcefe3; color: #24583a; }
.chat-message.theirs { justify-self: start; }
.chat-message p { margin: 3px 0 !important; color: inherit !important; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-message small { color: #6b787f; }
.empty-chat-message { margin: 0 !important; padding: 16px; text-align: center; color: #6a777e !important; }
.chat-compose { display: grid; gap: 8px; margin-top: 10px; }
.chat-compose textarea { width: 100%; min-height: 76px; padding: 10px 12px; border: 1px solid #b9cbd7; border-radius: 10px; resize: vertical; font: inherit; }
.chat-compose > div { display: flex; flex-wrap: wrap; gap: 8px; }
.request-location-actions { display: flex; gap: 12px; align-items: center; color: #637068; }
.broker-admin-panel { border-color: #b69a56; }
.broker-admin-panel > summary { background: #fff4d3; }

@media (max-width: 900px) {
  .opportunity-layout { grid-template-columns: 1fr; }
  .opportunity-facts { grid-template-columns: repeat(2, 1fr); }
  .opportunity-request-form { grid-template-columns: 1fr; }
  .opportunity-request-form .wide { grid-column: auto; }
  .opportunities-heading { display: grid; gap: 14px; }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

button {
  cursor: pointer;
}

.open-mls-origin-notice {
  display: grid;
  gap: 6px;
  margin: 12px auto 0;
  width: min(1180px, calc(100% - 32px));
  padding: 10px 14px;
  color: #35506a;
  background: #eef6fb;
  border: 1px solid #bfd8e8;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.4;
}

.open-mls-origin-notice.is-file-mode {
  color: #6a3d18;
  background: #fff5e8;
  border-color: #e3c59b;
}

.open-mls-origin-notice ol {
  margin: 0 0 0 18px;
  padding: 0;
}

.open-mls-origin-notice code {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.app-shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 72px;
  padding: 12px clamp(16px, 4vw, 48px);
  background: rgba(247, 245, 239, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  color: white;
  background: var(--brick);
  border-radius: 8px;
  font-weight: 800;
}

.brand small,
.eyebrow,
.listing-meta,
.request-card small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.brand strong,
.brand small {
  display: block;
}

nav {
  display: flex;
  flex: 1;
  justify-content: center;
  gap: 20px;
}

nav a {
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
}

.ghost-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.agent-btn,
.primary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  color: white;
  background: var(--navy);
  border: 1px solid var(--navy);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.topbar-actions {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
}

.settings-menu-button {
  white-space: nowrap;
}

.settings-menu-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 30;
  display: grid;
  gap: 12px;
  width: min(560px, calc(100vw - 24px));
  max-height: calc(100vh - 96px);
  overflow: auto;
  padding: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.settings-menu-panel[hidden] {
  display: none;
}

.settings-menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.settings-menu-head strong {
  font-size: 16px;
}

.settings-menu-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.settings-menu-links button {
  min-height: 34px;
  padding: 0 10px;
  color: #2368b1;
  background: #f4f9ff;
  border: 1px solid #8db9e5;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 850;
}

#settingsMenuContent .state-market-profile {
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.primary-btn,
.ghost-btn,
.segmented button,
.chat-form button {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0 16px;
  font-weight: 700;
}

.primary-btn {
  color: white;
  background: var(--moss);
}

.ghost-btn,
.segmented button {
  color: var(--ink);
  background: var(--panel);
  border-color: var(--line);
}

.hero {
  position: relative;
  min-height: clamp(420px, 72vh, 720px);
  overflow: hidden;
}

.hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, rgba(20, 28, 25, 0.82), rgba(20, 28, 25, 0.28) 52%, rgba(20, 28, 25, 0.1));
}

.hero-overlay {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: inherit;
  padding: clamp(72px, 10vw, 120px) clamp(16px, 6vw, 80px) 28px;
  color: white;
}

.hero-copy {
  max-width: 680px;
}

.hero-copy h1 {
  margin: 8px 0;
  font-size: clamp(54px, 9vw, 126px);
  line-height: 0.9;
  letter-spacing: 0;
}

.hero-copy p {
  max-width: 620px;
  font-size: clamp(18px, 2.2vw, 24px);
  line-height: 1.45;
}

.hero-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  max-width: 720px;
  margin-top: 22px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 8px;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.24);
}

.hero-search input {
  min-height: 52px;
  background: white;
  border-color: transparent;
  font-size: 17px;
}

.hero-search button {
  min-height: 52px;
}

.home-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.home-tabs button {
  min-height: 34px;
  padding: 0 13px;
  color: white;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  font-weight: 800;
}

.home-tabs button.active {
  color: var(--ink);
  background: white;
}

.hero .eyebrow {
  color: var(--sky);
  font-weight: 800;
  text-transform: uppercase;
}

.market-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.market-stats span,
.pill,
.status-dot {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px);
}

.command-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr)) auto;
  gap: 12px;
  padding: 16px clamp(16px, 4vw, 48px);
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}

label,
.stacked-form,
.listing-form {
  display: grid;
  gap: 7px;
}

label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  color: var(--ink);
  background: #fbfaf7;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
}

textarea {
  min-height: 92px;
  resize: vertical;
}

.workspace,
.operations,
.requests {
  padding: 34px clamp(16px, 4vw, 48px);
}

.agent-gate {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 20px clamp(16px, 4vw, 48px) 0;
  padding: 18px;
  background: #f0efe7;
  border: 1px solid var(--line);
  border-left: 6px solid var(--gold);
  border-radius: 8px;
}

.public-agent-gate {
  align-items: center;
}

.agent-gate.verified {
  border-left-color: var(--moss);
  background: #eef6ef;
}

.agent-gate h2 {
  margin: 0 0 6px;
  font-size: 22px;
}

.agent-gate p:last-child {
  margin: 0;
  color: var(--muted);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
  gap: 22px;
  align-items: start;
}

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

.section-head h2 {
  margin: 0;
  font-size: 26px;
  line-height: 1.1;
}

.compact h2 {
  font-size: 18px;
}

.eyebrow {
  margin: 0 0 5px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.segmented {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background: #ece8dc;
  border-radius: 8px;
}

.segmented button {
  min-height: 34px;
  padding: 0 11px;
  background: transparent;
}

.segmented button.active {
  color: white;
  background: var(--navy);
}

.listing-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.listing-card,
.side-rail section,
.upload-pane,
.message-pane,
.request-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.listing-card {
  overflow: hidden;
}

.listing-card.locked {
  position: relative;
}

.listing-card.locked .listing-body,
.listing-card.locked .listing-visual {
  filter: blur(3px);
  pointer-events: none;
  user-select: none;
}

.lock-panel {
  position: absolute;
  inset: 12px;
  z-index: 2;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 18px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  border-radius: 8px;
  text-align: center;
}

.lock-panel strong {
  font-size: 18px;
}

.lock-panel button {
  justify-self: center;
  min-height: 36px;
}

.listing-visual {
  min-height: 154px;
  padding: 14px;
  color: white;
  background:
    linear-gradient(135deg, rgba(34, 50, 71, 0.9), rgba(155, 77, 60, 0.76)),
    var(--image-pattern);
  background-size: cover;
}

.listing-visual .badge {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 5px 9px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.2);
  font-size: 12px;
  font-weight: 800;
}

.listing-body {
  display: grid;
  gap: 12px;
  padding: 15px;
}

.listing-title {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
}

.listing-title h3 {
  margin: 0;
  font-size: 18px;
}

.price {
  color: var(--brick);
  font-weight: 900;
}

.listing-actions {
  display: flex;
  gap: 8px;
}

.listing-actions button {
  flex: 1;
  min-height: 38px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fbfaf7;
  font-weight: 700;
}

.side-rail {
  display: grid;
  gap: 16px;
}

.side-rail section,
.upload-pane,
.message-pane {
  padding: 18px;
}

.saved-list {
  display: grid;
  gap: 10px;
}

.saved-item {
  display: grid;
  gap: 4px;
  padding: 11px;
  background: #f3f7f3;
  border: 1px solid #d8e2d8;
  border-radius: 8px;
  font-size: 13px;
}

.operations {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(320px, 1.1fr);
  gap: 22px;
}

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

.listing-form textarea,
.listing-form button {
  grid-column: 1 / -1;
}

.pill {
  color: var(--navy);
  background: var(--sky);
  border-color: #c2d6df;
  font-size: 12px;
  font-weight: 800;
}

.status-dot {
  color: #214c32;
  background: #e5f2e8;
  border-color: #bfdbc6;
  font-size: 12px;
  font-weight: 800;
}

.chat-log {
  display: grid;
  gap: 10px;
  height: 286px;
  overflow: auto;
  padding-right: 6px;
}

.message {
  max-width: 82%;
  padding: 10px 12px;
  border-radius: 8px;
  background: #f1eee5;
}

.message.mine {
  justify-self: end;
  color: white;
  background: var(--navy);
}

.message b {
  display: block;
  margin-bottom: 3px;
  font-size: 12px;
}

.chat-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-top: 12px;
}

.chat-form button {
  color: white;
  background: var(--brick);
}

.request-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.request-card {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.request-card strong {
  font-size: 17px;
}

.matrix-shell {
  padding: 28px clamp(16px, 4vw, 48px) 42px;
}

.public-app {
  padding: 28px clamp(16px, 4vw, 48px) 42px;
}

.agent-workspace {
  padding: 28px clamp(16px, 4vw, 48px) 42px;
}

.public-page {
  display: grid;
  gap: 18px;
}

.matrix-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: end;
  padding: 28px;
  color: white;
  background:
    linear-gradient(135deg, rgba(24, 33, 29, 0.94), rgba(70, 98, 77, 0.86)),
    url("./assets/us-market.png");
  background-position: center;
  background-size: cover;
  border-radius: 8px;
}

.matrix-hero h1 {
  margin: 6px 0;
  font-size: clamp(42px, 8vw, 92px);
  line-height: 0.95;
}

.matrix-hero p {
  max-width: 780px;
  margin: 0;
  font-size: 18px;
  line-height: 1.5;
}

.matrix-hero .eyebrow {
  color: var(--sky);
}

.matrix-metrics {
  display: grid;
  gap: 10px;
  min-width: 180px;
}

.matrix-metrics span {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  min-height: 38px;
  padding: 9px 11px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  backdrop-filter: blur(10px);
}

.matrix-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  margin-top: 22px;
  align-items: start;
}

.mvp-nav {
  position: sticky;
  top: 72px;
  z-index: 8;
  display: flex;
  gap: 8px;
  margin: 16px clamp(16px, 4vw, 48px) 0;
  padding: 8px;
  overflow-x: auto;
  background: rgba(247, 245, 239, 0.92);
  border: 1px solid var(--line);
  border-radius: 8px;
  backdrop-filter: blur(12px);
}

.mvp-nav a {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 8px 12px;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 7px;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.mvp-nav a:hover {
  border-color: #8db9e5;
  box-shadow: 0 0 0 2px rgba(35, 104, 177, 0.1);
}

.agent-dashboard {
  grid-column: 1 / -1;
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
}

.dashboard-grid.compact {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-top: 10px;
}

.dashboard-card {
  display: grid;
  gap: 8px;
  min-height: 132px;
  align-content: start;
  padding: 16px;
  color: var(--ink);
  background: #fbfaf7;
  border: 1px solid var(--line);
  border-radius: 8px;
  text-decoration: none;
}

.dashboard-card.primary {
  background: #eef6ef;
  border-color: rgba(70, 98, 77, 0.35);
}

.dashboard-card:hover {
  border-color: #8db9e5;
  box-shadow: 0 0 0 2px rgba(35, 104, 177, 0.12);
}

.dashboard-card strong {
  font-size: 17px;
  line-height: 1.2;
}

.dashboard-card span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.more-tools-panel {
  margin-top: 12px;
}

.more-tools-panel summary {
  color: #2368b1;
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
}

.agent-tools {
  grid-column: 1 / -1;
  padding: 14px;
  background: #f4f1e8;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.agent-tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.agent-tool-card {
  display: grid;
  gap: 6px;
  min-height: 88px;
  align-content: start;
  padding: 12px;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  text-decoration: none;
}

.agent-tool-card:hover {
  border-color: #8db9e5;
  box-shadow: 0 0 0 2px rgba(35, 104, 177, 0.12);
}

.agent-tool-card strong {
  font-size: 15px;
}

.agent-tool-card span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.crm-center {
  grid-column: 1 / -1;
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.client-leads-center {
  grid-column: 1 / -1;
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.client-leads-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.client-leads-center .btn {
  min-height: 36px;
  padding: 0 13px;
  color: white;
  border: 1px solid transparent;
  border-radius: 7px;
  font-weight: 800;
  cursor: pointer;
}

.client-leads-center .btn-primary {
  background: #2368b1;
  border-color: #2368b1;
}

.client-leads-center .btn-success {
  background: #2f7d4c;
  border-color: #2f7d4c;
}

.client-leads-center .btn-danger {
  background: #b34032;
  border-color: #b34032;
}

.client-leads-center .btn-secondary {
  background: #62558f;
  border-color: #62558f;
}

.client-leads-center .btn-outline {
  color: #2368b1;
  background: #f4f9ff;
  border-color: #8db9e5;
}

.client-leads-center button:disabled {
  color: #7e858b;
  background: #e3e5e7;
  border-color: #d3d6d8;
  cursor: not-allowed;
  opacity: 0.75;
}

.client-leads-workspace,
.crm-layout {
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.crm-sidebar,
.crm-profile-panel {
  min-width: 0;
}

.client-contacts-compact {
  padding: 12px;
  background: #f8faf8;
  border: 1px solid #dce5dc;
  border-radius: 12px;
}

.compact-folder-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.compact-folder-header h3 {
  margin: 0;
  font-size: 16px;
}

.compact-folder-header p {
  margin: 4px 0 10px;
  color: #667;
  font-size: 12px;
}

.compact-folder-header .ghost-btn {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 7px 10px;
  font-size: 12px;
}

.client-contacts-panel {
  display: grid;
  gap: 10px;
}

#clientContactSearch {
  width: 100%;
  min-height: 40px;
  margin-bottom: 0;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.client-list-panel {
  display: grid;
  gap: 12px;
  padding-right: 14px;
  border-right: 1px solid var(--line);
}

.client-filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.client-filter-row.compact {
  margin-bottom: 0;
}

.client-filter-tabs button,
.client-profile-tabs button {
  min-height: 32px;
  padding: 0 10px;
  color: var(--ink);
  background: #fbfaf7;
  border: 1px solid var(--line);
  border-radius: 7px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.client-filter-row.compact button {
  min-height: 30px;
  padding: 6px 8px;
  font-size: 12px;
}

.client-filter-tabs button.active,
.client-profile-tabs button.active {
  color: white;
  background: var(--moss);
  border-color: var(--moss);
}

.client-lead-list,
.saved-clients-list {
  display: grid;
  gap: 8px;
  max-height: 520px;
  overflow: auto;
}

.client-lead-card {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 10px;
  color: var(--ink);
  background: white;
  border: 1px solid #dce5dc;
  border-radius: 10px;
  text-align: left;
  cursor: pointer;
}

.client-lead-card strong,
.client-lead-card span,
.client-lead-card small {
  white-space: normal;
}

.client-lead-card em {
  justify-self: start;
  margin-top: 4px;
  padding: 6px 10px;
  color: #2368b1;
  background: #f4f9ff;
  border: 1px solid #c7ddf4;
  border-radius: 6px;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.client-lead-card.active {
  background: #edf6ef;
  border-color: var(--moss);
  box-shadow: 0 0 0 2px rgba(70, 98, 77, 0.14);
}

.client-lead-card strong,
.client-lead-card span,
.client-lead-card small {
  display: block;
}

.client-lead-card span,
.client-lead-card small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.client-profile {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.client-profile-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.client-profile-head h3 {
  margin: 0;
  color: var(--ink);
  font-size: 24px;
}

.client-profile-head span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.client-quick-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.client-quick-actions button {
  min-height: 34px;
  padding: 0 10px;
  color: #2368b1;
  background: #f4f9ff;
  border: 1px solid #8db9e5;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.client-quick-actions button:hover {
  box-shadow: 0 0 0 2px rgba(35, 104, 177, 0.12);
}

.client-quick-actions button:disabled {
  color: #7e858b;
  background: #e3e5e7;
  border-color: #d3d6d8;
  cursor: not-allowed;
  box-shadow: none;
}

.client-profile-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.client-panel[hidden] {
  display: none;
}

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

.client-lead-form label,
.client-note-entry {
  display: grid;
  gap: 6px;
}

.client-lead-form label span,
.client-note-entry span {
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.client-lead-form input,
.client-lead-form select,
.client-lead-form textarea,
.client-note-entry textarea {
  width: 100%;
}

.client-notes-field {
  grid-column: span 2;
}

.client-buyer-representation {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 2px 0;
  padding: 13px;
  background: #f7faf8;
  border: 1px solid #cbd9cf;
  border-radius: 8px;
}

.client-buyer-representation[hidden] {
  display: none;
}

.client-buyer-representation legend {
  padding: 0 6px;
  color: var(--navy);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.client-field-help {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
}

.client-buyer-agent-fields {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.client-buyer-agent-fields[hidden] {
  display: none;
}

.client-notes-field textarea,
.client-note-entry textarea {
  min-height: 78px;
}

.client-buyer-only-note {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.client-calculator-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.client-saved-listing-tools {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 14px;
}

.client-saved-listing-tools label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  font-weight: 800;
}

.client-saved-listing-tools select {
  width: 100%;
  min-height: 42px;
}

.client-saved-listings {
  display: grid;
  gap: 10px;
}

.client-saved-listing-card {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 13px;
  border: 1px solid var(--line);
  border-left: 5px solid #d49a22;
  border-radius: 10px;
  background: #fffaf0;
}

.client-saved-listing-card > div:first-child,
.client-linked-calculator-summary {
  display: grid;
  gap: 4px;
}

.client-saved-listing-card span,
.client-linked-calculator-summary span,
.client-linked-calculator-summary small {
  color: var(--muted);
}

.client-saved-listing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}

.client-saved-listing-actions button {
  min-height: 36px;
}

.client-linked-calculator-summary {
  margin-bottom: 12px;
  padding: 13px;
  border: 1px solid #bfdbc6;
  border-radius: 10px;
  background: #f0f8f2;
}

@media (max-width: 760px) {
  .client-saved-listing-tools,
  .client-calculator-links {
    grid-template-columns: 1fr;
  }

  .client-saved-listing-card {
    flex-direction: column;
  }
}

.crm-workspace {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(320px, 1.3fr) minmax(260px, 0.9fr);
  gap: 16px;
  align-items: start;
}

.matrix-search,
.matrix-results,
.call-panel {
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.matrix-search {
  display: grid;
  gap: 12px;
}

.matrix-table {
  display: grid;
  gap: 8px;
}

.matrix-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.matrix-row.active {
  border-color: var(--moss);
  box-shadow: 0 0 0 2px rgba(70, 98, 77, 0.18);
}

.matrix-agent-button {
  display: grid;
  grid-template-columns: minmax(200px, 1.5fr) minmax(130px, 0.8fr) minmax(130px, 0.8fr) minmax(120px, 0.7fr);
  gap: 12px;
  align-items: center;
  width: 100%;
  min-height: 66px;
  padding: 12px;
  color: var(--ink);
  background: #fbfaf7;
  border: 0;
  text-align: left;
}

.matrix-agent-button small,
.active-agent span,
.call-note span,
.empty-state {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.matrix-status {
  justify-self: start;
  padding: 6px 9px;
  background: #edf2ee;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
}

.call-panel {
  display: grid;
  gap: 14px;
}

.active-agent {
  display: grid;
  gap: 7px;
  padding: 14px;
  background: #f3f7f3;
  border: 1px solid #d8e2d8;
  border-radius: 8px;
}

.active-agent strong {
  font-size: 20px;
}

.active-agent a {
  color: var(--navy);
  font-weight: 700;
  text-decoration: none;
}

.active-agent p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.quick-actions button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfaf7;
  font-weight: 700;
}

.call-log {
  display: grid;
  gap: 10px;
  max-height: 260px;
  overflow: auto;
}

.call-note {
  display: grid;
  gap: 4px;
  padding: 11px;
  background: #f7f5ef;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.call-note p {
  margin: 0;
  color: var(--ink);
  line-height: 1.4;
}

.empty-state {
  padding: 20px;
  background: #fbfaf7;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.buyer-wish-table-head button {
  min-height: 36px;
  padding-inline: 12px;
}

.buyer-wishlist-status {
  display: none;
  margin: -4px 0 14px;
  padding: 9px 11px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 800;
}

.buyer-wishlist-status.visible {
  display: block;
}

.buyer-wishlist-status.success {
  color: #214c32;
  background: #e5f2e8;
  border: 1px solid #bfdbc6;
}

.buyer-wishlist-status.error {
  color: #733126;
  background: #fff0ec;
  border: 1px solid #e5b9ad;
}

.buyer-wishlist-workspace {
  display: grid;
  grid-template-columns: minmax(210px, 260px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.buyer-list-panel {
  display: grid;
  gap: 10px;
  padding-right: 14px;
  border-right: 1px solid var(--line);
}

.buyer-list-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 34px;
}

.buyer-list-heading span {
  display: inline-grid;
  min-width: 28px;
  min-height: 28px;
  place-items: center;
  color: var(--navy);
  background: var(--sky);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 900;
}

.buyer-wish-list {
  display: grid;
  gap: 8px;
  max-height: 720px;
  overflow: auto;
}

.buyer-wish-list-item {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 11px;
  color: var(--ink);
  background: #fbfaf7;
  border: 1px solid var(--line);
  border-radius: 8px;
  text-align: left;
}

.buyer-wish-list-item.active {
  background: #edf6ef;
  border-color: var(--moss);
  box-shadow: 0 0 0 2px rgba(70, 98, 77, 0.14);
}

.buyer-wish-list-item strong,
.buyer-wish-list-item span,
.buyer-wish-list-item small {
  display: block;
}

.buyer-wish-list-item span,
.buyer-wish-list-item small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.buyer-wish-list-item .buyer-status {
  justify-self: start;
  padding: 4px 7px;
  color: #214c32;
  background: #e5f2e8;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 900;
}

.buyer-wishlist-editor {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.buyer-details-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.buyer-notes-field {
  grid-column: span 2;
}

.buyer-notes-field textarea {
  min-height: 72px;
}

.buyer-wish-table-wrap {
  display: grid;
  gap: 10px;
}

.buyer-wish-table-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.buyer-wish-table-head strong,
.buyer-wish-table-head span {
  display: block;
}

.buyer-custom-row-panel {
  display: grid;
  justify-items: start;
  gap: 9px;
  padding-top: 2px;
}

.buyer-custom-row-form {
  display: grid;
  grid-template-columns: minmax(230px, 1fr) auto;
  align-items: end;
  gap: 10px;
  width: min(620px, 100%);
  padding: 12px;
  background: #f8fbff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.buyer-custom-row-form[hidden] {
  display: none;
}

.buyer-custom-row-form label {
  display: grid;
  gap: 6px;
}

.buyer-custom-row-form label span {
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.buyer-custom-row-form input {
  width: 100%;
  min-width: 0;
}

.buyer-custom-row-form .button-row {
  display: flex;
  gap: 7px;
}

.buyer-wish-table-head span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.buyer-wish-table-panel {
  display: grid;
  gap: 10px;
}

.buyer-wish-table-panel[hidden] {
  display: none;
}

.buyer-wish-table-scroll {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.buyer-wish-table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
  background: white;
}

.buyer-wish-table th,
.buyer-wish-table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  vertical-align: middle;
}

.buyer-wish-table th:last-child,
.buyer-wish-table td:last-child {
  border-right: 0;
}

.buyer-wish-table tbody tr:last-child td {
  border-bottom: 0;
}

.buyer-wish-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: var(--navy);
  background: #eef3f5;
  font-size: 11px;
  line-height: 1.25;
  text-align: left;
  text-transform: uppercase;
}

.buyer-wish-table th:not(:first-child):not(:last-child),
.buyer-wish-table td:not(:first-child):not(:last-child) {
  width: 118px;
  text-align: center;
}

.buyer-wish-feature {
  min-width: 180px;
  font-weight: 800;
}

.buyer-wish-feature.custom {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
}

.buyer-wish-feature input,
.buyer-wish-notes {
  min-height: 34px;
  padding: 7px 8px;
  font-size: 12px;
}

.remove-buyer-wish-row {
  min-height: 32px;
  padding: 0 8px;
  color: #733126;
  background: #fff0ec;
  border: 1px solid #e5b9ad;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 800;
}

.buyer-wish-priority {
  display: inline-grid;
  min-height: auto;
  place-items: center;
}

.buyer-wish-priority input {
  width: 18px;
  min-height: 18px;
  margin: 0;
  padding: 0;
  accent-color: var(--moss);
}

.document-center {
  grid-column: 1 / -1;
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.non-mls-uploader {
  grid-column: 1 / -1;
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.state-market-profile {
  grid-column: 1 / -1;
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.calculator-group {
  grid-column: 1 / -1;
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.calculator-jump-grid,
.client-panel-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.calculator-jump-grid a {
  display: grid;
  gap: 6px;
  min-height: 92px;
  align-content: start;
  padding: 14px;
  color: var(--ink);
  background: #fbfaf7;
  border: 1px solid var(--line);
  border-radius: 8px;
  text-decoration: none;
}

.calculator-jump-grid a strong {
  font-size: 15px;
}

.calculator-jump-grid a span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.calculator-jump-grid a:hover {
  border-color: #8db9e5;
  box-shadow: 0 0 0 2px rgba(35, 104, 177, 0.12);
}

.client-checklist-card {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
  padding: 14px;
  background: #fbfaf7;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.client-checklist-card span,
.client-checklist-card small {
  color: var(--muted);
  line-height: 1.45;
}

.listing-checklist-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px;
  background: #fbfaf7;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.listing-checklist-summary strong {
  color: var(--ink);
  font-size: 12px;
}

.listing-checklist-summary span,
.listing-checklist-summary small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.state-market-form,
.compliance-item-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.state-market-form label,
.compliance-item-form label {
  display: grid;
  gap: 6px;
}

.state-market-form label span,
.compliance-item-form label span {
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.state-market-wide {
  grid-column: span 2;
}

.state-market-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: end;
}

.private-listing-warning {
  margin: 12px 0;
  padding: 11px 12px;
  color: #6f4c12;
  background: #fff6df;
  border: 1px solid #efd28d;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

.developer-mode-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 12px;
  padding: 12px;
  background: #fff4d8;
  border: 1px solid #efd18b;
  border-radius: 8px;
}

.developer-mode-panel div {
  display: grid;
  gap: 4px;
}

.developer-mode-panel strong {
  color: #6d3f08;
}

.developer-mode-panel span {
  color: #7b6740;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.4;
}

.agent-profile-settings {
  display: grid;
  gap: 12px;
  margin: 14px 0;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.agent-profile-panel {
  display: grid;
  gap: 10px;
}

.agent-profile-panel[hidden] {
  display: none;
}

.listing-profile-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
  padding: 12px;
  background: #eef5ef;
  border: 1px solid #d4e3d7;
  border-radius: 8px;
}

.listing-profile-line span {
  color: #244532;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.35;
}

.home-customizer {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.home-customizer .section-head.compact {
  align-items: center;
}

.home-customizer-panel {
  display: grid;
  gap: 10px;
}

.home-customizer-panel[hidden] {
  display: none;
}

.home-customizer-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.home-customizer-toolbar p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.4;
}

.home-tool-order-list {
  display: grid;
  gap: 8px;
}

.home-tool-order-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px;
  background: #fbfaf7;
  border: 1px solid var(--line);
  border-radius: 8px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, opacity 0.16s ease, transform 0.16s ease;
}

.home-tool-order-row.is-hidden {
  background: #f1f3f0;
  opacity: 0.76;
}

.home-tool-order-row.dragging {
  opacity: 0.42;
  transform: scale(0.99);
}

.home-tool-order-row.drag-over {
  border-color: #2368b1;
  box-shadow: 0 -3px 0 #2368b1;
}

.home-tool-order-row.drag-over.drop-after {
  box-shadow: 0 3px 0 #2368b1;
}

.home-tool-drag-handle {
  display: inline-grid;
  width: 32px;
  height: 32px;
  place-items: center;
  color: #5f6b61;
  background: #eef4ee;
  border: 1px solid var(--line);
  border-radius: 7px;
  cursor: grab;
  font-size: 17px;
  font-weight: 900;
  line-height: 1;
  user-select: none;
}

.home-tool-order-row:active .home-tool-drag-handle {
  cursor: grabbing;
}

.home-tool-order-row div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.home-tool-order-row button {
  min-height: 32px;
  padding: 0 10px;
  color: #2368b1;
  background: #f4f9ff;
  border: 1px solid #8db9e5;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 800;
}

.home-tool-order-row button:disabled {
  color: var(--muted);
  background: #ecefeb;
  border-color: var(--line);
  cursor: not-allowed;
}

.compliance-builder {
  display: grid;
  gap: 14px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.deal-checklist-head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.deal-checklist-summary {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) auto auto minmax(180px, 0.8fr);
  gap: 10px;
  align-items: center;
  padding: 12px;
  background: #f7faf8;
  border: 1px solid #cbd9cf;
  border-radius: 8px;
}

.deal-checklist-summary strong,
.deal-checklist-summary span,
.deal-checklist-summary b {
  display: block;
}

.deal-checklist-summary strong {
  color: var(--ink);
  font-size: 15px;
}

.deal-checklist-summary span,
.deal-checklist-next {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.deal-checklist-summary-stat {
  min-width: 92px;
  padding: 8px 10px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.deal-checklist-summary-stat b {
  color: var(--navy);
  font-size: 16px;
}

.deal-checklist-next {
  padding: 8px 10px;
  background: #fbfaf7;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.deal-checklist-panel {
  display: grid;
  gap: 12px;
}

.deal-checklist-panel[hidden] {
  display: none;
}

.compliance-list {
  display: grid;
  gap: 12px;
}

.compliance-category {
  display: grid;
  gap: 8px;
}

.compliance-category h3 {
  margin: 0;
  color: var(--navy);
  font-size: 15px;
}

.compliance-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  background: #fbfaf7;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.deal-check-complete {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.deal-check-complete input {
  width: 18px;
  min-height: 18px;
  margin: 0;
  accent-color: var(--moss);
}

.compliance-item.active {
  background: #edf6ef;
  border-color: var(--moss);
}

.compliance-item > button {
  display: grid;
  gap: 3px;
  color: var(--ink);
  background: transparent;
  border: 0;
  text-align: left;
  cursor: pointer;
}

.compliance-item span,
.compliance-item small {
  color: var(--muted);
  font-size: 12px;
}

.compliance-item div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.compliance-item div button {
  min-height: 30px;
  padding: 0 8px;
  color: #2368b1;
  background: #f4f9ff;
  border: 1px solid #8db9e5;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 800;
}

.mortgage-calculator {
  grid-column: 1 / -1;
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.mortgage-calculator-head {
  align-items: flex-start;
}

.mortgage-listing-address {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.mortgage-actions,
.mortgage-quick-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mortgage-calculator .btn,
.mortgage-quick-buttons button,
.estimate-listing-payment {
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid transparent;
  border-radius: 7px;
  font-weight: 800;
  cursor: pointer;
}

.mortgage-calculator .btn-success {
  color: white;
  background: #2f7d4c;
  border-color: #2f7d4c;
}

.mortgage-calculator .btn-info {
  color: white;
  background: #147f87;
  border-color: #147f87;
}

.mortgage-calculator .btn-outline,
.mortgage-quick-buttons button {
  color: #2368b1;
  background: #f4f9ff;
  border-color: #8db9e5;
}

.mortgage-quick-buttons button.active {
  color: white;
  background: #2368b1;
  border-color: #2368b1;
}

.mortgage-status {
  min-height: 20px;
  margin: -2px 0 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.mortgage-status.success {
  color: #2f6d43;
}

.mortgage-status.error {
  color: #a32f2f;
}

.mortgage-calculator-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.75fr);
  gap: 18px;
  align-items: start;
}

.mortgage-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
}

.mortgage-form label,
.mortgage-quick-group {
  display: grid;
  gap: 6px;
}

.mortgage-form label span,
.mortgage-quick-group > span {
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.mortgage-form input,
.mortgage-form select {
  width: 100%;
}

.mortgage-form input[readonly] {
  color: var(--navy);
  background: #eef2f5;
  font-weight: 800;
}

.mortgage-wide-field {
  grid-column: 1 / -1;
}

.mortgage-results {
  overflow: hidden;
  background: #f7faf8;
  border: 1px solid #cbd9cf;
  border-radius: 8px;
}

.mortgage-payment-total {
  display: grid;
  gap: 5px;
  padding: 18px;
  color: white;
  background: var(--moss);
}

.mortgage-payment-total span {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.mortgage-payment-total strong {
  font-size: 30px;
  line-height: 1.1;
}

.mortgage-results dl {
  margin: 0;
  padding: 8px 16px 13px;
}

.mortgage-results dl div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid #dbe4dd;
}

.mortgage-results dl div:last-child {
  border-bottom: 0;
}

.mortgage-results dt {
  color: var(--muted);
  font-size: 13px;
}

.mortgage-results dd {
  margin: 0;
  color: var(--ink);
  font-weight: 900;
  text-align: right;
}

.mortgage-disclaimer {
  margin: 16px 0 0;
  padding-top: 12px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 11px;
  line-height: 1.5;
}

.uploaded-listing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.uploaded-listing-actions button,
.listing-status-actions button,
.listing-preview-actions button {
  min-height: 36px;
  padding: 0 13px;
  color: #2368b1;
  background: #f4f9ff;
  border: 1px solid #8db9e5;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 800;
}

.uploaded-listing-actions button,
.uploaded-listing .estimate-listing-payment,
.uploaded-listing .delete-listing-button {
  justify-self: start;
}

.uploaded-listing .estimate-listing-payment {
  color: #2368b1;
  background: #f4f9ff;
  border-color: #8db9e5;
}

.uploaded-listing .delete-listing-button {
  min-height: 36px;
  padding: 0 13px;
  color: #ffffff;
  background: #bd3434;
  border: 1px solid #bd3434;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 800;
}

.uploaded-listing .delete-listing-button:hover {
  background: #a92e2e;
  border-color: #a92e2e;
}

.quick-calculator {
  grid-column: 1 / -1;
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.quick-calculator-head {
  align-items: flex-start;
}

.quick-calculator-head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.quick-calculator .btn {
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid transparent;
  border-radius: 7px;
  font-weight: 800;
  cursor: pointer;
}

.quick-calculator .btn-info {
  color: white;
  background: #147f87;
  border-color: #147f87;
}

.quick-calculator-shell {
  display: grid;
  grid-template-columns: minmax(280px, 0.75fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.quick-calculator-main {
  display: grid;
  gap: 10px;
}

.quick-calculator-display {
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: flex-end;
  overflow: hidden;
  padding: 14px 16px;
  color: white;
  background: var(--navy);
  border-radius: 8px;
  font-size: 38px;
  font-weight: 900;
  letter-spacing: 0;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quick-calculator-keys {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.quick-calculator-keys button,
.quick-calculator-quick-buttons button {
  min-height: 54px;
  padding: 0 12px;
  color: var(--ink);
  background: #fbfaf7;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 18px;
  font-weight: 900;
  cursor: pointer;
}

.quick-calculator-keys button:hover,
.quick-calculator-quick-buttons button:hover {
  border-color: #8db9e5;
  box-shadow: 0 0 0 2px rgba(35, 104, 177, 0.12);
}

.quick-calculator-keys [data-quick-calc-action],
.quick-calculator-keys [data-quick-calc-value="/"],
.quick-calculator-keys [data-quick-calc-value="*"],
.quick-calculator-keys [data-quick-calc-value="-"],
.quick-calculator-keys [data-quick-calc-value="+"] {
  color: #2368b1;
  background: #f4f9ff;
  border-color: #8db9e5;
}

.quick-calculator-keys .quick-calc-equals {
  grid-column: span 2;
  color: white;
  background: var(--moss);
  border-color: var(--moss);
}

.quick-calculator-shortcuts {
  display: grid;
  gap: 12px;
  padding: 16px;
  background: #f7faf8;
  border: 1px solid #cbd9cf;
  border-radius: 8px;
}

.quick-calculator-shortcuts h3 {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
}

.quick-calculator-quick-buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.quick-calculator-quick-buttons button {
  min-height: 46px;
  color: #2368b1;
  background: #f4f9ff;
  border-color: #8db9e5;
  font-size: 13px;
}

.quick-calculator-status {
  min-height: 18px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.quick-calculator-status.success {
  color: #2f6d43;
}

.quick-calculator-status.error {
  color: #a32f2f;
}

.commission-calculator {
  grid-column: 1 / -1;
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.commission-calculator-head {
  align-items: flex-start;
}

.commission-calculator-head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.commission-actions,
.commission-quick-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.commission-calculator .btn,
.commission-quick-buttons button {
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid transparent;
  border-radius: 7px;
  font-weight: 800;
  cursor: pointer;
}

.commission-calculator .btn-info {
  color: white;
  background: #147f87;
  border-color: #147f87;
}

.commission-calculator .btn-outline,
.commission-quick-buttons button {
  color: #2368b1;
  background: #f4f9ff;
  border-color: #8db9e5;
}

.commission-quick-buttons button.active {
  color: white;
  background: #2368b1;
  border-color: #2368b1;
}

.commission-status {
  min-height: 20px;
  margin: -2px 0 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.commission-status.success {
  color: #2f6d43;
}

.commission-status.error {
  color: #a32f2f;
}

.commission-calculator-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.75fr);
  gap: 18px;
  align-items: start;
}

.commission-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
}

.commission-form label,
.commission-quick-group {
  display: grid;
  gap: 6px;
}

.commission-form label span,
.commission-quick-group > span {
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.commission-form input,
.commission-form select {
  width: 100%;
}

.commission-wide-field {
  grid-column: 1 / -1;
}

.commission-results {
  overflow: hidden;
  background: #f7faf8;
  border: 1px solid #cbd9cf;
  border-radius: 8px;
}

.commission-net-total {
  display: grid;
  gap: 5px;
  padding: 18px;
  color: white;
  background: var(--moss);
}

.commission-net-total span {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.commission-net-total strong {
  font-size: 30px;
  line-height: 1.1;
}

.commission-results dl {
  margin: 0;
  padding: 8px 16px 13px;
}

.commission-results dl div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid #dbe4dd;
}

.commission-results dl div:last-child {
  border-bottom: 0;
}

.commission-results dt {
  color: var(--muted);
  font-size: 13px;
}

.commission-results dd {
  margin: 0;
  color: var(--ink);
  font-weight: 900;
  text-align: right;
}

.commission-disclaimer {
  margin: 16px 0 0;
  padding-top: 12px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 11px;
  line-height: 1.5;
}

.marketing-center {
  grid-column: 1 / -1;
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.marketing-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0 16px;
}

.marketing-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.marketing-tabs button {
  min-height: 36px;
  padding: 0 12px;
  color: var(--ink);
  background: #fbfaf7;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 800;
}

.marketing-tabs button.active {
  color: white;
  background: var(--navy);
}

.marketing-flow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
  padding: 12px;
  background: #fbfaf7;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.marketing-flow span {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  color: var(--navy);
  background: #eef3f5;
  border: 1px solid #d4e1e7;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
}

.marketing-flow span:not(:last-child)::after {
  margin-left: 8px;
  color: var(--muted);
  content: ">";
}

.agent-branding {
  display: grid;
  gap: 10px;
  padding: 14px;
  margin-bottom: 16px;
  background: #f3f7f3;
  border: 1px solid #d8e2d8;
  border-radius: 12px;
}

.marketing-branding-card.collapsed {
  padding: 12px;
}

.marketing-branding-card #brandingStatus {
  justify-self: start;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.marketing-branding-card.collapsed #brandingStatus {
  display: none;
}

.marketing-branding-card [data-marketing-branding-body][hidden] {
  display: none;
}

.branding-form,
.format-controls,
.generate-flow,
.compliance-fields {
  display: grid;
  gap: 10px;
}

.branding-form,
.agent-branding-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.agent-branding-grid input,
.agent-branding-grid select {
  width: 100%;
  min-height: 42px;
}

.agent-branding-grid input[type="hidden"] {
  display: none;
}

.branding-upload-grid {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 10px;
}

.branding-upload-card {
  min-height: 130px;
  padding: 12px;
  background: #fbfbf7;
  border: 1px dashed #d6ddd6;
  border-radius: 12px;
}

.branding-upload-card label {
  display: block;
  margin: 0;
  font-weight: 900;
}

.branding-upload-card p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.branding-upload-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.branding-upload-card input[type="file"] {
  position: static;
  width: 100%;
  max-width: 280px;
  height: auto;
  overflow: visible;
  clip: auto;
}

.branding-upload-card button {
  min-height: 34px;
}

.branding-save-row {
  display: flex;
  grid-column: 1 / -1;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.branding-save-row p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.branding-image-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 70px;
  margin: 8px 0;
  overflow: hidden;
  background: white;
  border: 1px solid #e1e6df;
  border-radius: 10px;
  color: var(--muted);
  font-size: 12px;
}

.branding-image-preview img {
  max-width: 180px;
  max-height: 60px;
  object-fit: contain;
}

.open-house-flyer .open-house-logo,
.flyer .brand-logo {
  max-width: 180px;
  max-height: 70px;
  object-fit: contain;
}

.generate-flow {
  grid-template-columns: minmax(0, 1fr) minmax(180px, 0.7fr) auto;
  padding: 12px;
  background: #f3f7f3;
  border: 1px solid #d8e2d8;
  border-radius: 8px;
}

.autofill-confirmation {
  padding: 10px 12px;
  color: #214c32;
  background: #e5f2e8;
  border: 1px solid #bfdbc6;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 800;
}

.listing-save-status {
  display: none;
  grid-column: 1 / -1;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 800;
}

.listing-save-status.visible {
  display: block;
}

.listing-status-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.listing-save-status.success {
  color: #214c32;
  background: #e5f2e8;
  border: 1px solid #bfdbc6;
}

.listing-save-status.error {
  color: #733126;
  background: #fff0ec;
  border: 1px solid #e5b9ad;
}

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

.customize-design {
  padding: 12px;
  background: #fbfaf7;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.customize-design summary {
  cursor: pointer;
  color: var(--navy);
  font-weight: 900;
}

.customize-design .format-controls {
  margin-top: 12px;
}

.toggle-field {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  min-height: 42px;
  padding: 10px 12px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.toggle-field input {
  width: 18px;
  min-height: 18px;
  padding: 0;
}

.photo-slot-controls {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 12px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.photo-slot-controls legend {
  padding: 0 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.agent-photo-adjustment-panel {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid #d9d2c8;
  border-radius: 10px;
  background: #fff;
}

.agent-photo-adjustment-panel .section-header-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.agent-photo-adjustment-panel .section-header-row strong,
.agent-photo-adjustment-panel .section-header-row small {
  display: block;
}

.agent-photo-adjustment-panel .section-header-row small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.agent-photo-adjustment-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 12px;
}

.agent-photo-adjustment-group {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #eee7dd;
}

.agent-photo-adjustment-group h5 {
  margin: 0 0 10px;
  font-size: 14px;
}

.agent-photo-adjustment-group label {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 13px;
  font-weight: 600;
}

.agent-photo-adjustment-group input[type="range"] {
  width: 100%;
  margin-top: 5px;
}

.agent-photo-adjustment-group button {
  margin-top: 12px;
}

@media (max-width: 760px) {
  .agent-photo-adjustment-grid {
    grid-template-columns: 1fr;
  }
}

.slot-control {
  display: grid;
  gap: 8px;
  padding: 10px;
  background: #fbfaf7;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.slot-control strong {
  font-size: 13px;
}

.slot-control .ghost-btn {
  min-height: 34px;
}

.photo-url-field,
.photo-upload-field {
  min-width: 0;
}

.photo-upload-field {
  padding: 11px;
  background: #f3f7f3;
  border: 1px dashed #b8cdbd;
  border-radius: 8px;
}

.photo-upload-field input[type="file"] {
  min-height: auto;
  padding: 8px;
  background: white;
}

.photo-upload-field small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.photo-preview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  min-height: 124px;
  align-items: stretch;
  padding: 12px;
  color: var(--muted);
  background:
    linear-gradient(135deg, rgba(34, 50, 71, 0.78), rgba(70, 98, 77, 0.68)),
    #eef3f5;
  background-position: center;
  background-size: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
}

.photo-preview.has-photo {
  color: var(--ink);
  background: #f8faf8;
}

.photo-preview > span {
  place-self: center;
  padding: 7px 10px;
  background: rgba(255, 255, 255, 0.88);
  border-radius: 8px;
}

.photo-preview.has-photo > span {
  color: white;
  background: rgba(24, 33, 29, 0.58);
}

.listing-photo-thumb {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 8px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--soft-shadow);
}

.listing-photo-thumb.main {
  border-color: #2f6f48;
  box-shadow: 0 0 0 2px rgba(47, 111, 72, 0.14);
}

.listing-photo-thumb img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 6px;
  background: #eef1ed;
}

.listing-photo-thumb strong {
  color: var(--moss);
  font-size: 12px;
  line-height: 1.2;
}

.listing-photo-thumb span {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.listing-photo-thumb div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.listing-photo-thumb button {
  min-height: 30px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f7f9f7;
  color: var(--ink);
  font-size: 11px;
  font-weight: 850;
}

.listing-photo-thumb button[data-listing-photo-delete] {
  border-color: rgba(174, 55, 55, 0.35);
  background: #ae3737;
  color: white;
}

.listing-photo-thumb button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.listing-photo-manager-dialog {
  width: min(920px, calc(100vw - 28px));
  border: 0;
  border-radius: 12px;
  padding: 0;
}

.listing-photo-manager-card {
  display: grid;
  gap: 16px;
  padding: 18px;
  background: white;
}

.listing-photo-manager-card .photo-preview {
  min-height: 120px;
  background-image: none;
}

.compliance-fields {
  padding: 12px;
  background: #f7f5ef;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.compliance-fields label {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
}

.compliance-fields input[type="checkbox"] {
  width: 18px;
  min-height: 18px;
  margin-top: 2px;
}

.marketing-actions button,
.marketing-card {
  min-height: 42px;
  color: var(--ink);
  background: #fbfaf7;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 700;
}

.marketing-workspace {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(320px, 0.85fr) minmax(320px, 1fr);
  gap: 16px;
  align-items: start;
}

.marketing-library {
  display: grid;
  gap: 9px;
}

.chooser-label {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.marketing-card {
  display: grid;
  gap: 4px;
  padding: 12px;
  text-align: left;
}

.marketing-card.active,
.marketing-actions button.active {
  border-color: var(--moss);
  background: #edf6ef;
  box-shadow: 0 0 0 2px rgba(70, 98, 77, 0.16);
}

.marketing-card span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.marketing-layout-chooser {
  display: grid;
  gap: 10px;
  padding: 12px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.marketing-format-chooser,
.selected-design-actions {
  display: grid;
  gap: 10px;
  padding: 12px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.format-button-row,
.selected-design-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.format-choice {
  min-height: 42px;
  color: var(--ink);
  background: #fbfaf7;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 900;
}

.format-choice.active {
  color: white;
  background: var(--moss);
  border-color: var(--moss);
}

.customize-design h3,
.customize-subhead {
  grid-column: 1 / -1;
  margin: 6px 0 0;
  color: var(--ink);
  font-size: 14px;
}

.chooser-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.layout-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.layout-card {
  display: grid;
  gap: 4px;
  min-height: 86px;
  padding: 10px;
  color: var(--ink);
  background: #fbfaf7;
  border: 1px solid var(--line);
  border-radius: 8px;
  text-align: left;
}

.layout-card.active {
  border-color: var(--moss);
  background: #edf6ef;
  box-shadow: 0 0 0 2px rgba(70, 98, 77, 0.16);
}

.layout-card span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.marketing-builder,
.marketing-preview-panel {
  display: grid;
  gap: 12px;
  padding: 16px;
  background: #fbfaf7;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.marketing-preview-panel {
  position: sticky;
  top: 92px;
  max-height: calc(100vh - 116px);
  overflow: auto;
}

.preview-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.preview-actions .ghost-btn {
  min-height: 34px;
  padding: 0 10px;
}

.preview-zoom {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background: #ece8dc;
  border-radius: 8px;
}

.preview-zoom button {
  min-height: 30px;
  padding: 0 10px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 900;
}

.preview-zoom button.active {
  color: white;
  background: var(--navy);
}

.marketing-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.open-house-agent2-fields {
  display: contents;
}

.open-house-agent2-fields[hidden] {
  display: none;
}

.marketing-form label:has(textarea) {
  grid-column: 1 / -1;
}

.flyer-preview {
  overflow: auto;
  max-height: min(760px, 72vh);
  background: #e7e4da;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.flyer-preview .flyer {
  width: min(100%, 760px);
  margin: 0 auto;
}

.flyer-preview[data-preview-zoom="75"] .flyer {
  width: 760px;
  zoom: 0.75;
}

.flyer-preview[data-preview-zoom="100"] .flyer {
  width: 760px;
  zoom: 1;
}

.flyer-preview[data-preview-zoom="fit"] .flyer.square,
.flyer-preview[data-preview-zoom="fit"] .flyer.social {
  width: min(100%, 560px);
}

.flyer-preview[data-preview-zoom="fit"] .flyer.story {
  width: min(100%, 420px);
}

.flyer-preview.expanded {
  display: grid;
  justify-items: center;
  width: 100%;
  max-height: calc(100vh - 118px);
  overflow: auto;
  padding: clamp(14px, 3vw, 28px);
}

.flyer-preview.expanded .flyer {
  width: min(100%, 860px);
}

.flyer-preview.expanded .flyer.story {
  width: min(100%, 460px);
}

.flyer-preview.expanded .flyer.print {
  width: min(100%, 760px);
}

.flyer {
  --flyer-accent: var(--brick);
  --flyer-ink: var(--ink);
  --flyer-soft: #f7f5ef;
  --flyer-line: var(--line);
  --flyer-primary: var(--flyer-accent);
  --flyer-dark: var(--flyer-ink);
  --flyer-light: var(--flyer-soft);
  --flyer-tan: var(--flyer-line);
  --flyer-white: #ffffff;
  overflow: visible;
  background: white;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.flyer.social {
  aspect-ratio: 1 / 1;
}

.flyer.square {
  aspect-ratio: 1 / 1;
}

.flyer.story {
  aspect-ratio: 9 / 16;
  max-width: 420px;
  margin: 0 auto;
}

.flyer.print {
  aspect-ratio: 8.5 / 11;
}

.flyer.email {
  aspect-ratio: 4 / 5;
}

/* Compact only the square export capture so every flyer section remains visible. */
.flyer.export-square-fit .flyer-brandbar {
  grid-template-columns: 34px minmax(0, 1fr) 48px;
  gap: 8px;
  padding: 8px 10px;
}

.flyer.export-square-fit .flyer-brandbar.without-agent-photo {
  grid-template-columns: minmax(0, 1fr) 48px;
}

.flyer.export-square-fit .flyer-brandbar.without-logo {
  grid-template-columns: 34px minmax(0, 1fr);
}

.flyer.export-square-fit .flyer-brandbar.without-agent-photo.without-logo {
  grid-template-columns: minmax(0, 1fr);
}

.flyer.export-square-fit .brand-avatar {
  width: 34px;
  height: 34px;
}

.flyer.export-square-fit .brand-logo {
  width: 48px;
  height: 34px;
}

.flyer.export-square-fit .flyer-brandbar span {
  font-size: 10px;
}

.flyer.export-square-fit .flyer-photo {
  min-height: 180px;
  height: 180px;
}

.flyer.export-square-fit .flyer-body {
  gap: 6px;
  padding: 10px 14px;
}

.flyer.export-square-fit .flyer-badge {
  padding: 4px 8px;
  font-size: 10px;
}

.flyer.export-square-fit h3,
.flyer.export-square-fit.style-luxury h3,
.flyer.export-square-fit.style-bold h3 {
  font-size: 20px;
  line-height: 1.05;
}

.flyer.export-square-fit p {
  font-size: 12px;
  line-height: 1.25;
}

.flyer.export-square-fit .flyer-cta {
  padding: 6px 9px;
  font-size: 11px;
}

.flyer.export-square-fit .flyer-stats {
  gap: 5px;
}

.flyer.export-square-fit .flyer-stats span {
  padding: 4px 7px;
  font-size: 12px;
}

.flyer.export-square-fit .flyer-footer {
  gap: 1px;
  padding-top: 6px;
}

.flyer.export-square-fit .flyer-footer strong {
  font-size: 11px;
}

.flyer.export-square-fit .flyer-footer span,
.flyer.export-square-fit .flyer-footer small {
  font-size: 9px;
  line-height: 1.15;
}

.marketing-print-root {
  display: none;
}

.flyer.theme-blackGold {
  --flyer-accent: #c69b42;
  --flyer-ink: #151515;
  --flyer-soft: #f7f0dd;
  --flyer-line: #dfc98f;
  --flyer-primary: #151515;
  --flyer-dark: #050505;
  --flyer-light: #f7f0dd;
  --flyer-tan: #dfc98f;
}

.flyer.theme-brownCream,
.open-house-flyer.theme-brownCream {
  --flyer-primary: #7a4e2d;
  --flyer-dark: #4b2e1f;
  --flyer-light: #f7efe5;
  --flyer-accent: #b88945;
  --flyer-tan: #d8b894;
  --flyer-white: #ffffff;
  --flyer-ink: #4b2e1f;
  --flyer-soft: #f7efe5;
  --flyer-line: #d8b894;
}

.flyer.theme-blueWhite,
.flyer.theme-navyWhite {
  --flyer-accent: #255f9d;
  --flyer-ink: #162d47;
  --flyer-soft: #eef5fb;
  --flyer-line: #c9dcec;
  --flyer-primary: #255f9d;
  --flyer-dark: #162d47;
  --flyer-light: #eef5fb;
  --flyer-tan: #c9dcec;
}

.flyer.theme-greenWhite {
  --flyer-accent: #2f7045;
  --flyer-ink: #18331f;
  --flyer-soft: #eef7f0;
  --flyer-line: #c9dfcf;
  --flyer-primary: #2f7045;
  --flyer-dark: #18331f;
  --flyer-light: #eef7f0;
  --flyer-tan: #c9dfcf;
}

.flyer.theme-redWhite {
  --flyer-accent: #b33a32;
  --flyer-ink: #3b1d1b;
  --flyer-soft: #fff0ef;
  --flyer-line: #efcbc8;
  --flyer-primary: #b33a32;
  --flyer-dark: #3b1d1b;
  --flyer-light: #fff0ef;
  --flyer-tan: #efcbc8;
}

.flyer.theme-grayBlack {
  --flyer-accent: #4f545a;
  --flyer-ink: #161719;
  --flyer-soft: #f0f1f2;
  --flyer-line: #c7c9cc;
  --flyer-primary: #4f545a;
  --flyer-dark: #161719;
  --flyer-light: #f0f1f2;
  --flyer-tan: #c7c9cc;
}

.flyer.theme-custom {
  --flyer-accent: var(--moss);
  --flyer-ink: var(--navy);
  --flyer-soft: #f1f4ed;
  --flyer-line: #cfd9c8;
  --flyer-primary: var(--moss);
  --flyer-dark: var(--navy);
  --flyer-light: #f1f4ed;
  --flyer-tan: #cfd9c8;
}

.flyer-brandbar {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 58px;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  background: var(--flyer-soft);
  border-bottom: 1px solid var(--flyer-line);
}

.flyer-brandbar.without-agent-photo {
  grid-template-columns: minmax(0, 1fr) 58px;
}

.flyer-brandbar.without-logo {
  grid-template-columns: 42px minmax(0, 1fr);
}

.flyer-brandbar.without-agent-photo.without-logo {
  grid-template-columns: minmax(0, 1fr);
}

.brand-avatar,
.brand-logo {
  display: grid;
  place-items: center;
  background-color: white;
  background-position: center;
  background-size: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.brand-avatar {
  width: 42px;
  height: 42px;
}

.brand-logo {
  width: 58px;
  height: 42px;
  background-repeat: no-repeat;
  background-size: contain;
}

.flyer-brandbar span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.flyer-photo {
  display: grid;
  min-height: 220px;
  place-items: center;
  color: rgba(255, 255, 255, 0.85);
  background:
    linear-gradient(135deg, rgba(34, 50, 71, 0.82), rgba(155, 77, 60, 0.7)),
    var(--sky);
  background-position: center;
  background-size: cover;
  font-weight: 800;
}

.flyer-body {
  display: grid;
  gap: 11px;
  padding: 18px;
}

.flyer-badge {
  justify-self: start;
  padding: 6px 10px;
  color: white;
  background: var(--flyer-accent);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 900;
}

.flyer h3 {
  margin: 0;
  color: var(--flyer-ink);
  font-size: 26px;
  line-height: 1.1;
}

.flyer p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.flyer-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.flyer-stats span {
  padding: 6px 9px;
  background: var(--flyer-soft);
  border-radius: 8px;
  font-weight: 800;
}

.flyer-cta {
  justify-self: start;
  padding: 9px 12px;
  color: white;
  background: var(--flyer-accent);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.qr-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: var(--flyer-soft);
  border-radius: 8px;
}

.qr-box {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  padding: 6px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.qr-box img,
.qr-box svg {
  display: block;
  width: 100%;
  height: 100%;
}

.qr-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.qr-row.qr-warning span {
  color: #9b1c1c;
}

.flyer-footer {
  display: grid;
  gap: 2px;
  padding-top: 12px;
  border-top: 1px solid var(--flyer-line);
}

.flyer.font-serif,
.flyer.font-serif h3 {
  font-family: Georgia, "Times New Roman", serif;
}

.flyer.font-condensed h3,
.flyer.font-condensed strong,
.flyer.font-condensed b {
  font-family: "Arial Narrow", Impact, sans-serif;
  letter-spacing: 0;
}

.flyer.style-classic {
  border-color: #222;
}

.flyer.style-luxury .flyer-badge,
.flyer.style-luxury .flyer-cta {
  letter-spacing: 0;
}

.flyer.style-luxury h3 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 30px;
}

.flyer.style-clean .flyer-brandbar,
.flyer.style-clean .qr-row,
.flyer.style-clean .flyer-stats span {
  background: white;
  border: 1px solid var(--flyer-line);
}

.flyer.style-bold .flyer-badge,
.flyer.style-bold .flyer-cta {
  padding: 8px 13px;
  font-size: 14px;
}

.flyer.style-bold h3 {
  font-size: 32px;
}

.flyer.style-minimal {
  border-color: #ece9df;
}

.flyer.style-minimal .flyer-badge,
.flyer.style-minimal .flyer-cta {
  color: var(--flyer-accent);
  background: transparent;
  border: 1px solid var(--flyer-accent);
}

.flyer.style-minimal .flyer-photo {
  min-height: 190px;
}

.flyer-footer span,
.flyer-footer small,
.marketing-copy {
  color: var(--muted);
  font-size: 12px;
}

.open-house-flyer {
  display: grid;
  color: var(--flyer-dark);
  background: var(--flyer-white);
  border: 2px solid var(--flyer-dark);
}

.open-house-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 1fr);
  gap: 12px;
  align-items: center;
  padding: 14px 18px 8px;
}

.open-house-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.open-house-brand strong {
  font-size: clamp(20px, 3vw, 34px);
  line-height: 1;
}

.open-house-office {
  display: grid;
  gap: 3px;
  font-size: 16px;
}

.open-house-office strong {
  font-size: 18px;
}

.open-house-logo {
  display: grid;
  width: 150px;
  height: 55px;
  max-width: 180px;
  max-height: 70px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--muted);
  background-color: white;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  border: 1px solid var(--flyer-line);
  border-radius: 8px;
  font-size: 11px;
  font-weight: 900;
}

.open-house-hero-agents {
  display: grid;
  grid-template-columns: minmax(110px, 0.58fr) minmax(220px, 1.2fr);
  gap: 12px;
  align-items: end;
  padding: 0 18px;
}

.open-house-hero-agents.two-agents {
  grid-template-columns: minmax(110px, 0.58fr) minmax(220px, 1.2fr) minmax(110px, 0.58fr);
}

.open-house-agent-hero {
  display: grid;
  gap: 7px;
  justify-items: center;
}

.agent-hero-caption {
  display: grid;
  gap: 2px;
  width: 100%;
  color: var(--flyer-dark);
  text-align: center;
}

.agent-hero-caption strong,
.agent-hero-caption span,
.agent-hero-caption small {
  display: block;
  overflow-wrap: anywhere;
}

.agent-hero-caption strong {
  font-size: clamp(12px, 1.8vw, 18px);
  line-height: 1.05;
  font-weight: 950;
}

.agent-hero-caption span {
  font-size: clamp(10px, 1.4vw, 14px);
  font-weight: 800;
}

.agent-hero-caption small {
  font-size: 10px;
  font-weight: 800;
}

.agent-hero-photo {
  width: min(100%, 170px);
  min-height: 190px;
  background-color: #f1f1f1;
  border-radius: 0;
}

.agent-phone {
  font-size: clamp(18px, 2.6vw, 30px);
  font-weight: 950;
}

.open-house-sell-banner {
  display: grid;
  justify-items: center;
  gap: 8px;
  align-self: center;
  text-align: center;
}

.open-house-sell-banner span {
  display: block;
  width: 100%;
  padding: 10px 16px;
  color: var(--flyer-dark);
  background: linear-gradient(90deg, var(--flyer-accent), var(--flyer-tan), var(--flyer-accent));
  font-size: clamp(22px, 4vw, 38px);
  font-weight: 950;
  line-height: 1.05;
  text-transform: uppercase;
}

.open-house-sell-banner strong {
  font-size: clamp(17px, 2.6vw, 28px);
  line-height: 1.05;
}

.open-house-namebar {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  height: auto;
  min-height: 42px;
  overflow: visible;
  box-sizing: border-box;
  color: var(--flyer-white);
  background: var(--flyer-primary);
}

.open-house-namebar.two-names,
.open-house-namebar.two-agents {
  grid-template-columns: repeat(2, 1fr);
  align-items: start;
}

.open-house-namebar > div,
.open-house-namebar .agent-name-col {
  min-width: 0;
  overflow: visible;
  padding: 8px 18px;
  box-sizing: border-box;
}

.open-house-namebar > div:last-child,
.open-house-namebar .agent-name-col.right {
  text-align: right;
}

.open-house-namebar .agent-name-col.left {
  text-align: left;
}

.agent1-header,
.agent2-header {
  display: grid;
  gap: 2px;
  min-width: 0;
  overflow: visible;
}

.agent1-topline,
.agent2-topline {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.agent2-topline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 10px;
  width: 100%;
}

.agent-phone-slot {
  justify-self: start;
  min-width: 0;
  font-size: 8.5px;
  font-weight: 700;
  white-space: nowrap;
}

.agent2-name {
  justify-self: end;
  text-align: right;
  white-space: nowrap;
}

.agent2-header {
  text-align: right;
}

.agent-name,
.agent-phone-line,
.agent-title {
  display: block;
}

.agent-phone-line {
  font-weight: 900;
  white-space: nowrap;
}

.agent-title {
  display: block !important;
  margin-top: 3px;
  color: inherit;
  font-size: 9px;
  line-height: 1.1;
  font-weight: 600;
  opacity: 0.95;
  white-space: normal;
  overflow: visible;
}

.open-house-namebar strong,
.open-house-namebar span,
.open-house-namebar small {
  display: block;
}

.open-house-namebar strong {
  font-size: clamp(18px, 2.7vw, 30px);
  line-height: 1;
}

.open-house-namebar span {
  font-size: clamp(11px, 1.8vw, 18px);
  font-weight: 800;
}

.open-house-namebar small {
  margin-top: 2px;
  overflow-wrap: anywhere;
  opacity: 0.72;
  font-size: 10px;
  font-weight: 700;
}

.open-house-property-stage {
  position: relative;
  display: grid;
  min-height: 430px;
  background: var(--flyer-light);
}

.open-house-photo-slot {
  display: grid;
  min-height: 128px;
  place-items: center;
  color: rgba(255, 255, 255, 0.86);
  background:
    linear-gradient(135deg, rgba(34, 50, 71, 0.82), rgba(155, 77, 60, 0.7)),
    var(--sky);
  background-position: center;
  background-size: cover;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 900;
}

.open-house-photo-slot span {
  padding: 7px 10px;
  background: rgba(24, 33, 29, 0.5);
  border-radius: 8px;
}

.open-house-photo-slot.has-photo > span,
.open-house-photo-slot.has-photo::before,
.open-house-photo-slot.has-photo::after,
.agent-hero-photo::before,
.agent-hero-photo::after {
  content: none !important;
  display: none !important;
  background: none !important;
}

.open-house-photo-slot.has-photo {
  box-shadow: none;
  filter: none;
}

.hidden-photo-slot {
  min-height: 80px;
  color: var(--muted);
  background: repeating-linear-gradient(135deg, var(--flyer-light), var(--flyer-light) 8px, var(--flyer-tan) 8px, var(--flyer-tan) 16px);
}

.main-property-slot {
  min-height: 430px;
  border-radius: 0;
}

.open-house-overlay-title {
  position: absolute;
  left: clamp(18px, 5vw, 70px);
  top: 42px;
  display: grid;
  gap: 4px;
  max-width: min(58%, 520px);
  color: var(--flyer-accent);
  text-shadow: 3px 3px 0 var(--flyer-dark);
  transform: rotate(-7deg);
}

.open-house-overlay-title strong {
  font-size: clamp(42px, 8vw, 82px);
  line-height: 0.85;
  font-style: italic;
  font-weight: 950;
}

.open-house-overlay-title span {
  font-size: clamp(24px, 4.5vw, 48px);
  line-height: 0.9;
  font-style: italic;
  font-weight: 950;
}

.open-house-side-rail {
  position: absolute;
  right: 22px;
  top: 72px;
  display: grid;
  gap: 12px;
  width: min(250px, 30%);
}

.open-house-price-box {
  padding: 10px 12px;
  color: var(--flyer-dark);
  background: var(--flyer-tan);
  border: 3px solid var(--flyer-tan);
  box-shadow: 0 0 0 2px var(--flyer-white);
}

.open-house-price-box span,
.open-house-price-box strong {
  display: block;
  font-size: clamp(18px, 2.7vw, 34px);
  line-height: 1;
  font-weight: 950;
}

.open-house-side-rail .open-house-photo-slot {
  min-height: 110px;
  border: 6px solid var(--flyer-white);
  border-radius: 0;
}

.open-house-bottom {
  display: grid;
  gap: 7px;
  padding: 10px 22px 12px;
  text-align: center;
}

.open-house-bottom h3 {
  margin: 0;
  color: var(--flyer-dark);
  font-size: clamp(24px, 4vw, 44px);
}

.open-house-bottom .flyer-stats {
  justify-content: center;
}

.open-house-bottom .flyer-stats span {
  color: var(--flyer-dark);
  background: var(--flyer-white);
}

.open-house-bottom-head {
  display: grid;
  gap: 7px;
  text-align: center;
}

.open-house-bottom-grid,
.open-house-bottom-row {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
}

.open-house-bottom-features,
.open-house-features-left,
.open-house-features-center,
.open-house-features-middle,
.open-house-contact-left {
  min-width: 0;
}

.open-house-bottom-qr {
  display: grid;
  justify-items: center;
  align-content: start;
}

.open-house-bottom-contact,
.open-house-contact-right {
  display: grid;
  gap: 8px;
  min-width: 0;
  color: var(--flyer-dark);
  text-align: left;
}

.open-house-contact-left {
  text-align: left;
}

.open-house-features-middle {
  text-align: left;
}

.open-house-qr-right {
  justify-self: end;
  text-align: center;
}

.open-house-contact-right {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
}

.open-house-contact-agent,
.open-house-contact-block,
.open-house-contact-meta {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.open-house-contact-agent + .open-house-contact-agent {
  padding-top: 7px;
  border-top: 1px solid var(--flyer-tan);
}

.open-house-contact-agent strong,
.open-house-contact-agent span,
.open-house-contact-agent small,
.open-house-contact-block strong,
.open-house-contact-block span,
.open-house-contact-block small,
.open-house-contact-meta span {
  display: block;
  overflow-wrap: anywhere;
}

.open-house-contact-agent strong,
.open-house-contact-block strong {
  color: var(--flyer-primary);
  font-size: clamp(14px, 2vw, 20px);
  line-height: 1.08;
  font-weight: 950;
}

.open-house-contact-agent small,
.open-house-contact-block small {
  font-size: clamp(10px, 1.5vw, 14px);
  font-weight: 750;
}

.open-house-bottom-contact span,
.open-house-contact-right span {
  overflow-wrap: anywhere;
  font-size: clamp(11px, 1.8vw, 17px);
  font-weight: 800;
  line-height: 1.25;
}

.open-house-features ul,
.open-house-features-left ul,
.open-house-features-center ul,
.open-house-features-middle ul {
  display: grid;
  gap: 3px;
  margin: 0;
  padding-left: 24px;
  text-align: left;
  font-size: clamp(15px, 2.3vw, 26px);
}

.open-house-bottom-cta {
  justify-self: center;
  text-align: center;
  font-size: clamp(18px, 2.8vw, 32px);
}

.open-house-bottom .qr-row {
  justify-self: center;
  max-width: 360px;
}

.open-house-bottom small {
  color: var(--flyer-dark);
  font-size: 11px;
  letter-spacing: 0;
  text-transform: uppercase;
}

.flyer.layout-luxuryGrid,
.flyer.layout-offMarketGold {
  --flyer-accent: #c69b42;
  --flyer-ink: #06172d;
  --flyer-soft: #fff8e3;
  --flyer-line: #d7af5d;
}

.flyer.layout-pinkResidential {
  --flyer-accent: #cf5a86;
  --flyer-ink: #302323;
  --flyer-soft: #fff4f7;
  --flyer-line: #efb9cc;
}

.flyer.layout-commercialBlue {
  --flyer-accent: #07518e;
  --flyer-ink: #08233f;
  --flyer-soft: #edf6fb;
  --flyer-line: #a9cde3;
}

.flyer.layout-rentalSocial {
  --flyer-accent: #8d9f62;
  --flyer-ink: #202618;
  --flyer-soft: #f5f7ed;
  --flyer-line: #cbd4aa;
}

.open-house-flyer.layout-cleanOpenHouse {
  border: 1px solid #1f2428;
}

.open-house-flyer.layout-cleanOpenHouse .open-house-top,
.open-house-flyer.layout-cleanOpenHouse .open-house-hero-agents,
.open-house-flyer.layout-cleanOpenHouse .open-house-namebar {
  display: none;
}

.open-house-flyer.layout-cleanOpenHouse .open-house-property-stage {
  min-height: 520px;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 18px;
  padding: 26px;
  background: white;
}

.open-house-flyer.layout-cleanOpenHouse .main-property-slot {
  min-height: 330px;
  border-radius: 0;
}

.open-house-flyer.layout-cleanOpenHouse .open-house-overlay-title {
  position: static;
  align-self: start;
  max-width: none;
  color: #111;
  text-align: center;
  text-shadow: none;
  transform: none;
}

.open-house-flyer.layout-cleanOpenHouse .open-house-overlay-title strong {
  font-size: clamp(36px, 7vw, 72px);
  font-style: normal;
}

.open-house-flyer.layout-cleanOpenHouse .open-house-overlay-title span {
  color: #222;
  font-size: clamp(20px, 3.8vw, 42px);
  font-style: normal;
}

.open-house-flyer.layout-cleanOpenHouse .open-house-side-rail {
  position: static;
  width: auto;
}

.open-house-flyer.layout-cleanOpenHouse .open-house-price-box {
  color: #111;
  background: white;
  border: 0;
  box-shadow: none;
  text-align: center;
}

.open-house-flyer.layout-luxuryGrid {
  color: #f8f0d2;
  background: #06172d;
  border-color: #d7af5d;
}

.open-house-flyer.layout-luxuryGrid .open-house-top {
  color: #f8f0d2;
  background: #06172d;
}

.open-house-flyer.layout-luxuryGrid .open-house-namebar,
.open-house-flyer.layout-luxuryGrid .open-house-price-box {
  color: #06172d;
  background: linear-gradient(90deg, #b9862e, #ffe7a1);
}

.open-house-flyer.layout-luxuryGrid .open-house-bottom {
  color: #06172d;
  background: #fff8e3;
}

.open-house-flyer.layout-luxuryGrid .open-house-overlay-title {
  color: #fff2a9;
  text-shadow: 2px 2px 0 #06172d;
}

.open-house-flyer.layout-pinkResidential .open-house-namebar {
  background: #c85282;
}

.open-house-flyer.layout-pinkResidential .open-house-price-box,
.open-house-flyer.layout-pinkResidential .open-house-sell-banner span {
  color: #2b1b23;
  background: #f27fab;
  border-color: #f27fab;
}

.open-house-flyer.layout-pinkResidential .open-house-bottom {
  background: #fff4f7;
}

.open-house-flyer.layout-commercialBlue .open-house-top,
.open-house-flyer.layout-commercialBlue .open-house-bottom {
  background: #edf6fb;
}

.open-house-flyer.layout-commercialBlue .open-house-namebar,
.open-house-flyer.layout-commercialBlue .open-house-price-box {
  color: white;
  background: #07518e;
  border-color: #07518e;
}

.open-house-flyer.layout-commercialBlue .open-house-overlay-title {
  color: white;
  text-shadow: 3px 3px 0 #07518e;
}

.open-house-flyer.layout-offMarketGold {
  color: #06172d;
  background: #f8f4e8;
  border-color: #06172d;
}

.open-house-flyer.layout-offMarketGold .open-house-top,
.open-house-flyer.layout-offMarketGold .open-house-namebar {
  color: #f7db95;
  background: #06172d;
}

.open-house-flyer.layout-offMarketGold .open-house-sell-banner span,
.open-house-flyer.layout-offMarketGold .open-house-price-box {
  color: #06172d;
  background: #d7af5d;
  border-color: #d7af5d;
}

.open-house-flyer.layout-rentalSocial .open-house-top,
.open-house-flyer.layout-rentalSocial .open-house-bottom {
  background: #f5f7ed;
}

.open-house-flyer.layout-rentalSocial .open-house-namebar,
.open-house-flyer.layout-rentalSocial .open-house-price-box {
  background: #8d9f62;
}

.for-rent-flyer {
  display: grid;
  gap: 0;
  overflow: hidden;
  color: var(--flyer-ink);
  background: white;
  border: 2px solid var(--flyer-line);
}

.rent-topline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 16px;
  color: white;
  background: var(--flyer-accent);
  font-weight: 900;
}

.rent-brand {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.rent-brand strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rent-logo {
  display: grid;
  width: 56px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--muted);
  background-color: white;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  border-radius: 6px;
  font-size: 10px;
}

.rent-topline > span {
  font-size: 12px;
}

.rent-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(230px, 0.75fr);
  min-height: 360px;
}

.rent-main-photo {
  min-height: 360px;
  border-radius: 0;
}

.rent-hero-copy {
  display: grid;
  align-content: center;
  gap: 12px;
  padding: 22px;
  background: var(--flyer-soft);
}

.rent-hero-copy h3 {
  font-size: clamp(26px, 4vw, 46px);
}

.rent-price {
  color: var(--flyer-accent);
  font-size: clamp(34px, 6vw, 64px);
  line-height: 0.95;
}

.rent-photo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 10px;
  background: white;
}

.rent-photo-grid .open-house-photo-slot {
  min-height: 150px;
  border-radius: 0;
}

.rent-detail-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px;
  background: var(--flyer-line);
}

.rent-detail-row span {
  display: grid;
  gap: 2px;
  justify-items: center;
  padding: 12px 8px;
  background: white;
  text-align: center;
}

.rent-detail-row strong {
  font-size: 18px;
}

.rent-detail-row small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.rent-info-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.85fr);
  gap: 14px;
  padding: 16px;
}

.rent-info-grid p {
  margin-top: 6px;
}

.rent-agent-card {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  background: var(--flyer-soft);
  border: 1px solid var(--flyer-line);
  border-radius: 8px;
}

.rent-agent-photo {
  min-height: 112px;
}

.rent-agent-card span,
.rent-agent-card small,
.rent-footer small {
  color: var(--muted);
}

.rent-agent-card strong,
.rent-agent-card b {
  display: block;
}

.template-rentalFlyer .rent-hero {
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr);
}

.template-rentalSign .rent-detail-row {
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
}

.template-rentalFlyer .rent-hero-copy {
  position: relative;
  z-index: 2;
  isolation: isolate;
  min-width: 0;
  padding: 28px;
}

.template-rentalFlyer .rent-hero-copy h3 {
  max-width: 100%;
  overflow-wrap: normal;
  word-break: normal;
}

.template-rentalFlyer .rent-price {
  position: relative;
  z-index: 3;
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding-right: 16px;
  overflow: hidden;
  background: transparent;
  font-size: clamp(32px, 4.5vw, 54px);
  letter-spacing: 0;
  line-height: 1;
  white-space: nowrap;
}

.template-rentalFlyer > .rent-detail-row {
  width: 100%;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  background: transparent;
}

.template-rentalFlyer > .rent-detail-row > span {
  color: #17211e;
  font-size: inherit;
  font-weight: 400;
  background: #ffffff;
}

.template-rentalFlyer > .rent-detail-row > span strong {
  color: #17211e;
  font-size: 18px;
  line-height: 1.1;
}

.template-rentalFlyer > .rent-detail-row > span small {
  color: #667066;
  font-size: 11px;
}

.for-rent-flyer.layout-classicRentalFlyer .rent-hero {
  grid-template-columns: minmax(0, 1.35fr) minmax(340px, 1fr);
}

.for-rent-flyer.layout-classicRentalFlyer .rent-hero-copy {
  align-content: start;
  gap: 14px;
  min-width: 0;
}

.for-rent-flyer.layout-classicRentalFlyer .rent-hero-copy h3 {
  display: block;
  max-width: 100%;
  margin: 0;
  overflow: visible;
  line-height: 1.12;
  font-size: clamp(22px, 3.2vw, 40px);
  overflow-wrap: normal;
  word-break: normal;
  white-space: normal;
}

.for-rent-flyer.layout-classicRentalFlyer .rent-price {
  padding-right: 8px;
  font-size: clamp(28px, 4vw, 50px);
}

.for-rent-flyer.layout-classicRentalFlyer .rent-footer {
  padding-top: 10px;
  padding-bottom: 10px;
}

.for-rent-flyer.layout-classicRentalFlyer > .rent-detail-row {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  position: relative;
  z-index: 1;
}

.for-rent-flyer.layout-classicRentalFlyer .rent-info-grid {
  position: relative;
  z-index: 1;
  gap: 20px;
}

.template-rentalFlyer .rent-photo-grid.one-photo {
  grid-template-columns: minmax(0, 1fr);
}

.template-rentalFlyer .rent-photo-grid .open-house-photo-slot {
  min-height: 180px;
}

.template-rentalFlyer .rent-info-grid {
  grid-template-columns: minmax(0, 1fr) minmax(360px, 1.1fr);
  align-items: start;
  gap: 18px;
  padding: 20px;
}

.template-rentalFlyer .rent-info-grid > .rent-main-agent-card:only-child {
  grid-column: 1 / -1;
}

.rent-main-details {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.rent-main-details > strong {
  font-size: 18px;
}

.rent-main-details p {
  display: grid;
  gap: 2px;
  margin: 0;
}

.rent-main-details p strong {
  font-size: 12px;
  text-transform: uppercase;
}

.rent-main-details p span {
  overflow-wrap: normal;
  word-break: normal;
}

.rent-main-agent-card {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-width: 0;
  padding: 16px;
  background: var(--flyer-soft);
  border: 1px solid var(--flyer-line);
  border-radius: 10px;
}

.rent-main-agent-card.no-photo {
  grid-template-columns: minmax(0, 1fr) auto;
}

.rent-main-agent-card.with-photo.no-qr {
  grid-template-columns: 120px minmax(0, 1fr);
}

.rent-main-agent-card.no-photo.no-qr {
  grid-template-columns: minmax(0, 1fr);
}

.rent-main-agent-photo {
  width: 120px;
  height: 120px;
  min-height: 0;
  overflow: hidden;
  border-radius: 10px;
}

.rent-main-agent-info {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.rent-main-agent-info strong,
.rent-main-agent-info span,
.rent-main-agent-info small {
  display: block;
  min-width: 0;
  line-height: 1.2;
}

.rent-main-agent-info strong {
  font-size: 22px;
}

.rent-main-agent-info .agent-email,
.rent-main-agent-info .agent-website {
  overflow-wrap: anywhere;
}

.rent-main-agent-qr {
  display: flex;
  justify-content: center;
  min-width: 0;
}

.rent-main-agent-qr .qr-row {
  flex-direction: column;
  gap: 5px;
  padding: 0;
  background: transparent;
}

.rent-main-agent-qr .qr-box {
  width: 100px;
  height: 100px;
}

.rent-footer {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border-top: 1px solid var(--flyer-line);
}

.rent-footer > strong {
  color: var(--flyer-accent);
  font-size: 18px;
  text-transform: uppercase;
}

.for-rent-flyer.layout-cleanOpenHouse {
  border-color: #222;
}

.for-rent-flyer.layout-cleanOpenHouse .rent-topline {
  color: #111;
  background: white;
  border-bottom: 1px solid #222;
}

.for-rent-flyer.layout-cleanOpenHouse .rent-hero-copy,
.for-rent-flyer.layout-cleanOpenHouse .rent-agent-card {
  background: white;
}

.for-rent-flyer.layout-pinkResidential .rent-topline {
  background: #c85282;
}

.for-rent-flyer.layout-pinkResidential .rent-price {
  color: #c85282;
}

.for-rent-flyer.layout-commercialBlue .rent-topline,
.for-rent-flyer.layout-commercialBlue .rent-footer {
  color: white;
  background: #07518e;
}

.for-rent-flyer.layout-commercialBlue .rent-footer small,
.for-rent-flyer.layout-commercialBlue .rent-footer .qr-row span,
.for-rent-flyer.layout-commercialBlue .rent-footer > strong {
  color: white;
}

.for-rent-flyer.layout-luxuryGrid,
.for-rent-flyer.layout-offMarketGold {
  background: #06172d;
}

.for-rent-flyer.layout-luxuryGrid .rent-topline,
.for-rent-flyer.layout-offMarketGold .rent-topline {
  color: #f7db95;
  background: #06172d;
}

.for-rent-flyer.layout-luxuryGrid .rent-hero-copy,
.for-rent-flyer.layout-luxuryGrid .rent-info-grid,
.for-rent-flyer.layout-luxuryGrid .rent-footer,
.for-rent-flyer.layout-offMarketGold .rent-hero-copy,
.for-rent-flyer.layout-offMarketGold .rent-info-grid,
.for-rent-flyer.layout-offMarketGold .rent-footer {
  background: #fff8e3;
}

.for-rent-flyer.layout-rentalSocial .rent-topline {
  background: #8d9f62;
}

.for-rent-flyer.layout-rentalSocial .rent-hero {
  grid-template-columns: minmax(0, 0.9fr) minmax(250px, 1.1fr);
}

.for-rent-flyer.layout-rentalSocial .rent-photo-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.oh-template,
.rent-template {
  --template-dark: #101820;
  --template-red: #be2e2e;
  --template-gold: #d5a84f;
  --template-blue: #0f558a;
  --template-pink: #cf5a86;
  overflow: visible;
}

.oh-template {
  gap: 0;
  color: #17211e;
  background: #fffdfa;
  border: 1px solid #222;
}

.oh-brand-row.simple {
  grid-template-columns: auto minmax(0, 1fr);
}

.oh-classic-head {
  display: grid;
  gap: 2px;
  justify-items: center;
  padding: 22px 24px 16px;
  color: white;
  background: #13231c;
  text-align: center;
}

.oh-classic-head span,
.oh-two-agent-header span,
.oh-collage-header span,
.oh-sign-main span {
  font-weight: 950;
  letter-spacing: 0;
}

.oh-classic-head span {
  font-size: clamp(42px, 8vw, 88px);
  line-height: 0.9;
}

.oh-classic-head strong {
  color: #f3d27a;
  font-size: clamp(20px, 3.8vw, 42px);
}

.oh-classic-main {
  min-height: 510px;
  border-radius: 0;
}

.oh-classic-details,
.oh-collage-bottom,
.oh-two-details {
  display: grid;
  gap: 10px;
  padding: 18px 22px;
  text-align: center;
}

.oh-classic-details h3,
.oh-collage-bottom h3,
.oh-two-details h3 {
  margin: 0;
  font-size: clamp(26px, 4vw, 46px);
}

.oh-classic-details b,
.oh-collage-header b,
.oh-two-details b {
  color: var(--flyer-accent);
  font-size: clamp(30px, 5vw, 56px);
  line-height: 1;
}

.oh-classic-details .flyer-stats,
.oh-collage-bottom .flyer-stats,
.oh-two-details .flyer-stats,
.oh-sign-footer .flyer-stats {
  justify-content: center;
}

.photo-collage-agent-card {
  min-width: 0;
  padding: 12px;
  background: var(--flyer-soft);
  border: 1px solid var(--flyer-line);
  border-radius: 8px;
}

.photo-collage-agent-card-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
  text-align: left;
}

.photo-collage-agent-info {
  min-width: 0;
}

.photo-collage-agent-qr {
  display: flex;
  flex-direction: column;
  align-self: start;
  justify-self: end;
  align-items: center;
  gap: 8px;
  min-width: 0;
  text-align: center;
}

.photo-collage-agent-card .oh-agent-compact {
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.photo-collage-agent-qr .qr-row {
  margin: 0;
  padding: 0;
  background: transparent;
}

.photo-collage-brokerage-logo-block {
  display: flex;
  justify-content: center;
  width: 100%;
}

.photo-collage-brokerage-logo {
  display: block;
}

@media (max-width: 700px) {
  .photo-collage-agent-card-main {
    grid-template-columns: 1fr;
  }

  .photo-collage-agent-qr {
    justify-self: start;
    text-align: left;
  }
}

.oh-agent-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

.oh-agent-footer.two-agents {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.oh-agent-compact {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 10px;
  align-items: center;
  padding: 12px;
  background: var(--flyer-soft);
  border: 1px solid var(--flyer-line);
  border-radius: 8px;
  text-align: left;
}

.oh-agent-compact-photo {
  grid-row: span 3;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 2px solid var(--flyer-white);
  background-color: var(--flyer-light);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.oh-agent-compact strong,
.oh-agent-compact span,
.oh-agent-compact small {
  display: block;
}

.oh-agent-compact span {
  color: var(--flyer-accent);
  font-size: 18px;
  font-weight: 950;
}

.oh-classic-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 16px 22px;
  background: #fbfaf7;
  border-top: 1px solid var(--flyer-line);
}

.oh-classic-footer small,
.oh-collage-bottom small,
.oh-two-details small,
.oh-sign-footer small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

.open-house-contact-details {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 10px;
  color: var(--flyer-dark);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;
}

.open-house-contact-details span {
  overflow-wrap: anywhere;
}

.oh-collage-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 0 22px 14px;
}

.oh-collage-strip .open-house-photo-slot {
  min-height: 118px;
  border-radius: 0;
}

.template-twoAgentFlyer {
  border: 1px solid #14213d;
}

.oh-two-agent-header {
  display: grid;
  gap: 4px;
  justify-items: center;
  padding: 20px 24px;
  color: white;
  background: #14213d;
  text-align: center;
}

.oh-two-agent-header span {
  color: #fca311;
  font-size: clamp(40px, 8vw, 84px);
  line-height: 0.9;
}

.oh-two-agent-header strong {
  font-size: clamp(20px, 3.4vw, 40px);
}

.oh-two-agent-layout {
  display: grid;
  grid-template-columns: minmax(150px, 0.7fr) minmax(0, 1.4fr) minmax(150px, 0.7fr);
  gap: 14px;
  align-items: stretch;
  padding: 18px;
  background: #edf2f4;
}

.oh-two-agent-layout .open-house-agent-card {
  display: flex;
  min-width: 0;
  height: 100%;
  flex-direction: column;
  align-items: stretch;
  align-content: stretch;
  padding: 12px;
  box-sizing: border-box;
  background: white;
  border: 1px solid #d5dbe0;
  text-align: left;
}

.oh-two-agent-layout .open-house-agent-card .agent-photo-slot {
  width: 100%;
  aspect-ratio: 1 / 1;
  min-height: 0;
  height: auto;
  flex: 0 0 auto;
  overflow: hidden;
}

.oh-two-agent-layout .open-house-agent-card > div:not(.agent-photo-slot) {
  display: grid;
  min-width: 0;
  align-content: start;
  gap: 4px;
  margin-top: 12px;
  text-align: left;
}

.oh-two-agent-layout .open-house-agent-card > div:not(.agent-photo-slot) > strong,
.oh-two-agent-layout .open-house-agent-card > div:not(.agent-photo-slot) > span,
.oh-two-agent-layout .open-house-agent-card > div:not(.agent-photo-slot) > small {
  display: block;
  min-width: 0;
  line-height: 1.2;
}

.oh-two-agent-layout .open-house-agent-card .agent-email {
  overflow-wrap: anywhere;
}

.oh-two-main {
  min-height: 460px;
  border-radius: 0;
}

.oh-two-details {
  background: white;
}

.template-photoCollage {
  border: 1px solid #202020;
}

.oh-collage-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 20px 22px;
  color: white;
  background: #202020;
}

.oh-collage-header span {
  display: block;
  color: #f5c45e;
  font-size: clamp(34px, 7vw, 74px);
  line-height: 0.9;
}

.oh-collage-header strong {
  font-size: clamp(18px, 3vw, 34px);
}

.oh-collage-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(180px, 0.65fr);
  grid-template-rows: repeat(2, minmax(160px, 1fr));
  gap: 10px;
  padding: 12px;
  background: #202020;
}

.oh-collage-main {
  grid-row: 1 / span 2;
  min-height: 520px;
  border-radius: 0;
}

.oh-collage-grid > .open-house-photo-slot:not(.oh-collage-main) {
  min-height: 180px;
  border-radius: 0;
}

.oh-collage-grid .open-house-photo-slot:only-child {
  grid-column: 1 / -1;
}

.template-openHouseSign {
  color: #111;
  background: #fff;
  border: 10px solid #111;
}

.template-openHouseSign .oh-sign-main {
  min-height: 620px;
  align-content: center;
  padding: 42px 32px 28px;
}

.template-openHouseSign .oh-sign-main span {
  color: #c91515;
  font-size: clamp(70px, 14vw, 150px);
  line-height: 0.82;
}

.template-openHouseSign .oh-sign-main strong {
  font-size: clamp(26px, 5vw, 58px);
}

.template-openHouseSign .oh-sign-main h3 {
  max-width: 900px;
  font-size: clamp(30px, 5vw, 62px);
}

.template-openHouseSign .oh-sign-main b {
  color: #111;
  font-size: clamp(34px, 6vw, 72px);
}

.oh-sign-footer {
  display: grid;
  gap: 12px;
  justify-items: center;
  padding: 18px 24px 24px;
  background: #f4f4f4;
  text-align: center;
}

.oh-brand-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(120px, auto);
  gap: 10px;
  align-items: center;
  padding: 12px 16px;
  background: white;
  border-bottom: 1px solid var(--flyer-line);
}

.oh-brand-row > strong {
  color: var(--flyer-ink);
  font-size: 22px;
}

.oh-brand-row > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.oh-brand-row.two-agent-brand {
  grid-template-columns: minmax(0, 1fr) auto;
}

.two-agent-brand-left {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.two-agent-brand-left strong {
  min-width: 0;
  color: var(--flyer-ink);
  font-size: 22px;
  overflow-wrap: anywhere;
}

.two-agent-brand-website {
  display: block;
  min-width: max-content;
  max-width: none;
  justify-self: end;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-align: right;
  line-height: 1;
  white-space: nowrap;
  word-break: normal;
  overflow-wrap: normal;
}

.oh-agent-line {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.oh-agent-line.two-agents {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.oh-agent-line .open-house-agent-card {
  align-items: center;
  background: white;
  border: 1px solid var(--flyer-line);
  border-radius: 8px;
}

.oh-agent-line .agent-photo-slot {
  min-height: 88px;
}

.template-classicFlyer .oh-classic-head {
  display: grid;
  gap: 4px;
  justify-items: center;
  padding: 18px;
  color: #111;
}

.template-classicFlyer .oh-classic-head span {
  font-size: clamp(34px, 7vw, 70px);
  font-weight: 950;
  line-height: 0.95;
}

.template-classicFlyer .oh-classic-head strong {
  font-size: clamp(20px, 4vw, 40px);
}

.oh-classic-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(230px, 0.75fr);
  gap: 16px;
  padding: 0 18px 16px;
}

.oh-classic-main {
  min-height: 330px;
  border-radius: 0;
}

.oh-classic-grid aside {
  display: grid;
  align-content: center;
  gap: 12px;
}

.oh-classic-grid aside b {
  color: #111;
  font-size: clamp(34px, 6vw, 60px);
}

.oh-classic-photos {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 0 18px 18px;
}

.oh-classic-photos .open-house-photo-slot {
  min-height: 140px;
  border-radius: 0;
}

.oh-classic-footer,
.oh-modern-bottom,
.oh-social-footer,
.oh-story-footer {
  display: grid;
  gap: 10px;
  padding: 16px 18px;
  background: #fbfaf7;
  border-top: 1px solid var(--flyer-line);
}

.oh-modern-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(220px, 0.75fr);
  gap: 10px;
  padding: 12px;
  background: #111820;
}

.oh-modern-main {
  grid-row: span 2;
  min-height: 470px;
  border-radius: 0;
}

.oh-modern-panel {
  display: grid;
  align-content: center;
  gap: 12px;
  padding: 18px;
  color: white;
  background: var(--flyer-accent);
}

.oh-modern-panel h3,
.oh-modern-panel b {
  color: white;
}

.oh-modern-panel b {
  font-size: clamp(30px, 5vw, 52px);
}

.oh-modern-grid > .open-house-photo-slot:not(.oh-modern-main) {
  min-height: 150px;
  border-radius: 0;
}

.template-openHouseSign {
  color: #111;
  background: white;
  border: 8px solid #111;
}

.oh-sign-main {
  display: grid;
  gap: 12px;
  justify-items: center;
  padding: 28px 24px;
  text-align: center;
}

.oh-sign-main span {
  color: var(--template-red);
  font-size: clamp(48px, 11vw, 110px);
  font-weight: 950;
  line-height: 0.9;
}

.oh-sign-main strong {
  font-size: clamp(28px, 6vw, 58px);
}

.oh-sign-main h3 {
  color: #111;
  font-size: clamp(24px, 5vw, 48px);
}

.oh-sign-main b {
  font-size: clamp(30px, 6vw, 62px);
}

.oh-sign-photo {
  padding: 0 22px 20px;
}

.oh-sign-footer {
  display: grid;
  gap: 12px;
  padding: 18px 22px;
  background: #f3f3f3;
}

.template-socialPost {
  position: relative;
  display: grid;
  min-height: 640px;
  color: white;
  background: #111;
}

.oh-social-photo {
  min-height: 420px;
  border-radius: 0;
}

.oh-social-overlay {
  display: grid;
  gap: 8px;
  margin: -130px 18px 0;
  padding: 18px;
  z-index: 1;
  color: white;
  background: rgba(13, 24, 35, 0.88);
}

.oh-social-overlay span,
.oh-story-header span,
.rental-story-head span {
  color: var(--template-gold);
  font-size: 16px;
  font-weight: 950;
  text-transform: uppercase;
}

.oh-social-overlay h3,
.oh-social-overlay b {
  color: white;
}

.oh-social-overlay b {
  font-size: clamp(30px, 7vw, 58px);
}

.oh-social-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 12px 18px;
}

.oh-social-strip .open-house-photo-slot {
  min-height: 130px;
  border-radius: 0;
}

.oh-social-footer {
  color: #111;
  background: white;
}

.template-socialPost {
  width: 1080px;
  height: 1080px;
  min-height: 0;
  grid-template-rows: minmax(0, 1fr) auto;
  overflow: hidden;
}

.template-socialPost .oh-social-photo {
  min-height: 0;
  height: 100%;
  grid-row: 1;
}

.template-socialPost .oh-social-overlay {
  position: absolute;
  left: 32px;
  right: 32px;
  top: 32px;
  gap: 6px;
  max-height: 280px;
  margin: 0;
  padding: 24px;
}

.template-socialPost .oh-social-overlay h3 {
  display: -webkit-box;
  max-width: 100%;
  margin: 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-height: 1.08;
}

.social-agent-footer {
  grid-row: 2;
  min-height: 170px;
  max-height: 210px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 18px 24px;
  box-sizing: border-box;
  color: var(--flyer-dark);
  background: #fffaf3;
  border: 1px solid rgba(120, 75, 38, 0.25);
  border-radius: 10px;
}

.social-agent-photo {
  width: 116px;
  height: 116px;
  min-height: 0;
  flex: 0 0 116px;
  overflow: hidden;
  border-radius: 10px;
  background-position: center;
  background-repeat: no-repeat;
}

.social-agent-info {
  display: grid;
  min-width: 0;
  align-content: center;
  gap: 4px;
  text-align: left;
}

.social-agent-info strong {
  font-size: 22px;
  line-height: 1.05;
}

.social-agent-info span,
.social-agent-info small {
  display: block;
  min-width: 0;
  font-size: 14px;
  line-height: 1.2;
}

.social-agent-info .agent-email,
.social-agent-info .agent-website {
  overflow-wrap: anywhere;
}

.social-agent-qr {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 0;
  text-align: center;
}

.social-agent-qr .qr-row {
  flex-direction: column;
  gap: 5px;
  padding: 0;
  background: transparent;
}

.social-agent-qr .qr-box {
  width: 96px;
  height: 96px;
}

.social-agent-qr .qr-row span {
  font-size: 12px;
  line-height: 1.1;
  white-space: nowrap;
}

.social-brokerage-logo {
  display: block;
  max-width: 80px;
  max-height: 34px;
  object-fit: contain;
}

@media (max-width: 700px) {
  .template-socialPost {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
  }

  .social-agent-footer {
    min-height: 150px;
    max-height: 190px;
    padding: 14px 16px;
    grid-template-columns: auto minmax(0, 1fr);
  }

  .social-agent-qr {
    grid-column: 1 / -1;
    justify-self: end;
  }
}

.template-story {
  aspect-ratio: 9 / 16;
}

.template-story {
  width: 1080px;
  height: 1920px;
  display: grid;
  grid-template-rows: 100px minmax(0, 1fr) auto auto auto;
  align-content: start;
  overflow: hidden;
}

.oh-story-header,
.rental-story-head {
  display: grid;
  gap: 6px;
  min-height: 100px;
  align-content: center;
  padding: 14px 24px;
  color: white;
  background: #07172b;
}

.oh-story-header strong,
.rental-story-head strong {
  font-size: clamp(26px, 5vw, 48px);
}

.oh-story-main,
.rental-story-main {
  min-height: 0;
  height: 100%;
  border-radius: 0;
}

.oh-story-body,
.rental-story-body {
  display: grid;
  gap: 10px;
  min-width: 0;
  justify-items: center;
  padding: 30px 32px 26px;
  text-align: center;
}

.template-story .oh-story-body h3 {
  display: -webkit-box;
  max-width: 100%;
  margin: 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-height: 1.1;
}

.template-story .oh-story-body .flyer-stats {
  justify-content: center;
  margin: 0;
}

.story-agent-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  min-height: 250px;
  max-height: 290px;
  margin: 20px 18px 10px;
  padding: 20px;
  box-sizing: border-box;
  color: var(--flyer-dark);
  background: #fffaf3;
  border: 1px solid rgba(120, 75, 38, 0.25);
  border-radius: 14px;
}

.story-agent-photo {
  width: 150px;
  height: 150px;
  min-height: 0;
  flex: 0 0 150px;
  overflow: hidden;
  border-radius: 10px;
}

.story-agent-info {
  display: grid;
  min-width: 0;
  align-content: center;
  gap: 4px;
  text-align: left;
}

.story-agent-info strong {
  font-size: 28px;
  line-height: 1.05;
}

.story-agent-info span,
.story-agent-info small {
  display: block;
  min-width: 0;
  font-size: 15px;
  line-height: 1.2;
}

.story-agent-info .story-agent-line {
  line-height: 1.25;
}

.story-agent-info .agent-email,
.story-agent-info .agent-website {
  overflow-wrap: anywhere;
}

.story-agent-qr {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  text-align: center;
}

.story-agent-qr .qr-row {
  flex-direction: column;
  gap: 5px;
  padding: 0;
  background: transparent;
}

.story-agent-qr .qr-box {
  width: 100px;
  height: 100px;
}

.story-agent-qr .qr-row span {
  font-size: 12px;
  line-height: 1.1;
  white-space: nowrap;
}

.story-brokerage-logo {
  display: block;
  max-width: 80px;
  max-height: 34px;
  object-fit: contain;
}

.story-disclaimer {
  min-height: 24px;
  padding: 0 24px 12px;
  color: #667066;
  text-align: center;
}

.story-disclaimer small {
  font-size: 11px;
  line-height: 1.2;
}

.oh-story-body b,
.rental-story-head strong {
  color: var(--flyer-accent);
  font-size: clamp(30px, 6vw, 58px);
}

.rental-sign-top {
  display: grid;
  gap: 4px;
  justify-items: center;
  padding: 24px 18px;
  color: white;
  background: #0c673f;
  text-align: center;
}

.rental-logo {
  width: 80px;
  height: 34px;
  max-width: 80px;
  max-height: 34px;
  justify-self: center;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}

.rental-sign-qr-block {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 14px 18px;
  box-sizing: border-box;
}

.rental-sign-qr-block .qr-row {
  display: contents;
  margin: 0;
}

.rental-sign-qr-block .qr-box {
  grid-column: 1;
  justify-self: start;
}

.rental-sign-qr-block .qr-row > span {
  grid-column: 2;
  justify-self: center;
  text-align: center;
}

.rental-sign-qr-block .rental-sign-qr-logo {
  grid-column: 3;
  justify-self: end;
  width: 64px;
  height: 28px;
  max-width: 64px;
  max-height: 28px;
  background-size: contain;
  object-fit: contain;
}

.rent-topline .rental-logo {
  flex: 0 0 auto;
}

.rental-social-copy .rental-logo,
.rental-story-head .rental-logo {
  justify-self: end;
  margin-left: auto;
}

.rental-sign-top span {
  font-size: clamp(48px, 10vw, 108px);
  font-weight: 950;
  line-height: 0.9;
}

.rental-sign-top strong {
  font-size: clamp(34px, 7vw, 72px);
}

.rental-sign-photo {
  min-height: 360px;
  border-radius: 0;
}

.rental-sign-body {
  display: grid;
  gap: 14px;
  padding: 18px;
  text-align: center;
}

.template-rentalSign .rent-detail-row {
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
}

.template-rentalSign .rental-sign-body h3,
.template-windowSign .window-sign h3 {
  max-width: 100%;
  overflow-wrap: normal;
  word-break: normal;
}

.template-rentalSign .rental-sign-body > strong,
.template-windowSign .window-sign > div {
  line-height: 1.2;
}

.template-windowSign .rent-detail-row {
  width: calc(100% + 64px);
  margin-right: -32px;
  margin-left: -32px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-self: stretch;
  background: transparent;
}

.template-windowSign .rent-detail-row > span {
  color: #102233;
  font-size: inherit;
  font-weight: 400;
  background: #ffffff;
}

.template-windowSign .rent-detail-row > span strong {
  color: #102233;
  font-size: 18px;
  line-height: 1.1;
}

.template-windowSign .rent-detail-row > span small {
  color: #667066;
  font-size: 11px;
}

.apartment-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
  padding: 12px;
  background: #e7edf2;
}

.apartment-main {
  grid-row: span 2;
  min-height: 430px;
  border-radius: 0;
}

.apartment-copy {
  display: grid;
  align-content: center;
  gap: 12px;
  padding: 18px;
  background: white;
}

.apartment-copy strong {
  color: var(--flyer-accent);
  font-size: clamp(30px, 5vw, 56px);
}

.apartment-layout > .open-house-photo-slot:not(.apartment-main) {
  min-height: 180px;
  border-radius: 0;
}

.apartment-interiors {
  display: grid;
  grid-column: 2;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
}

.apartment-interiors.count-1 {
  grid-template-columns: minmax(0, 1fr);
}

.apartment-interiors.count-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-column: 1 / -1;
}

.apartment-interiors .open-house-photo-slot {
  min-height: 180px;
  border-radius: 0;
}

.template-apartmentFlyer > .rent-detail-row {
  width: 100%;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  background: transparent;
}

.template-apartmentFlyer > .rent-detail-row > span {
  color: #17211e;
  font-size: inherit;
  font-weight: 400;
  background: #ffffff;
}

.template-apartmentFlyer > .rent-detail-row > span strong {
  color: #17211e;
  font-size: 18px;
  line-height: 1.1;
}

.template-apartmentFlyer > .rent-detail-row > span small {
  color: #667066;
  font-size: 11px;
}

.apartment-agent-card {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-width: 0;
  padding: 16px;
  background: var(--flyer-soft);
  border: 1px solid var(--flyer-line);
  border-radius: 10px;
}

.apartment-agent-card.no-photo {
  grid-template-columns: minmax(0, 1fr) auto;
}

.apartment-agent-card.with-photo.no-qr {
  grid-template-columns: 120px minmax(0, 1fr);
}

.apartment-agent-card.no-photo.no-qr {
  grid-template-columns: minmax(0, 1fr);
}

.apartment-agent-photo {
  width: 120px;
  height: 120px;
  min-height: 0;
  overflow: hidden;
  border-radius: 10px;
}

.apartment-agent-info {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.apartment-agent-info > span,
.apartment-agent-info strong,
.apartment-agent-info span,
.apartment-agent-info small {
  display: block;
  min-width: 0;
  line-height: 1.2;
}

.apartment-agent-info > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.apartment-agent-info strong {
  font-size: 21px;
}

.apartment-agent-info .agent-email,
.apartment-agent-info .agent-website {
  overflow-wrap: anywhere;
}

.apartment-agent-qr {
  display: flex;
  justify-content: center;
  min-width: 0;
}

.apartment-agent-qr .qr-row {
  flex-direction: column;
  gap: 5px;
  padding: 0;
  background: transparent;
}

.apartment-agent-qr .qr-box {
  width: 100px;
  height: 100px;
}

.template-windowSign {
  display: grid;
  place-items: center;
  color: white;
  background: #102233;
  border: 10px solid #d5a84f;
}

.window-sign {
  display: grid;
  gap: 14px;
  justify-items: center;
  padding: 32px;
  text-align: center;
}

.window-sign span {
  color: #d5a84f;
  font-size: clamp(28px, 5vw, 56px);
  font-weight: 950;
}

.window-sign strong {
  font-size: clamp(52px, 11vw, 112px);
  line-height: 0.85;
}

.window-sign b {
  color: #d5a84f;
  font-size: clamp(42px, 8vw, 86px);
}

.window-sign h3,
.window-sign p {
  color: white;
}

.template-rentalSocialPost {
  display: grid;
  color: white;
  background: #162235;
}

.rental-social-photo {
  min-height: 420px;
  border-radius: 0;
}

.rental-social-copy {
  display: grid;
  gap: 8px;
  margin: -90px 18px 0;
  padding: 18px;
  z-index: 1;
  color: white;
  background: #0c673f;
}

.rental-social-copy span {
  color: #ffe27a;
  font-weight: 950;
}

.rental-social-copy strong {
  font-size: clamp(34px, 7vw, 66px);
}

.rental-social-copy h3 {
  color: white;
}

.rental-social-footer {
  display: grid;
  gap: 10px;
  padding: 16px 18px;
  background: #111;
}

.template-rentalSocialPost .rental-social-copy .rent-detail-row {
  width: calc(100% + 36px);
  margin-right: -18px;
  margin-left: -18px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  background: transparent;
}

.template-rentalSocialPost .rental-social-copy .rent-detail-row > span {
  color: #162235;
  font-size: inherit;
  font-weight: 400;
  background: #ffffff;
}

.template-rentalSocialPost .rental-social-copy .rent-detail-row > span strong {
  color: #162235;
  font-size: 18px;
  line-height: 1.1;
}

.template-rentalSocialPost .rental-social-copy .rent-detail-row > span small {
  color: #667066;
  font-size: 11px;
}

.template-rentalSocialPost .rental-social-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 1.15fr);
  align-items: center;
  gap: 16px;
}

.rental-social-contact {
  min-width: 0;
}

.rental-social-qr-block {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.rental-social-qr-block .qr-row {
  display: contents;
  margin: 0;
}

.rental-social-qr-block .qr-box {
  grid-column: 1;
  justify-self: start;
}

.rental-social-qr-block .qr-row > span {
  grid-column: 2;
  justify-self: center;
  text-align: center;
}

.rental-social-qr-block .rental-logo {
  grid-column: 3;
  justify-self: end;
  width: 64px;
  height: 28px;
  max-width: 64px;
  max-height: 28px;
}

.rental-story-stack {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 10px;
}

.rental-story-stack .open-house-photo-slot {
  min-height: 150px;
  border-radius: 0;
}

.template-rentalStory .rental-story-stack.one-photo {
  grid-template-columns: minmax(0, 1fr);
}

.template-rentalStory .rental-story-head {
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px;
}

.template-rentalStory .rental-story-head span {
  font-size: 18px;
  line-height: 1;
}

.template-rentalStory .rental-story-head strong {
  margin-left: auto;
  color: #ffffff;
  font-size: 26px;
  line-height: 1;
  white-space: nowrap;
}

.template-rentalStory .rental-story-main {
  height: 820px;
  min-height: 820px;
}

.template-rentalStory .rental-story-body {
  gap: 6px;
  padding: 16px 18px 14px;
}

.template-rentalStory .rental-story-body h3 {
  max-width: 100%;
  margin: 0;
  line-height: 1.1;
}

@media (max-width: 700px) {
  .template-rentalStory .rental-story-head {
    min-height: 58px;
    padding: 7px 14px;
  }

  .template-rentalStory .rental-story-head span {
    font-size: 16px;
  }

  .template-rentalStory .rental-story-head strong {
    font-size: 22px;
  }

  .template-rentalStory .rental-story-main {
    height: 620px;
    min-height: 620px;
  }
}

.template-rentalStory .rental-story-agent-card {
  grid-template-columns: 100px minmax(0, 1fr) auto;
  gap: 10px;
  min-height: 0;
  padding: 10px;
  width: 100%;
  box-sizing: border-box;
}

.template-rentalStory .rental-story-agent-card.no-photo {
  grid-template-columns: minmax(0, 1fr) auto;
}

.template-rentalStory .rental-story-agent-card.no-photo.no-qr {
  grid-template-columns: minmax(0, 1fr);
}

.template-rentalStory .rental-story-agent-card .rent-main-agent-photo {
  width: 100px;
  height: 100px;
}

.template-rentalStory .rental-story-agent-card .rent-main-agent-info {
  gap: 3px;
}

.template-rentalStory .rental-story-agent-card .rent-main-agent-info strong {
  font-size: 18px;
}

.template-rentalStory .rental-story-agent-card .rent-main-agent-qr {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.template-rentalStory .rental-story-agent-card .rent-main-agent-qr .rental-logo {
  margin: 0;
}

.template-rentalStory .rental-story-body .rent-detail-row {
  width: 100%;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  background: transparent;
}

.template-rentalStory .rental-story-body .rent-detail-row > span {
  color: #162235;
  font-size: inherit;
  font-weight: 400;
  background: #ffffff;
}

.template-rentalStory .rental-story-body .rent-detail-row > span strong {
  color: #162235;
  font-size: 18px;
  line-height: 1.1;
}

.template-rentalStory .rental-story-body .rent-detail-row > span small {
  color: #667066;
  font-size: 11px;
}

.template-classicFlyer .oh-classic-head {
  padding: 22px 24px 16px;
  color: white;
  background: #13231c;
}

.template-classicFlyer .oh-classic-head span {
  font-size: clamp(42px, 8vw, 88px);
}

.template-classicFlyer .oh-classic-head strong {
  color: #f3d27a;
  font-size: clamp(20px, 3.8vw, 42px);
}

.template-classicFlyer .oh-classic-main {
  min-height: 510px;
}

.template-photoCollage .oh-collage-grid {
  grid-template-columns: minmax(0, 1.35fr) minmax(180px, 0.65fr);
}

.template-photoCollage .oh-collage-grid .oh-collage-main:only-child {
  grid-column: 1 / -1;
}

.template-openHouseSign .oh-sign-photo {
  display: none;
}

.template-openHouseSign .oh-sign-main {
  min-height: 620px;
  align-content: center;
  justify-items: center;
  padding: 34px 28px 30px;
}

.template-openHouseSign .oh-sign-main h3 {
  width: min(100%, 900px);
  margin: 0;
  font-size: clamp(28px, 4.4vw, 56px);
  line-height: 1.05;
  text-align: center;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  overflow-wrap: break-word;
}

.template-openHouseSign .oh-sign-main b {
  font-size: clamp(30px, 5vw, 58px);
  line-height: 1;
}

.template-openHouseSign .oh-sign-main .qr-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  max-width: none;
  padding: 12px 16px;
  margin: 0;
}

.template-openHouseSign .oh-sign-main .qr-box {
  width: clamp(120px, 18vw, 150px);
  height: clamp(120px, 18vw, 150px);
}

.template-openHouseSign .oh-sign-main .qr-row span {
  font-size: clamp(18px, 2.2vw, 24px);
  line-height: 1.05;
  white-space: nowrap;
}

.template-openHouseSign .oh-sign-footer {
  min-height: 108px;
  align-content: center;
  justify-items: center;
  gap: 12px;
  padding: 22px 24px 26px;
}

.template-openHouseSign .oh-sign-footer .flyer-stats {
  justify-content: center;
}

.template-openHouseSign .oh-sign-footer > strong {
  font-size: clamp(18px, 2.8vw, 30px);
  line-height: 1.1;
}

.template-classicFlyer {
  overflow: visible;
  color: #111;
  background: white;
  border: 2px solid #111;
  box-shadow: 0 16px 42px rgba(24, 33, 29, 0.18);
}

.template-classicFlyer .open-house-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.8fr);
  gap: 18px;
  align-items: center;
  padding: 16px 22px 12px;
  background: var(--flyer-white);
  border-bottom: 1px solid var(--flyer-tan);
}

.template-classicFlyer .open-house-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.template-classicFlyer .open-house-brand strong {
  overflow: hidden;
  color: var(--flyer-dark);
  font-size: clamp(22px, 3.2vw, 36px);
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.template-classicFlyer .open-house-office {
  justify-items: end;
  color: var(--flyer-dark);
  text-align: right;
}

.template-classicFlyer .open-house-office strong {
  font-size: 13px;
  letter-spacing: 0;
  text-transform: uppercase;
}

.template-classicFlyer .open-house-office span {
  color: var(--flyer-dark);
  font-weight: 800;
}

.template-classicFlyer .open-house-logo {
  width: 150px;
  height: 55px;
  flex: 0 0 auto;
  border-radius: 0;
}

.template-classicFlyer .open-house-hero-agents {
  display: grid;
  grid-template-columns: minmax(112px, 0.45fr) minmax(0, 1.1fr) minmax(112px, 0.45fr);
  gap: 16px;
  align-items: end;
  padding: 16px 22px 12px;
  background: var(--flyer-white);
}

.template-classicFlyer .open-house-hero-agents.two-agents {
  grid-template-columns: minmax(112px, 0.45fr) minmax(0, 1.1fr) minmax(112px, 0.45fr);
}

.template-classicFlyer .open-house-hero-agents.single-agent {
  grid-template-columns: minmax(112px, 0.45fr) minmax(0, 1.1fr);
}

.template-classicFlyer .open-house-hero-agents.single-agent .classic-agent-position-top-right,
.template-classicFlyer .open-house-hero-agents.single-agent .classic-agent-position-bottom-right {
  display: none;
}

.template-classicFlyer .open-house-agent-hero {
  gap: 6px;
}

.template-classicFlyer .classic-agent-position {
  display: grid;
}

.template-classicFlyer .classic-agent-position-top-left,
.template-classicFlyer .classic-agent-position-bottom-left {
  justify-self: start;
}

.template-classicFlyer .classic-agent-position-top-right,
.template-classicFlyer .classic-agent-position-bottom-right {
  justify-self: end;
}

.template-classicFlyer .classic-agent-position-top-left {
  grid-column: 1;
}

.template-classicFlyer .classic-agent-position-top-right {
  grid-column: 3;
}

.template-classicFlyer .open-house-sell-banner {
  grid-column: 2;
}

.template-classicFlyer .agent-hero-photo {
  width: min(100%, 160px);
  min-height: 178px;
  border: 1px solid var(--flyer-tan);
  border-radius: 0;
}

.template-classicFlyer .open-house-sell-banner {
  align-self: center;
  gap: 8px;
}

.template-classicFlyer .open-house-sell-banner span {
  padding: 10px 18px;
  color: var(--flyer-dark);
  background: linear-gradient(90deg, var(--flyer-accent), var(--flyer-tan), var(--flyer-accent));
  font-size: clamp(22px, 4vw, 40px);
  line-height: 1.02;
  text-transform: uppercase;
}

.template-classicFlyer .open-house-sell-banner strong {
  color: var(--flyer-dark);
  font-size: clamp(17px, 2.7vw, 28px);
}

.open-house-phone-line {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 18px;
  color: var(--flyer-dark);
}

.open-house-phone-line b {
  font-size: clamp(18px, 2.4vw, 28px);
}

.template-classicFlyer .open-house-namebar {
  display: grid;
  grid-template-columns: 1fr;
  color: var(--flyer-white);
  background: var(--flyer-primary);
}

.template-classicFlyer .open-house-namebar.two-names,
.template-classicFlyer .open-house-namebar.two-agents {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.template-classicFlyer .open-house-namebar.single-agent {
  display: block;
}

.template-classicFlyer .open-house-namebar.single-agent .agent2-header {
  display: none !important;
}

.template-classicFlyer .open-house-namebar > div,
.template-classicFlyer .open-house-namebar .agent-name-col {
  padding: 10px 22px;
  text-align: center;
}

.template-classicFlyer .open-house-namebar.two-names > div:first-child,
.template-classicFlyer .open-house-namebar .agent-name-col.left {
  text-align: left;
}

.template-classicFlyer .open-house-namebar.two-names > div:last-child,
.template-classicFlyer .open-house-namebar .agent-name-col.right {
  text-align: right;
}

.template-classicFlyer .open-house-namebar strong {
  font-size: clamp(20px, 3vw, 34px);
}

.template-classicFlyer .open-house-namebar span {
  font-size: clamp(12px, 1.8vw, 18px);
}

.template-classicFlyer .open-house-property-stage {
  position: relative;
  display: grid;
  min-height: 560px;
  background: var(--flyer-light);
}

.template-classicFlyer .main-property-slot {
  min-height: 560px;
  border-radius: 0;
}

.template-classicFlyer .open-house-overlay-title {
  left: clamp(22px, 6vw, 78px);
  top: 50px;
  max-width: min(58%, 560px);
  color: var(--flyer-accent);
  text-shadow: 4px 4px 0 var(--flyer-dark);
  transform: rotate(-7deg);
}

.template-classicFlyer .open-house-overlay-title strong {
  font-size: clamp(54px, 9vw, 100px);
  line-height: 0.82;
}

.template-classicFlyer .open-house-overlay-title span {
  font-size: clamp(25px, 4.6vw, 50px);
  line-height: 0.9;
}

.template-classicFlyer .open-house-side-rail {
  position: absolute;
  right: 24px;
  top: 70px;
  display: grid;
  gap: 12px;
  width: min(260px, 31%);
}

.template-classicFlyer .open-house-price-box {
  padding: 12px 13px;
  color: var(--flyer-dark);
  background: var(--flyer-tan);
  border: 3px solid var(--flyer-tan);
  box-shadow: 0 0 0 3px var(--flyer-white);
}

.template-classicFlyer .open-house-price-box span,
.template-classicFlyer .open-house-price-box strong {
  display: block;
  font-size: clamp(18px, 2.8vw, 34px);
  line-height: 1;
  font-weight: 950;
}

.template-classicFlyer .open-house-side-rail .open-house-photo-slot {
  min-height: 122px;
  border: 6px solid var(--flyer-white);
  border-radius: 0;
}

.template-classicFlyer .open-house-bottom {
  display: grid;
  gap: 9px;
  padding: 14px 24px 16px;
  background: var(--flyer-white);
  text-align: center;
}

.template-classicFlyer .open-house-bottom h3 {
  margin: 0;
  color: var(--flyer-dark);
  font-size: clamp(28px, 4.5vw, 50px);
  line-height: 1.05;
}

.template-classicFlyer .open-house-bottom .flyer-stats {
  justify-content: center;
}

.template-classicFlyer .open-house-bottom .flyer-stats span {
  color: var(--flyer-dark);
  background: var(--flyer-light);
}

.template-classicFlyer .open-house-features ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 30px;
  max-width: 760px;
  margin: 0 auto;
  padding-left: 22px;
  text-align: left;
  font-size: clamp(14px, 2vw, 22px);
}

.template-classicFlyer .open-house-bottom-cta {
  color: var(--flyer-dark);
  font-size: clamp(18px, 2.6vw, 30px);
  text-transform: uppercase;
}

.classic-bottom-agent-photos {
  display: grid;
  grid-template-columns: minmax(112px, 0.45fr) minmax(0, 1fr) minmax(112px, 0.45fr);
  gap: 16px;
  align-items: end;
  min-height: 0;
}

.classic-bottom-agent-photos:empty {
  display: none;
}

.classic-bottom-agent-photos .classic-agent-position-bottom-left {
  grid-column: 1;
}

.classic-bottom-agent-photos .classic-agent-position-bottom-right {
  grid-column: 3;
}

.classic-bottom-agent-photos .agent-hero-photo {
  min-height: 150px;
}

.template-classicFlyer .open-house-bottom small {
  color: var(--flyer-dark);
  font-size: 10px;
  line-height: 1.35;
  text-transform: none;
}

/* Final poster polish: dimensions scale with the flyer, not the browser viewport. */
.template-classicFlyer {
  container-type: inline-size;
  color: var(--flyer-dark);
  border: 1px solid var(--flyer-dark);
  box-shadow: 0 18px 46px rgba(24, 33, 29, 0.2);
}

.template-classicFlyer .open-house-top {
  grid-template-columns: minmax(0, 1fr) minmax(28cqw, 0.7fr);
  gap: 2.4cqw;
  min-height: 10cqw;
  padding: 1.6cqw 2.8cqw;
  border-bottom: 1px solid var(--flyer-tan);
}

.template-classicFlyer .open-house-brand {
  gap: 1.8cqw;
}

.template-classicFlyer .open-house-brand strong {
  color: var(--flyer-dark);
  font-size: clamp(15px, 3.7cqw, 28px);
  font-weight: 900;
}

.template-classicFlyer .open-house-logo {
  width: clamp(96px, 17cqw, 150px);
  height: clamp(38px, 6.2cqw, 55px);
  border: 1px solid var(--flyer-tan);
  border-radius: 2px;
}

.template-classicFlyer .open-house-office strong {
  color: var(--flyer-primary);
  font-size: clamp(9px, 1.45cqw, 11px);
}

.template-classicFlyer .open-house-office span {
  color: var(--flyer-dark);
  font-size: clamp(10px, 1.7cqw, 13px);
  font-weight: 700;
}

.template-classicFlyer .open-house-hero-agents,
.template-classicFlyer .open-house-hero-agents.two-agents {
  grid-template-columns: 18cqw minmax(0, 1fr) 18cqw;
  gap: 2.2cqw;
  align-items: center;
  min-height: 24cqw;
  padding: 2cqw 2.8cqw;
  background: linear-gradient(180deg, var(--flyer-white) 0%, var(--flyer-light) 100%);
}

.template-classicFlyer .open-house-agent-hero,
.template-classicFlyer .classic-agent-position {
  width: 100%;
}

.template-classicFlyer .agent-hero-caption {
  gap: 0.25cqw;
  padding: 0.45cqw 0.25cqw 0;
}

.template-classicFlyer .agent-hero-caption strong {
  font-size: clamp(9px, 1.65cqw, 13px);
}

.template-classicFlyer .agent-hero-caption span {
  color: var(--flyer-primary);
  font-size: clamp(8px, 1.35cqw, 10px);
  font-weight: 850;
}

.template-classicFlyer .agent-hero-caption small {
  color: var(--flyer-dark);
  font-size: clamp(8px, 1.25cqw, 10px);
}

.template-classicFlyer .agent-hero-photo {
  width: 100%;
  min-height: 20cqw;
  border: 1px solid var(--flyer-tan);
  border-bottom: 4px solid var(--flyer-primary);
  border-radius: 2px 2px 0 0;
  box-shadow: 0 6px 16px rgba(24, 33, 29, 0.14);
}

.template-classicFlyer .open-house-hero-agents .agent-hero-photo {
  width: 112px;
  height: 112px;
  min-height: 112px;
  max-height: 112px;
  box-sizing: border-box;
  box-shadow: none !important;
  filter: none !important;
}

.template-classicFlyer .open-house-hero-agents .open-house-agent-hero,
.template-classicFlyer .open-house-hero-agents .classic-agent-position,
.template-classicFlyer .open-house-hero-agents .agent-hero-caption {
  box-shadow: none !important;
  filter: none !important;
}

.template-classicFlyer .agent-hero-caption {
  display: none !important;
}

.template-classicFlyer .open-house-sell-banner {
  gap: 1cqw;
  padding: 0 1cqw;
}

.template-classicFlyer .open-house-sell-banner span {
  padding: 1.2cqw 1.8cqw;
  color: var(--flyer-dark);
  background: linear-gradient(90deg, var(--flyer-accent), var(--flyer-tan), var(--flyer-accent));
  border: 1px solid var(--flyer-accent);
  font-size: clamp(15px, 4.2cqw, 32px);
  line-height: 0.98;
}

.template-classicFlyer .open-house-sell-banner strong {
  color: var(--flyer-dark);
  font-size: clamp(11px, 2.7cqw, 21px);
  line-height: 1.08;
}

.template-classicFlyer .open-house-phone-line {
  gap: 0.8cqw 2cqw;
  color: var(--flyer-primary);
}

.template-classicFlyer .open-house-phone-line b {
  font-size: clamp(12px, 2.8cqw, 22px);
  line-height: 1;
}

.template-classicFlyer .open-house-namebar {
  display: grid;
  height: auto;
  min-height: max(42px, 9.8cqw);
  max-height: none;
  align-items: start;
  overflow: visible;
  box-sizing: border-box;
  border-top: 1px solid var(--flyer-dark);
  border-bottom: 1px solid var(--flyer-dark);
}

.template-classicFlyer .open-house-namebar > div {
  min-width: 0;
  overflow: visible;
  padding: 1.25cqw 2.8cqw 1.35cqw;
  box-sizing: border-box;
}

.template-classicFlyer .open-house-namebar strong {
  font-size: clamp(13px, 3.2cqw, 24px);
  line-height: 1.05;
}

.template-classicFlyer .open-house-namebar span {
  margin-top: 0.25cqw;
  font-size: clamp(9px, 1.75cqw, 13px);
  font-weight: 700;
}

.template-classicFlyer .agent1-header,
.template-classicFlyer .agent2-header {
  display: grid;
  gap: 0.25cqw;
  min-width: 0;
  overflow: visible;
}

.template-classicFlyer .agent1-topline,
.template-classicFlyer .agent2-topline {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1cqw;
}

.template-classicFlyer .agent2-topline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 1cqw;
  width: 100%;
}

.template-classicFlyer .agent-phone-slot {
  justify-self: start;
  min-width: 0;
  font-size: clamp(9px, 1.75cqw, 13px);
  font-weight: 900;
  white-space: nowrap;
}

.template-classicFlyer .agent2-name {
  justify-self: end;
  text-align: right;
  white-space: nowrap;
}

.template-classicFlyer .agent2-header {
  text-align: right;
  justify-self: stretch;
}

.template-classicFlyer .agent2-name,
.template-classicFlyer .agent2-header .agent-title-line {
  display: block;
  width: 100%;
  text-align: right;
}

.template-classicFlyer .agent-title-line {
  display: block !important;
  visibility: visible !important;
  position: relative;
  z-index: 1;
  margin-top: 0.35cqw;
  padding: 0 !important;
  color: var(--flyer-white) !important;
  opacity: 1 !important;
  font-size: clamp(8px, 1.35cqw, 10px);
  line-height: 1.1;
  font-weight: 700;
  white-space: normal;
  overflow: visible;
  max-height: none;
}

.template-classicFlyer .agent-phone-line {
  display: block;
  font-size: clamp(9px, 1.75cqw, 13px);
  font-weight: 900;
  white-space: nowrap;
}

.template-classicFlyer .open-house-namebar small {
  display: block;
  margin-top: 0.18cqw;
  color: var(--flyer-white);
  opacity: 0.82;
  font-size: clamp(7px, 1.2cqw, 9px);
  font-weight: 700;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.template-classicFlyer .open-house-property-stage,
.template-classicFlyer .main-property-slot {
  min-height: 62cqw;
}

.template-classicFlyer .open-house-property-stage {
  background: var(--flyer-light);
}

.template-classicFlyer .open-house-overlay-title {
  left: 4.8cqw;
  top: 6cqw;
  max-width: 58cqw;
  color: var(--flyer-accent);
  text-shadow: 0.35cqw 0.35cqw 0 var(--flyer-dark);
  transform: rotate(-5deg);
}

.template-classicFlyer .open-house-overlay-title strong {
  font-size: clamp(27px, 8.5cqw, 65px);
  line-height: 0.84;
}

.template-classicFlyer .open-house-overlay-title span {
  margin-top: 0.8cqw;
  font-size: clamp(15px, 4.1cqw, 31px);
  line-height: 0.95;
}

.template-classicFlyer .open-house-side-rail {
  right: 2.8cqw;
  top: 5cqw;
  gap: 1.2cqw;
  width: 29cqw;
}

.template-classicFlyer .open-house-price-box {
  padding: 1.4cqw 1.5cqw;
  background: var(--flyer-tan);
  border: 1px solid var(--flyer-accent);
  box-shadow: 0 0 0 0.45cqw var(--flyer-white);
}

.template-classicFlyer .open-house-price-box span,
.template-classicFlyer .open-house-price-box strong {
  font-size: clamp(12px, 3cqw, 23px);
  line-height: 1.05;
}

.template-classicFlyer .open-house-side-rail .open-house-photo-slot {
  min-height: 14.5cqw;
  border: 0.6cqw solid var(--flyer-white);
  box-shadow: 0 4px 12px rgba(17, 28, 23, 0.22);
}

.template-classicFlyer .open-house-bottom {
  gap: 1.1cqw;
  padding: 2cqw 3cqw 2.2cqw;
  border-top: 1px solid var(--flyer-tan);
}

.template-classicFlyer .open-house-bottom h3 {
  font-size: clamp(17px, 4.5cqw, 34px);
}

.template-classicFlyer .open-house-bottom-head {
  gap: 0.8cqw;
}

.template-classicFlyer .open-house-bottom-head .flyer-stats {
  justify-content: center;
}

.template-classicFlyer .open-house-bottom .flyer-stats span {
  padding: 0.75cqw 1.25cqw;
  color: var(--flyer-dark);
  background: var(--flyer-light);
  border: 1px solid var(--flyer-tan);
  font-size: clamp(10px, 1.7cqw, 13px);
}

.template-classicFlyer .open-house-bottom-grid,
.template-classicFlyer .open-house-bottom-row {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) auto;
  gap: 1.6cqw;
  align-items: start;
  text-align: left;
}

.template-classicFlyer .open-house-bottom-row.without-qr {
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
}

.template-classicFlyer .open-house-address {
  display: grid;
  gap: 0.25cqw;
  color: var(--flyer-dark);
}

.template-classicFlyer .open-house-address strong,
.template-classicFlyer .open-house-address span {
  display: block;
}

.template-classicFlyer .open-house-address strong {
  font-size: clamp(17px, 4.5cqw, 34px);
  line-height: 1.05;
}

.template-classicFlyer .open-house-address span {
  font-size: clamp(9px, 1.8cqw, 13px);
  line-height: 1.15;
}

.template-classicFlyer .open-house-bottom-features,
.template-classicFlyer .open-house-bottom-contact,
.template-classicFlyer .open-house-features-left,
.template-classicFlyer .open-house-features-center,
.template-classicFlyer .open-house-features-middle,
.template-classicFlyer .open-house-contact-right,
.template-classicFlyer .open-house-contact-left {
  min-width: 0;
}

.template-classicFlyer .open-house-bottom-qr,
.template-classicFlyer .open-house-qr-block {
  display: grid;
  justify-items: center;
  align-content: start;
}

.template-classicFlyer .open-house-bottom-qr .qr-row,
.template-classicFlyer .open-house-qr-block .qr-row {
  justify-items: center;
  gap: 0.45cqw;
  width: auto;
  text-align: center;
}

.template-classicFlyer .open-house-bottom-qr .qr-box,
.template-classicFlyer .open-house-qr-block .qr-box {
  width: clamp(54px, 8.8cqw, 76px);
  height: clamp(54px, 8.8cqw, 76px);
  padding: 0.6cqw;
}

.template-classicFlyer .open-house-bottom-contact,
.template-classicFlyer .open-house-contact-right {
  display: grid;
  gap: 0.8cqw;
  color: var(--flyer-dark);
}

.template-classicFlyer .open-house-contact-left {
  text-align: left;
}

.template-classicFlyer .open-house-features-middle {
  text-align: left;
}

.template-classicFlyer .open-house-qr-right {
  justify-self: end;
  text-align: center;
}

.template-classicFlyer .open-house-contact-right {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.template-classicFlyer .open-house-contact-agent,
.template-classicFlyer .open-house-contact-block,
.template-classicFlyer .open-house-contact-meta {
  display: grid;
  gap: 0.25cqw;
  min-width: 0;
}

.template-classicFlyer .open-house-contact-agent + .open-house-contact-agent {
  padding-top: 0.7cqw;
  border-top: 1px solid var(--flyer-tan);
}

.template-classicFlyer .open-house-contact-agent strong,
.template-classicFlyer .open-house-contact-block strong {
  display: block;
  overflow-wrap: anywhere;
  color: var(--flyer-primary);
  font-size: clamp(10px, 2cqw, 15px);
  line-height: 1.08;
  font-weight: 950;
}

.template-classicFlyer .open-house-contact-agent span,
.template-classicFlyer .open-house-contact-agent small,
.template-classicFlyer .open-house-contact-block span,
.template-classicFlyer .open-house-contact-block small,
.template-classicFlyer .open-house-contact-meta span {
  display: block;
  overflow-wrap: anywhere;
}

.template-classicFlyer .open-house-contact-agent small,
.template-classicFlyer .open-house-contact-block small {
  font-size: clamp(7px, 1.2cqw, 9px);
  font-weight: 750;
}

.template-classicFlyer .open-house-bottom-contact span,
.template-classicFlyer .open-house-contact-right span {
  overflow-wrap: anywhere;
  font-size: clamp(8px, 1.55cqw, 12px);
  font-weight: 800;
  line-height: 1.25;
}

.template-classicFlyer .open-house-features ul,
.template-classicFlyer .open-house-features-left ul,
.template-classicFlyer .open-house-features-center ul,
.template-classicFlyer .open-house-features-middle ul {
  display: grid;
  gap: 0.55cqw;
  max-width: none;
  margin: 0;
  padding-left: 2.5cqw;
  font-size: clamp(10px, 1.8cqw, 14px);
  line-height: 1.3;
}

.template-classicFlyer .open-house-bottom-cta {
  justify-self: center;
  text-align: center;
  color: var(--flyer-primary);
  font-size: clamp(12px, 2.6cqw, 20px);
  line-height: 1.1;
}

.template-classicFlyer .classic-bottom-agent-photos {
  grid-template-columns: 18cqw minmax(0, 1fr) 18cqw;
  gap: 2cqw;
}

.template-classicFlyer .classic-bottom-agent-photos .agent-hero-photo {
  min-height: 18cqw;
}

.template-classicFlyer .open-house-bottom small {
  color: var(--flyer-dark);
  font-size: clamp(8px, 1.2cqw, 9px);
}

.marketing-copy {
  max-height: 160px;
  overflow: auto;
  margin: 0;
  padding: 12px;
  white-space: pre-wrap;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  line-height: 1.45;
}

.non-mls-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.non-mls-form input,
.non-mls-form select,
.non-mls-form textarea {
  font-size: 14px;
}

.non-mls-form input,
.non-mls-form select {
  min-height: 40px;
  padding: 8px 10px;
}

.listing-address-grid {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(220px, 1.7fr) minmax(120px, 0.75fr) minmax(180px, 1.15fr) minmax(150px, 0.9fr) minmax(130px, 0.8fr);
  gap: 10px;
  align-items: end;
  width: 100%;
}

.listing-top-grid,
.listing-main-grid,
.listing-financial-grid,
.listing-details-grid,
.listing-approval-grid {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
  width: 100%;
  min-width: 0;
}

.listing-top-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.listing-main-grid,
.listing-financial-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.listing-details-grid {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.listing-approval-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.agent-listing-form input,
.agent-listing-form select {
  width: 100%;
  height: 42px;
  min-height: 42px;
  padding: 0 12px;
  box-sizing: border-box;
  border-radius: 8px;
  font: inherit;
}

.agent-listing-form textarea {
  width: 100%;
  box-sizing: border-box;
  border-radius: 8px;
}

.listing-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.listing-field span {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  text-transform: uppercase;
}

.listing-approval-grid select {
  width: 100%;
  height: 42px;
  min-height: 42px;
  box-sizing: border-box;
}

.listing-address-field {
  display: flex !important;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.listing-address-field span {
  display: block;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  text-transform: uppercase;
}

.listing-address-grid input,
.listing-address-grid select {
  width: 100%;
  height: 42px;
  min-height: 42px;
  padding: 0 12px;
  box-sizing: border-box;
  border-radius: 8px;
  font: inherit;
}

.field-validation-message {
  grid-column: 1 / -1;
  min-height: 0;
  color: #a33b2c;
  font-size: 12px;
}

.listing-workspace-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.non-mls-form textarea,
.non-mls-form button,
.listing-attestations,
.private-showing-field,
.property-photo-card,
.compact-field-grid {
  grid-column: 1 / -1;
}

.compact-field-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(110px, 1fr));
  gap: 10px;
  align-items: end;
}

.compact-field-grid label {
  display: block;
  margin: 0;
  min-width: 0;
}

.compact-field-grid label span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.compact-field-grid input,
.compact-field-grid select {
  box-sizing: border-box;
  width: 100%;
  min-height: 40px;
  height: 40px;
  padding: 8px 10px;
  font-size: 14px;
}

.property-photo-card {
  margin-top: 12px;
  padding: 12px;
  background: #f7faf7;
  border: 1px solid #d9e3d8;
  border-radius: 12px;
}

.property-photo-card-header {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.property-photo-card-header h3 {
  margin: 0;
  font-size: 15px;
}

.property-photo-card-header p {
  margin: 3px 0 0;
  color: #667;
  font-size: 12px;
}

#propertyPhotoStatus {
  color: #667;
  font-size: 13px;
  white-space: nowrap;
}

.property-photo-actions {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 10px;
  align-items: center;
}

.property-photo-actions input[type="file"],
.property-photo-actions button {
  width: 100%;
  min-height: 40px;
}

.listing-attestations {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 14px;
  background: #f7f5ef;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.private-showing-field {
  display: grid;
  gap: 6px;
}

.private-showing-field > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.private-showing-field small {
  color: var(--muted);
  font-size: 12px;
}

.listing-attestations legend {
  padding: 0 6px;
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
}

.listing-attestations label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.listing-attestations input {
  width: 18px;
  min-height: 18px;
  margin-top: 2px;
}

.listing-attestations span {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.4;
}

.uploaded-listings {
  display: grid;
  gap: 10px;
}

.my-listings-folder {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding: 14px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.my-listings-folder-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.my-listings-folder-head h3,
.my-listings-folder-head p {
  margin: 0;
}

.my-listings-folder-head h3 {
  font-size: 18px;
}

.my-listings-folder-head p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.my-listings-panel {
  display: grid;
  gap: 10px;
}

@media (max-width: 900px) {
  .listing-address-grid {
    grid-template-columns: 2fr 1fr 1.5fr;
  }
}

@media (max-width: 1100px) {
  .listing-main-grid,
  .listing-financial-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .listing-details-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .listing-top-grid,
  .listing-approval-grid {
    grid-template-columns: 1fr;
  }

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

  .listing-address-field--street {
    grid-column: 1 / -1;
  }

  .listing-main-grid,
  .listing-financial-grid,
  .listing-details-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .listing-address-grid,
  .listing-main-grid,
  .listing-financial-grid,
  .listing-details-grid {
    grid-template-columns: 1fr;
  }

  .listing-address-field--street {
    grid-column: auto;
  }
}

@media (max-width: 700px) {
  .compact-field-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .property-photo-card-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .property-photo-actions {
    grid-template-columns: 1fr;
  }

  #propertyPhotoStatus {
    white-space: normal;
  }

  .client-lead-card {
    grid-template-columns: 1fr;
  }

  .client-lead-card em {
    justify-self: start;
  }
}

@media (max-width: 480px) {
  .listing-address-grid {
    grid-template-columns: 1fr;
  }

  .listing-address-field--street {
    grid-column: auto;
  }
}

@media (max-width: 420px) {
  .listing-address-grid {
    grid-template-columns: 1fr;
  }

  .compact-field-grid {
    grid-template-columns: 1fr;
  }
}

.uploaded-listing {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  background: #fbfaf7;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.uploaded-listing span,
.uploaded-listing small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.public-listings-section {
  display: grid;
  gap: 14px;
}

.public-listings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.public-listing-card {
  overflow: hidden;
  display: grid;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--soft-shadow);
}

.public-listing-body {
  display: grid;
  gap: 8px;
  padding: 14px;
}

.public-listing-body h3,
.public-listing-body p {
  margin: 0;
}

.public-listing-body h3 {
  color: var(--ink);
  font-size: 18px;
  line-height: 1.18;
}

.public-listing-body > strong {
  color: var(--moss);
  font-size: 20px;
}

.public-listing-body p:not(.eyebrow) {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.public-listing-tags,
.public-listing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.public-listing-tags span {
  padding: 5px 8px;
  color: #244532;
  background: #eef5ef;
  border: 1px solid #d5e4d8;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 850;
}

.public-listing-actions button {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid #8db9e5;
  border-radius: 7px;
  background: #f4f9ff;
  color: #2368b1;
  font-size: 12px;
  font-weight: 900;
}

.public-listing-actions button:last-child {
  border-color: #93c8c6;
  background: #eefafa;
  color: #087877;
}

.public-detail-actions .danger-btn {
  background: #8f2f2f;
  border-color: #8f2f2f;
  color: #fff;
}

.public-detail-actions .danger-btn:hover {
  background: #742424;
}

.doc-workspace {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(320px, 0.85fr) minmax(320px, 1fr);
  gap: 16px;
  margin-top: 16px;
  align-items: start;
}

.doc-library {
  display: grid;
  gap: 9px;
}

.forms-workspace-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.forms-workspace-actions .ghost-btn,
.forms-workspace-actions .ghost-link {
  min-height: 34px;
  padding: 7px 10px;
  font-size: 12px;
}

.forms-workspace-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
  padding: 4px;
  background: #eef4ee;
  border: 1px solid #dce5dc;
  border-radius: 10px;
}

.forms-workspace-tabs button {
  min-height: 34px;
  padding: 7px 11px;
  background: transparent;
  border: 0;
  border-radius: 8px;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
}

.forms-workspace-tabs button.active {
  background: white;
  color: var(--green);
  box-shadow: 0 1px 4px rgba(15, 40, 20, 0.08);
}

.forms-workspace-tabs button[data-forms-workspace-tab="saved"] {
  background: #fff4c7;
  color: #755400;
  border: 1px solid #e8c967;
}

.forms-workspace-tabs button[data-forms-workspace-tab="saved"].active {
  background: #f4c84b;
  color: #3f2d00;
  border-color: #c99d24;
  box-shadow: 0 2px 6px rgba(117, 84, 0, 0.2);
}

.forms-workspace-panel[hidden] {
  display: none;
}

.forms-linked-client-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto auto auto;
  gap: 10px;
  align-items: end;
  margin-top: 12px;
  padding: 10px;
  background: #f7faf7;
  border: 1px solid #dce5dc;
  border-radius: 8px;
}

.forms-linked-client-row label {
  display: grid;
  gap: 5px;
  margin: 0;
}

.forms-linked-client-row label span,
#formsLinkedClientStatus {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.forms-linked-client-row select,
.forms-linked-client-row button {
  min-height: 38px;
}

#formsLinkedClientStatus {
  align-self: center;
  white-space: nowrap;
}

.form-crm-contact-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-top: 8px;
  padding: 9px 10px;
  background: #fffdf7;
  border: 1px solid #e5dcc8;
  border-radius: 8px;
  font-size: 13px;
}

.form-crm-contact-row[hidden] {
  display: none;
}

.form-crm-contact-row strong,
.form-crm-contact-row span {
  display: block;
}

.form-crm-contact-row strong {
  color: var(--ink);
}

.form-crm-contact-row span {
  margin-top: 2px;
  color: var(--muted);
}

.form-crm-contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.form-crm-contact-row .ghost-btn {
  min-height: 32px;
  padding: 6px 9px;
  font-size: 12px;
}

.forms-utility-panels {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.custom-forms-panel,
.saved-forms-workspace-panel {
  margin-top: 14px;
}

.custom-forms-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 420px));
  gap: 14px;
  align-items: start;
}

.custom-form-card,
.saved-forms-workspace-shell {
  display: grid;
  gap: 10px;
  padding: 14px;
  background: #f8faf8;
  border: 1px solid #dce5dc;
  border-radius: 12px;
}

.custom-form-card h3,
.saved-forms-workspace-shell h3 {
  margin: 0;
  font-size: 17px;
}

.custom-form-card p,
.saved-forms-workspace-shell p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.custom-form-upload {
  display: grid;
  gap: 6px;
  margin: 0;
}

.custom-form-upload span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.custom-form-plan {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.saved-forms-workspace-shell {
  max-width: 440px;
  background: #fff9df;
  border-color: #e8cf7a;
}

.saved-forms-compact {
  padding: 12px;
  margin-top: 14px;
  background: #fff4c7;
  border: 1px solid #dfbd4e;
  border-radius: 12px;
}

.saved-forms-compact .compact-folder-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.saved-forms-compact h3 {
  margin: 0;
  font-size: 15px;
}

.saved-forms-compact p {
  margin: 4px 0 0;
  color: #667;
  font-size: 12px;
}

.saved-forms-panel {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.saved-forms-panel[hidden] {
  display: none;
}

.saved-forms-panel input[type="search"] {
  width: 100%;
  min-height: 36px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.saved-forms-list {
  display: grid;
  gap: 8px;
  max-height: 260px;
  overflow: auto;
}

.saved-form-card {
  display: grid;
  gap: 8px;
  padding: 10px;
  background: #fffdf3;
  border: 1px solid #e2c45f;
  border-left: 5px solid #d2a51f;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(117, 84, 0, 0.08);
}

.saved-form-card strong {
  color: #5d4300;
}

.saved-form-card strong,
.saved-form-card span,
.saved-form-card small {
  display: block;
}

.saved-form-card span,
.saved-form-card small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.saved-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-start;
}

.saved-form-actions button {
  min-height: 32px;
  padding: 6px 9px;
  font-size: 12px;
}

.forms-utility-panel {
  display: grid;
  gap: 10px;
  padding: 12px;
  background: #f7faf7;
  border: 1px solid #dce5dc;
  border-radius: 8px;
}

.forms-utility-panel[hidden] {
  display: none;
}

.forms-utility-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.forms-utility-panel-head strong,
.forms-utility-panel-head span {
  display: block;
}

.forms-utility-panel-head span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.broker-approval-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.doc-card {
  display: grid;
  gap: 4px;
  width: 100%;
  min-height: 72px;
  padding: 12px;
  color: var(--ink);
  background: #fbfaf7;
  border: 1px solid var(--line);
  border-radius: 8px;
  text-align: left;
}

.doc-card.active {
  border-color: var(--moss);
  background: #edf6ef;
  box-shadow: 0 0 0 2px rgba(70, 98, 77, 0.16);
}

.doc-card span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.compact-summary {
  padding: 10px;
}

.compact-checklist-form {
  grid-template-columns: 1fr;
}

.doc-builder,
.doc-preview {
  display: grid;
  gap: 12px;
  padding: 16px;
  background: #fbfaf7;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.doc-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.offer-template-settings {
  display: grid;
  gap: 10px;
  padding: 12px;
  background: #f3f7f3;
  border: 1px solid #d8e2d8;
  border-radius: 8px;
}

.offer-template-settings[hidden] {
  display: none;
}

.offer-settings-head,
.offer-template-actions,
.offer-branding-fields {
  grid-column: 1 / -1;
}

.offer-settings-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.offer-settings-head strong,
.offer-settings-head span {
  display: block;
}

.offer-settings-head span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.offer-branding-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.offer-branding-fields[hidden] {
  display: none;
}

.offer-template-settings label,
.doc-checkbox-group {
  display: grid;
  gap: 6px;
}

.offer-template-settings label span,
.doc-checkbox-group legend {
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.offer-template-actions {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.doc-checkbox-group {
  grid-column: 1 / -1;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.doc-checkbox-group legend {
  padding: 0 4px;
}

.doc-checkbox-group label {
  display: flex;
  gap: 6px;
  align-items: center;
  font-size: 12px;
}

.offer-form-fields {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.offer-form-fields label[data-field-name="propertyAddress"],
.offer-form-fields label[data-field-name="subjectTo"],
.offer-form-fields label[data-field-name="brokerLine"],
.offer-form-fields label[data-field-name="buyerAttorneyAddress"],
.offer-form-fields label[data-field-name="sellerAttorneyAddress"] {
  grid-column: span 2;
}

.doc-form label:has(textarea) {
  grid-column: 1 / -1;
}

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

.doc-share {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding: 12px;
  background: #f3f7f3;
  border: 1px solid #d8e2d8;
  border-radius: 8px;
}

.doc-actions button {
  min-width: 0;
  padding-inline: 10px;
}

.doc-preview-output {
  min-height: 520px;
  max-height: 720px;
  overflow: auto;
  margin: 0;
  padding: 18px;
  color: #1f261f;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: "Courier New", ui-monospace, monospace;
  font-size: 13px;
  line-height: 1.5;
  white-space: pre-wrap;
}

.my-forms {
  grid-column: 1 / -1;
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.my-forms-workspace {
  display: grid;
  grid-template-columns: minmax(240px, 0.32fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.my-forms-sidebar,
.my-form-editor,
.my-form-upload,
.my-form-list,
.my-form-field-editor {
  display: grid;
  gap: 10px;
}

.my-form-upload {
  padding: 12px;
  background: #f3f7f3;
  border: 1px solid #d8e2d8;
  border-radius: 8px;
}

.my-form-upload label,
.my-form-field-editor label {
  display: grid;
  gap: 5px;
}

.my-form-upload label span,
.my-form-field-editor label span {
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.my-form-permission {
  display: flex !important;
  grid-template-columns: auto 1fr;
  align-items: start;
}

.my-form-status {
  min-height: 18px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.my-form-status.success {
  color: #2f6d43;
}

.my-form-status.error {
  color: #a32f2f;
}

.my-form-library-folder {
  overflow: hidden;
  background: #fffdf7;
  border: 1px solid #decf9a;
  border-radius: 8px;
}

.my-form-library-folder > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  cursor: pointer;
  list-style: none;
  color: #4d3d12;
  background: #f5e7a8;
  font-weight: 900;
}

.my-form-library-folder > summary::-webkit-details-marker {
  display: none;
}

.my-form-library-folder > summary::after {
  content: "+";
  margin-left: auto;
  font-size: 20px;
  line-height: 1;
}

.my-form-library-folder[open] > summary::after {
  content: "−";
}

.my-form-library-folder > summary small {
  color: #69571e;
  font-size: 12px;
}

.my-form-library-body {
  display: grid;
  gap: 10px;
  padding: 10px;
}

.my-form-search {
  display: grid;
  gap: 5px;
}

.my-form-search span {
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.my-form-search input {
  width: 100%;
}

.my-form-library-folder .my-form-list {
  max-height: 430px;
  overflow-y: auto;
  padding-right: 3px;
}

.my-form-list-item {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 11px;
  color: var(--ink);
  background: #fbfaf7;
  border: 1px solid var(--line);
  border-radius: 8px;
  text-align: left;
}

.my-form-list-item.active {
  background: #edf6ef;
  border-color: var(--moss);
  box-shadow: 0 0 0 2px rgba(70, 98, 77, 0.14);
}

.my-form-list-item span,
.my-form-list-item small,
.my-form-editor-head span {
  color: var(--muted);
  font-size: 12px;
}

.my-form-editor-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.my-form-editor-head strong,
.my-form-editor-head span {
  display: block;
}

.my-form-actions,
.my-form-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.my-form-actions .danger-btn {
  min-height: 36px;
  padding: 0 12px;
  color: white;
  background: #b42318;
  border: 1px solid #b42318;
  border-radius: 7px;
  font-weight: 900;
}

.my-form-actions .danger-btn:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.my-forms-account-scope {
  margin: -4px 0 14px;
  padding: 9px 12px;
  color: #174f3b;
  background: #edf8f2;
  border: 1px solid #9ed2b8;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 800;
}

.my-forms-account-scope.signed-out {
  color: #744b00;
  background: #fff8e5;
  border-color: #e8c76a;
}

.my-form-toolbar button {
  min-height: 36px;
  padding: 0 12px;
  color: white;
  border: 1px solid transparent;
  border-radius: 7px;
  font-weight: 800;
  box-shadow: 0 1px 2px rgba(18, 30, 45, 0.18);
  transition: filter 120ms ease, transform 120ms ease, box-shadow 120ms ease;
}

.my-form-toolbar button:hover {
  filter: brightness(0.94);
  transform: translateY(-1px);
}

.my-form-toolbar button:focus-visible,
.my-form-toolbar button.active {
  outline: 3px solid rgba(24, 77, 135, 0.24);
  outline-offset: 2px;
  box-shadow: 0 0 0 2px white, 0 0 0 5px currentColor;
}

.my-form-toolbar .my-form-tool-text {
  color: #ffffff;
  background: #2368b1;
  border-color: #18558f;
}

.my-form-toolbar .my-form-tool-date {
  color: #ffffff;
  background: #7651b5;
  border-color: #5e3e94;
}

.my-form-toolbar .my-form-tool-checkmark {
  color: #ffffff;
  background: #167d67;
  border-color: #0e6653;
}

.my-form-toolbar .my-form-tool-delete {
  color: #ffffff;
  background: #b42318;
  border-color: #8f1b13;
}

.my-form-toolbar .my-form-tool-undo {
  color: #3e2c00;
  background: #f2bd3e;
  border-color: #ca9415;
}

.my-form-toolbar .my-form-tool-save {
  color: #ffffff;
  background: #2f7d32;
  border-color: #236527;
}

.my-form-toolbar .my-form-tool-pdf {
  color: #ffffff;
  background: #344a8a;
  border-color: #26386c;
}

.my-form-field-editor {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 12px;
  background: #fbfaf7;
  border: 1px solid var(--line);
  border-radius: 8px;
  opacity: 0.58;
}

.my-form-field-editor-note {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.my-form-advanced-position {
  grid-column: 1 / -1;
  padding: 10px;
  background: #f8fbff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.my-form-advanced-position summary {
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.my-form-advanced-position div {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.my-form-preview-tip {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.my-form-mode-help {
  display: grid;
  gap: 3px;
  padding: 11px 12px;
  background: #f4f9ff;
  border: 1px solid #8db9e5;
  border-radius: 8px;
}

.my-form-mode-help strong {
  color: #174f8f;
  font-size: 14px;
}

.my-form-mode-help span {
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.my-form-field-editor.has-selection {
  opacity: 1;
}

.my-form-canvas {
  min-height: 560px;
  overflow: auto;
  padding: 12px;
  background: #eef2f5;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.my-form-empty {
  display: grid;
  min-height: 360px;
  place-items: center;
  color: var(--muted);
  font-weight: 800;
}

.my-form-reattach {
  display: grid;
  justify-items: center;
  gap: 10px;
  max-width: 520px;
  padding: 24px;
  text-align: center;
}

.my-form-reattach span {
  color: var(--muted);
  font-weight: 600;
}

.my-form-pdf-stage {
  position: relative;
  width: 820px;
  height: 1060px;
  max-width: none;
  margin: 0 auto;
  background: white;
  border: 1px solid #cfd6df;
  box-shadow: 0 10px 28px rgba(25, 35, 45, 0.14);
}

.my-form-pdf-stage.is-landscape {
  width: 1060px;
  height: 820px;
}

.my-form-pdf-canvas {
  display: block;
  width: 100%;
  height: 100%;
  background: white;
}

.my-form-editor-zoom {
  position: sticky;
  top: 0;
  z-index: 12;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: fit-content;
  margin: 0 auto 10px;
  padding: 7px 10px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: 0 3px 12px rgba(25, 35, 45, 0.12);
}

.my-form-editor-zoom button {
  min-width: 38px;
  min-height: 34px;
  padding: 4px 10px;
  color: var(--ink);
  background: white;
  border: 1px solid var(--line);
  border-radius: 7px;
  font-weight: 900;
}

.my-form-editor-zoom strong {
  min-width: 48px;
  text-align: center;
}

.my-form-overlay {
  position: absolute;
  inset: 0;
  pointer-events: auto;
}

.my-form-field {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  overflow: hidden;
  padding: 2px 5px;
  color: #111;
  background: rgba(255, 249, 196, 0.78);
  border: 1px dashed #2368b1;
  border-radius: 2px;
  font: 700 12px Arial, sans-serif;
  text-align: left;
  pointer-events: auto;
  touch-action: none;
  user-select: none;
  cursor: move;
}

.my-form-field-input {
  width: 100%;
  min-width: 0;
  height: 100%;
  padding: 0;
  color: #111;
  background: transparent;
  border: 0;
  font: inherit;
  outline: 0;
}

.my-form-field-input[readonly] {
  cursor: move;
}

.my-form-field-input:not([readonly]) {
  cursor: text;
}

.my-form-field.active {
  background: rgba(202, 232, 255, 0.9);
  border: 2px solid #2368b1;
}

.my-form-field.type-checkbox {
  justify-content: center;
  padding: 0;
}

.my-form-field.type-checkbox span {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  border: 1px solid #111;
}

.my-form-resize-handle {
  position: absolute;
  right: -3px;
  bottom: -3px;
  width: 12px;
  height: 12px;
  background: #2368b1;
  border: 2px solid white;
  border-radius: 50%;
  cursor: nwse-resize;
}

.offer-preview-page {
  width: min(100%, 760px);
  margin: 0 auto;
  padding: 24px;
  color: #111;
  background: white;
  border: 1px solid #d6d6d6;
  font-family: Arial, sans-serif;
  font-size: 11px;
  line-height: 1.25;
  white-space: normal;
}

.offer-preview-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 58px;
  margin-bottom: 10px;
  text-align: center;
}

.offer-preview-logo {
  display: grid;
  width: 72px;
  height: 48px;
  place-items: center;
}

.offer-preview-logo img {
  max-width: 72px;
  max-height: 48px;
  object-fit: contain;
}

.offer-preview-brand strong,
.offer-preview-brand span {
  display: block;
}

.offer-preview-brand strong {
  font-size: 14px;
}

.offer-preview-brand span {
  color: #444;
  font-size: 10px;
}

.offer-preview-page h1 {
  margin: 4px 0 14px;
  font-size: 20px;
  letter-spacing: 0.06em;
  text-align: center;
}

.offer-preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.offer-preview-grid.compact {
  margin-top: 8px;
  gap: 6px;
}

.offer-preview-field {
  min-height: 34px;
  padding: 5px 7px;
  border: 1px solid #cfcfcf;
}

.offer-preview-field.wide {
  grid-column: 1 / -1;
}

.offer-preview-field span,
.offer-preview-field strong {
  display: block;
}

.offer-preview-field span {
  color: #555;
  font-size: 9px;
  text-transform: uppercase;
}

.offer-preview-field strong {
  min-height: 14px;
  color: #111;
  font-size: 11px;
  font-weight: 700;
}

.offer-preview-items {
  margin-top: 8px;
  padding: 7px;
  border: 1px solid #cfcfcf;
}

.offer-preview-items > span {
  display: block;
  margin-bottom: 5px;
  color: #555;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
}

.offer-preview-items div {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}

.offer-preview-items label {
  display: flex;
  gap: 5px;
  align-items: center;
}

.offer-preview-items b {
  display: grid;
  width: 14px;
  height: 14px;
  place-items: center;
  border: 1px solid #111;
  font-size: 9px;
}

.offer-preview-items p {
  margin: 6px 0 0;
}

.offer-preview-signatures {
  display: grid;
  grid-template-columns: 1.5fr 0.7fr;
  gap: 12px 18px;
  margin-top: 16px;
}

.offer-signature-line strong {
  display: block;
  min-height: 18px;
  border-bottom: 1px solid #111;
}

.offer-signature-line span {
  display: block;
  margin-top: 3px;
  color: #555;
  font-size: 9px;
  text-transform: uppercase;
}

.offer-preview-footer {
  margin: 12px 0 0;
  padding-top: 7px;
  border-top: 1px solid #ccc;
  color: #333;
  font-size: 9px;
  text-align: center;
}

dialog {
  width: min(460px, calc(100vw - 28px));
  border: 0;
  border-radius: 8px;
  padding: 0;
  box-shadow: var(--shadow);
}

dialog::backdrop {
  background: rgba(24, 33, 29, 0.48);
}

.preview-dialog {
  width: min(1120px, calc(100vw - 28px));
  height: calc(100vh - 28px);
  max-height: calc(100vh - 28px);
  overflow: auto;
}

.listing-preview-dialog {
  width: min(980px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  overflow: auto;
}

.dialog-card {
  position: relative;
  display: grid;
  gap: 12px;
  padding: 24px;
  background: var(--panel);
}

.preview-dialog-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
  height: 100%;
  max-height: calc(100vh - 28px);
  overflow: visible;
  padding: 18px;
  background: var(--panel);
}

.listing-preview-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  background: var(--panel);
}

.listing-preview-content {
  display: grid;
  grid-template-columns: minmax(240px, 0.8fr) minmax(0, 1.2fr);
  gap: 16px;
  align-items: start;
}

.listing-preview-photo {
  width: 100%;
  min-height: 300px;
  max-height: 520px;
  object-fit: cover;
  background: #f3f1e8;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.listing-preview-photo-button {
  display: block;
  width: 100%;
  padding: 0;
  background: transparent;
  border: 0;
  cursor: zoom-in;
}

.listing-preview-photo-button .listing-preview-photo {
  display: block;
}

.listing-preview-photo.empty {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 800;
}

.uploaded-listing-photo {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  margin-bottom: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f3f1e8;
}

.listing-preview-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(86px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.listing-preview-gallery button {
  display: block;
  padding: 0;
  background: transparent;
  border: 0;
  cursor: zoom-in;
}

.listing-preview-gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f3f1e8;
}

.listing-preview-gallery button:hover img,
.listing-preview-photo-button:hover .listing-preview-photo {
  border-color: #2368b1;
  box-shadow: 0 0 0 2px rgba(35, 104, 177, 0.16);
}

.listing-preview-main {
  display: grid;
  gap: 14px;
}

.listing-preview-main h3 {
  margin: 0 0 6px;
  font-size: 26px;
  line-height: 1.1;
}

.listing-preview-main > div > strong {
  color: var(--moss);
  font-size: 22px;
}

.listing-preview-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.listing-preview-details div,
.listing-preview-notes {
  padding: 10px;
  background: #fbfaf7;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.listing-preview-details dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.listing-preview-details dd {
  margin: 3px 0 0;
  color: var(--ink);
  font-weight: 800;
}

.listing-preview-notes p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.listing-preview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.listing-photo-viewer-dialog {
  width: min(1080px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  overflow: auto;
}

.listing-photo-viewer-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  background: var(--panel);
}

.listing-photo-viewer-stage {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.listing-photo-viewer-stage img {
  width: 100%;
  max-height: calc(100vh - 160px);
  object-fit: contain;
  background: #111;
  border-radius: 8px;
}

.listing-photo-viewer-nav {
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid #8db9e5;
  border-radius: 8px;
  background: #f4f9ff;
  color: #2368b1;
  font-weight: 900;
}

.dialog-card h2 {
  margin: 0;
}

.form-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.agent-license-badge {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 0 10px;
  color: var(--muted);
  background: #eef2f5;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.developer-mode-badge {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 0 10px;
  color: #6d3f08;
  background: #fff4d8;
  border: 1px solid #efd18b;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.developer-mode-badge[hidden] {
  display: none !important;
}

.agent-license-badge.status-verified {
  color: #214c32;
  background: #e5f2e8;
  border-color: #bfdbc6;
}

.agent-license-badge.status-pending-review,
.agent-license-badge.status-needs-more-info {
  color: #6f4c12;
  background: #fff6df;
  border-color: #efd28d;
}

.agent-license-badge.status-rejected,
.agent-license-badge.status-expired-recheck-needed {
  color: #733126;
  background: #fff0ec;
  border-color: #e5b9ad;
}

.verification-admin-panel {
  grid-column: 1 / -1;
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.verification-summary,
.public-account-form,
.admin-review-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.verification-summary div,
.admin-review-request {
  display: grid;
  gap: 4px;
  padding: 10px;
  background: #fbfaf7;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.verification-summary .verification-message {
  grid-column: 1 / -1;
  background: #fff6df;
  border-color: #efd28d;
}

.verification-summary button {
  justify-self: start;
}

.verification-summary strong,
.admin-review-request strong {
  color: var(--ink);
}

.verification-summary span,
.admin-review-request span,
.admin-review-request small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.public-account-form input,
.public-account-form select {
  width: 100%;
}

.admin-review-panel {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.admin-review-checklist {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.admin-review-checklist legend {
  padding: 0 6px;
  color: var(--navy);
  font-size: 12px;
  font-weight: 900;
}

.admin-review-check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 28px;
  line-height: 1.3;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.admin-review-check-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  margin: 0;
}

.admin-review-check-row label {
  margin: 0;
  display: block;
}

.admin-notes-field {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}

.admin-notes-field span {
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.verification-form-status {
  min-height: 18px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.verification-form-status.error {
  color: #a32f2f;
}

.verification-admin-message {
  padding: 10px;
  color: #6d3f08;
  background: #fff4d8;
  border: 1px solid #efd18b;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

.admin-review-actions {
  grid-template-columns: repeat(4, minmax(0, auto));
  justify-content: start;
}

.is-agent-only.locked-tool {
  position: relative;
}

.is-agent-only.locked-tool::after {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  content: "Agent-only tool. Submit license verification and wait for admin approval.";
  color: var(--ink);
  background: rgba(255, 255, 255, 0.86);
  border-radius: 8px;
  font-weight: 800;
}

html.agent-workspace-access .is-agent-only.locked-tool::after,
html[data-agent-workspace-access="granted"] .is-agent-only.locked-tool::after {
  display: none !important;
  content: none !important;
  pointer-events: none !important;
}

.listing-photo-restore-action {
  display: flex;
  grid-column: 1 / -1;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px dashed #caa86a;
  border-radius: 8px;
  background: #fff8e8;
}

.listing-photo-restore-action button {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid #9b6b20;
  border-radius: 7px;
  color: #6d3f08;
  background: #fff;
  font-weight: 800;
  cursor: pointer;
}

.listing-photo-restore-action span {
  color: #6d3f08;
  font-size: 13px;
  font-weight: 700;
}

.icon-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfaf7;
}

@media (max-width: 980px) {
  .topbar {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .topbar-actions,
  .agent-gate {
    width: 100%;
  }

  .agent-gate {
    align-items: stretch;
    flex-direction: column;
  }

  nav {
    order: 3;
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
  }

  .mvp-nav {
    top: 116px;
  }

  .command-strip,
  .workspace,
  .operations,
  .request-board,
  .matrix-layout,
  .matrix-hero,
  .dashboard-grid,
  .agent-tool-grid,
  .calculator-jump-grid,
  .custom-forms-grid,
  .client-panel-card-grid,
  .crm-workspace,
  .crm-layout,
  .client-leads-workspace,
  .client-calculator-links,
  .marketing-actions,
  .marketing-workspace,
  .branding-form,
  .branding-upload-grid,
  .format-controls,
  .format-button-row,
  .selected-design-actions,
  .generate-flow,
  .layout-card-grid,
  .photo-slot-controls,
  .open-house-gallery,
  .open-house-agents.two-agents,
  .oh-brand-row,
  .oh-agent-line.two-agents,
  .oh-classic-grid,
  .oh-classic-photos,
  .oh-modern-grid,
  .oh-social-strip,
  .apartment-layout,
  .rental-story-stack,
  .open-house-top,
  .open-house-hero-agents,
  .open-house-hero-agents.two-agents,
  .open-house-namebar.two-names,
  .open-house-features ul,
  .rent-topline,
  .rent-hero,
  .rent-detail-row,
  .rent-info-grid,
  .non-mls-form,
  .uploaded-listing,
  .buyer-wishlist-workspace,
  .buyer-details-form,
  .client-lead-form,
  .client-buyer-representation,
  .client-buyer-agent-fields,
  .state-market-form,
  .compliance-item-form,
  .deal-checklist-summary,
  .verification-summary,
  .public-account-form,
  .admin-review-actions,
  .mortgage-calculator-grid,
  .quick-calculator-shell,
  .commission-calculator-grid,
  .commission-form,
  .broker-approval-form,
  .forms-linked-client-row,
  .saved-form-card,
  .listing-preview-content,
  .listing-preview-details,
  .offer-template-settings,
  .offer-template-actions,
  .offer-form-fields,
  .doc-checkbox-group,
  .my-forms-workspace,
  .my-form-field-editor,
  .my-form-advanced-position div,
  .doc-workspace {
    grid-template-columns: 1fr;
  }

  .buyer-list-panel {
    padding: 0 0 14px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .client-list-panel {
    padding: 0 0 14px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .saved-clients-list {
    max-height: none;
  }

  .listing-photo-viewer-stage {
    grid-template-columns: 1fr 1fr;
  }

  .listing-photo-viewer-stage img {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .listing-photo-viewer-nav {
    grid-row: 2;
  }

  .client-profile-head {
    flex-direction: column;
  }

  .client-quick-actions {
    justify-content: flex-start;
  }

  .buyer-wish-list {
    max-height: 260px;
  }

  .buyer-notes-field {
    grid-column: auto;
  }

  .client-notes-field {
    grid-column: auto;
  }

  .state-market-wide {
    grid-column: auto;
  }

  .open-house-side-rail {
    position: static;
    width: auto;
    padding: 12px;
  }

  .open-house-property-stage {
    min-height: auto;
  }

  .main-property-slot {
    min-height: 320px;
  }

  .quick-calculator-display {
    font-size: 30px;
  }

  .quick-calculator-quick-buttons {
    grid-template-columns: 1fr;
  }

  .open-house-overlay-title {
    left: 18px;
    top: 30px;
    max-width: 78%;
  }

  .open-house-flyer.layout-cleanOpenHouse .open-house-property-stage {
    grid-template-columns: 1fr;
  }

  .rent-main-photo {
    min-height: 300px;
  }

  .oh-modern-main,
  .apartment-main,
  .oh-social-photo,
  .rental-social-photo,
  .oh-story-main,
  .rental-story-main {
    min-height: 300px;
  }

  .oh-social-overlay,
  .rental-social-copy {
    margin-top: 0;
  }

  .open-house-namebar > div,
  .open-house-namebar > div:last-child {
    text-align: left;
  }

  .non-mls-form textarea,
  .listing-attestations,
  .photo-preview,
  .non-mls-form button {
    grid-column: auto;
  }

  .matrix-agent-button {
    grid-template-columns: 1fr;
  }

  .doc-form,
  .marketing-form,
  .doc-share,
  .doc-actions {
    grid-template-columns: 1fr;
  }

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

  .home-customizer-toolbar,
  .home-tool-order-row {
    align-items: stretch;
    grid-template-columns: auto minmax(0, 1fr);
  }

  .home-customizer-toolbar {
    flex-direction: column;
  }

  .home-tool-order-row div {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .hero {
    min-height: 560px;
  }

  .topbar {
    gap: 12px;
  }

  .topbar .ghost-btn {
    width: 100%;
  }

  .topbar-actions {
    flex-direction: column;
  }

  .settings-menu-panel {
    position: fixed;
    top: 78px;
    left: 12px;
    right: 12px;
    width: auto;
  }

  .agent-btn,
  .primary-link,
  .ghost-link {
    width: 100%;
  }

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

  .command-strip {
    position: static;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .mvp-nav {
    position: static;
  }

  .dashboard-card {
    min-height: auto;
  }

  .agent-dashboard,
  .agent-tools,
  .verification-admin-panel,
  .state-market-profile,
  .my-forms,
  .client-leads-center,
  .non-mls-uploader,
  .calculator-group,
  .mortgage-calculator,
  .quick-calculator,
  .commission-calculator,
  .marketing-center {
    padding: 14px;
  }

  input,
  select,
  textarea,
  .primary-btn,
  .ghost-btn,
  .danger-btn {
    min-height: 44px;
  }

  .client-leads-actions button,
  .mortgage-actions button,
  .commission-actions button,
  .my-form-actions button,
  .admin-review-actions button,
  .marketing-actions button,
  .doc-actions button,
  .doc-share button,
  .state-market-actions button {
    min-height: 44px;
  }

  .mortgage-form {
    grid-template-columns: 1fr;
  }

  .mortgage-wide-field {
    grid-column: auto;
  }

  .segmented,
  .segmented button,
  .listing-form {
    width: 100%;
  }

  .listing-form {
    grid-template-columns: 1fr;
  }

  .market-stats span {
    width: 100%;
  }
}

@media print {
  @page {
    size: letter portrait;
    margin: 0.25in;
  }

  body * {
    visibility: hidden;
  }

  body.printing-my-form {
    width: 0 !important;
    height: 0 !important;
    min-height: 0 !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    background: white !important;
  }

  body.printing-marketing {
    margin: 0 !important;
    background: white !important;
  }

  body.printing-marketing > :not(#marketingPrintRoot) {
    display: none !important;
  }

  body.printing-marketing #marketingPrintRoot {
    display: block !important;
    position: static !important;
    width: 8in !important;
    height: auto !important;
    margin: 0 auto !important;
    padding: 0 !important;
    visibility: visible !important;
  }

  body.printing-marketing #marketingPrintRoot,
  body.printing-marketing #marketingPrintRoot * {
    visibility: visible !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  body.printing-marketing #marketingPrintRoot .flyer {
    display: block !important;
    width: 8in !important;
    max-width: 8in !important;
    height: auto !important;
    max-height: 10.5in !important;
    margin: 0 !important;
    zoom: 1 !important;
    transform: none !important;
    box-shadow: none !important;
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }

  .doc-preview,
  .doc-preview *,
  body.printing-my-form .my-form-canvas,
  body.printing-my-form .my-form-canvas *,
  body.printing-marketing .marketing-preview-panel,
  body.printing-marketing .marketing-preview-panel * {
    visibility: visible;
  }

  .doc-preview {
    position: absolute;
    inset: 0;
    box-shadow: none;
    border: 0;
    background: white;
  }

  .doc-preview .section-head {
    display: none;
  }

  .doc-preview-output {
    max-height: none;
    border: 0;
    font-size: 12pt;
  }

  .offer-preview-page {
    width: 100%;
    padding: 0;
    border: 0;
    font-size: 10pt;
  }

  body.printing-marketing .doc-preview,
  body.printing-marketing .doc-preview *,
  body.printing-my-form .doc-preview,
  body.printing-my-form .doc-preview * {
    visibility: hidden;
  }

  body.printing-my-form .my-form-canvas {
    position: fixed;
    inset: 0 auto auto 0;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    max-height: none;
    overflow: visible;
    padding: 0;
    background: white;
    border: 0;
    z-index: 2147483647;
  }

  body.printing-my-form .my-form-editor-zoom {
    display: none !important;
  }

  body.printing-my-form .my-form-pdf-stage {
    width: var(--my-form-print-width) !important;
    height: var(--my-form-print-height) !important;
    min-height: 0 !important;
    margin: 0 !important;
    border: 0;
    box-shadow: none;
  }

  body.printing-my-form .my-form-pdf-canvas {
    width: 100% !important;
    height: 100% !important;
  }

  body.printing-my-form .my-form-field {
    background: transparent;
    border-color: transparent;
  }

  body.printing-my-form .my-form-field.type-checkbox span {
    border-color: #111;
  }

  body.printing-marketing .marketing-preview-panel {
    display: none !important;
  }

  body.printing-marketing .flyer-preview {
    max-height: none;
    overflow: visible;
  }

  body.printing-marketing .flyer-preview .flyer {
    width: 760px;
    zoom: 1;
    transform: none;
  }

  body.printing-marketing .marketing-preview-panel .section-head,
  body.printing-marketing .marketing-copy {
    display: none;
  }

}
/* Public marketplace surface. */
.public-market-hero { display: grid; gap: 20px; padding: 42px clamp(18px, 4vw, 56px); background: #f2ede4; border-bottom: 1px solid var(--line); }
.public-market-hero h1 { max-width: 680px; margin: 4px 0 8px; font-size: clamp(32px, 5vw, 58px); }
.public-market-hero p { max-width: 620px; }
.public-search-form { display: grid; grid-template-columns: minmax(240px, 1fr) 180px auto auto; gap: 10px; align-items: center; }
.public-search-form input, .public-search-form select, .public-filter-bar input, .public-filter-bar select { min-height: 44px; }
.public-search-toggle { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--panel); }
.public-search-toggle button { border: 0; background: transparent; padding: 11px 14px; cursor: pointer; }
.public-search-toggle button.active { background: var(--ink); color: #fff; }
.public-filter-bar { display: grid; grid-template-columns: repeat(7, minmax(100px, 1fr)) auto auto; align-items: end; gap: 10px; }
.public-filter-bar label { display: grid; gap: 5px; }
.public-result-count { align-self: center; color: var(--muted); font-size: 13px; white-space: nowrap; }
.public-listing-card { overflow: hidden; }
.public-listing-image { display: block; width: 100%; min-height: 220px; border: 0; background: var(--image-pattern, #e8e5dc); background-size: cover; background-position: center; position: relative; cursor: pointer; text-align: left; }
.public-listing-image .badge { position: absolute; top: 12px; left: 12px; }
.save-listing-btn { border: 0; background: transparent; color: var(--ink); font-size: 26px; line-height: 1; cursor: pointer; padding: 0 2px; }
.save-listing-btn.saved { color: #a13e36; }
.public-listing-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.public-listing-tags span { border-radius: 999px; background: #eee9df; padding: 4px 8px; font-size: 11px; }
.public-saved-item { display: grid; width: 100%; border: 0; border-bottom: 1px solid var(--line); background: transparent; padding: 10px 0; text-align: left; cursor: pointer; }
.public-saved-item span { color: var(--muted); font-size: 12px; }
.public-listing-dialog { width: min(760px, calc(100vw - 32px)); border: 0; padding: 0; background: transparent; }
.public-listing-dialog::backdrop { background: rgba(24, 33, 29, .55); }
.public-listing-dialog .dialog-card { position: relative; }
.public-detail-photo { display: block; width: 100%; max-height: 360px; object-fit: cover; border-radius: 10px; background: #e8e5dc; }
.public-detail-photo.empty { height: 240px; }
.public-detail-address, .public-detail-stats { color: var(--muted); }
.public-detail-price { display: block; margin: 12px 0; font-size: 30px; }
.public-detail-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.public-empty-state { grid-column: 1 / -1; text-align: center; padding: 48px 20px; }
@media (max-width: 980px) { .public-search-form { grid-template-columns: 1fr 1fr; } .public-filter-bar { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 620px) { .public-search-form, .public-filter-bar { grid-template-columns: 1fr; } .public-search-toggle { width: max-content; } .public-listing-image { min-height: 190px; } }
.openmls-account-dialog {
  width: min(94vw, 520px);
  border: 0;
  border-radius: 22px;
  padding: 0;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.35);
}

.openmls-account-dialog::backdrop {
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(3px);
}

.openmls-account-card {
  position: relative;
  width: 100%;
  box-sizing: border-box;
}

.openmls-account-summary {
  margin: 0 0 14px;
  color: #52606d;
}

.openmls-auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
}

.openmls-auth-tabs button {
  border: 1px solid #d8dee6;
  border-radius: 12px;
  padding: 10px 12px;
  background: #f6f8fa;
  color: #344054;
  font-weight: 700;
  cursor: pointer;
}

.openmls-auth-tabs button.active {
  border-color: #1d6b52;
  background: #e8f5ef;
  color: #155b44;
}

.openmls-auth-form {
  display: grid;
  gap: 10px;
}

.openmls-auth-form[hidden] {
  display: none;
}

.openmls-auth-status {
  min-height: 22px;
  margin-top: 12px;
  font-size: 0.92rem;
}

.openmls-auth-status[data-type="success"] { color: #157347; }
.openmls-auth-status[data-type="error"] { color: #b42318; }

.openmls-server-settings {
  margin: 12px 0;
  padding: 10px 0;
  border-top: 1px solid #e4e7ec;
  border-bottom: 1px solid #e4e7ec;
}

.openmls-server-settings label {
  display: grid;
  gap: 6px;
  margin: 10px 0;
  font-size: 0.9rem;
}

.openmls-api-toast {
  position: fixed;
  z-index: 10000;
  right: 18px;
  bottom: 18px;
  max-width: min(420px, calc(100vw - 36px));
  padding: 13px 16px;
  border-radius: 14px;
  background: #1f2937;
  color: white;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.28);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}

.openmls-api-toast.visible {
  opacity: 1;
  transform: translateY(0);
}

.openmls-api-toast[data-type="success"] { background: #166534; }
.openmls-api-toast[data-type="error"] { background: #991b1b; }

/* Mobile and location polish 3.7.0 -------------------------------------- */
html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 92px;
}

button,
a,
input,
select,
textarea {
  touch-action: manipulation;
}

.mobile-quick-nav {
  display: none;
}

.location-privacy-note {
  display: block;
  color: var(--muted);
  line-height: 1.45;
}

.request-location-actions {
  flex-wrap: wrap;
}

@media (max-width: 760px) {
  html {
    scroll-padding-top: 78px;
  }

  body {
    padding-bottom: calc(72px + env(safe-area-inset-bottom));
    overflow-x: hidden;
  }

  .app-shell {
    width: 100%;
    min-width: 0;
  }

  .topbar {
    position: sticky;
    top: 0;
    z-index: 60;
    gap: 8px;
    padding: calc(8px + env(safe-area-inset-top)) 12px 8px;
    background: rgba(255, 255, 255, .97);
    backdrop-filter: blur(12px);
  }

  .topbar > nav {
    display: none;
  }

  .brand {
    min-width: 0;
  }

  .brand small {
    overflow: hidden;
    max-width: 210px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .topbar-actions {
    display: flex;
    width: 100%;
    flex-direction: row;
    gap: 8px;
    overflow-x: auto;
    padding: 2px 0 4px;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
  }

  .topbar-actions > *,
  .topbar .ghost-btn,
  .topbar .ghost-link,
  .topbar .agent-btn {
    flex: 0 0 auto;
    width: auto;
    min-height: 44px;
    white-space: nowrap;
  }

  .mobile-quick-nav {
    position: fixed;
    z-index: 90;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, .98);
    box-shadow: 0 -8px 24px rgba(24, 33, 29, .12);
    backdrop-filter: blur(12px);
  }

  .mobile-quick-nav.agent-mobile-nav {
    grid-template-columns: repeat(5, 1fr);
  }

  .mobile-quick-nav a {
    display: grid;
    min-width: 0;
    min-height: 52px;
    place-items: center;
    align-content: center;
    gap: 2px;
    padding: 3px;
    color: #31413a;
    font-size: 11px;
    font-weight: 800;
    text-align: center;
  }

  .mobile-quick-nav a span {
    font-size: 19px;
    line-height: 1;
  }

  .public-market-hero,
  .public-agent-directory,
  .agent-opportunities,
  .matrix-hero,
  .agent-dashboard,
  .agent-tools,
  .verification-admin-panel,
  .state-market-profile,
  .my-forms,
  .client-leads-center,
  .non-mls-uploader,
  .calculator-group,
  .mortgage-calculator,
  .quick-calculator,
  .commission-calculator,
  .marketing-center {
    border-radius: 14px;
    padding: 14px;
  }

  .public-market-hero h1,
  .matrix-hero h1 {
    font-size: clamp(28px, 9vw, 40px);
    line-height: 1.08;
  }

  .opportunity-panel,
  .opportunity-card {
    padding: 13px;
    border-radius: 12px;
  }

  .assignment-card {
    padding: 0;
  }

  .opportunity-card-head,
  .section-head,
  .agent-chat-heading,
  .notification-panel-head {
    align-items: stretch;
    flex-direction: column;
  }

  .opportunity-state {
    align-self: flex-start;
  }

  .opportunity-facts,
  .approval-readout {
    grid-template-columns: 1fr;
  }

  .available-agent-actions,
  .opportunity-actions,
  .request-history-controls,
  .buyer-looking-actions,
  .request-location-actions,
  .chat-compose > div {
    display: grid;
    width: 100%;
    grid-template-columns: 1fr;
  }

  .available-agent-actions button,
  .opportunity-actions button,
  .request-history-controls button,
  .buyer-looking-actions button,
  .request-location-actions button,
  .chat-compose button,
  .preapproval-submit-button {
    width: 100% !important;
    min-height: 46px;
  }

  input,
  select,
  textarea {
    max-width: 100%;
    font-size: 16px !important;
  }

  input[type="file"] {
    overflow: hidden;
  }

  .chat-message {
    max-width: 90%;
  }

  .notification-panel {
    position: fixed;
    z-index: 100;
    top: calc(8px + env(safe-area-inset-top));
    right: 8px;
    bottom: calc(72px + env(safe-area-inset-bottom));
    left: 8px;
    width: auto;
    max-height: none;
    overflow: auto;
  }

  dialog,
  .public-listing-dialog,
  .openmls-account-dialog,
  .listing-preview-dialog,
  .listing-photo-manager-dialog,
  .listing-photo-viewer-dialog {
    width: 100vw;
    max-width: none;
    max-height: 100dvh;
    margin: 0;
    padding: max(10px, env(safe-area-inset-top)) 10px max(10px, env(safe-area-inset-bottom));
    border-radius: 0;
    overflow: auto;
  }

  .dialog-card,
  .openmls-account-card,
  .listing-preview-card,
  .listing-photo-manager-card,
  .listing-photo-viewer-card {
    width: 100%;
    max-width: none;
    min-height: auto;
    border-radius: 14px;
  }

  .openmls-api-toast {
    right: 10px;
    bottom: calc(76px + env(safe-area-inset-bottom));
    left: 10px;
    max-width: none;
  }
}

@media (max-width: 420px) {
  .brand small {
    max-width: 155px;
  }

  .public-market-hero,
  .public-agent-directory,
  .agent-opportunities {
    padding: 11px;
  }

  .opportunity-request-form {
    padding: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto !important;
  }

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

.buyer-looking-status-panel {
  border-color: rgba(24, 102, 73, 0.28);
  background: linear-gradient(135deg, rgba(234, 247, 240, 0.92), rgba(255, 255, 255, 0.96));
}

.buyer-looking-privacy {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(24, 102, 73, 0.08);
  color: #24463a;
  line-height: 1.45;
}

.buyer-looking-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.opportunity-state.active {
  background: #d9f3e5;
  color: #155d3d;
}

.buyer-looking-card {
  border-left-color: #1b7651;
}

.my-agent-requests-body {
  padding-top: 12px;
}

.openmls-delete-account {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #f1b7b7;
}

.openmls-delete-account summary {
  color: #9f1d1d;
  font-weight: 700;
  cursor: pointer;
}

.openmls-delete-warning {
  margin: 12px 0;
  padding: 12px;
  border: 1px solid #efc3c3;
  border-radius: 10px;
  background: #fff4f4;
  color: #7a1c1c;
}

.openmls-delete-warning p {
  margin: 6px 0 0;
}

.notification-button { position: relative; }
.notification-button span {
  display: inline-grid;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  place-items: center;
  border-radius: 999px;
  background: #b42318;
  color: #fff;
  font-size: 11px;
}
.notification-panel {
  position: fixed;
  z-index: 9000;
  top: 76px;
  right: 24px;
  width: min(430px, calc(100vw - 32px));
  max-height: min(70vh, 620px);
  overflow: auto;
  padding: 16px;
  border: 1px solid #d7dedb;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(17, 38, 31, .22);
}
.notification-panel-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 12px; }
.notification-panel-head div { display: grid; gap: 3px; }
.notification-panel-head small { color: #64746e; }
.notification-list { display: grid; gap: 8px; }
.notification-item { width: 100%; padding: 12px; text-align: left; border: 1px solid #e0e6e3; border-radius: 12px; background: #fff; color: inherit; cursor: pointer; }
.notification-item.unread { border-left: 4px solid #176b4b; background: #f0faf5; }
.notification-item strong, .notification-item span, .notification-item small { display: block; }
.notification-item span { margin: 5px 0; line-height: 1.35; }
.notification-item small { color: #66746f; }
.notification-empty { padding: 22px 8px; text-align: center; color: #66746f; }
.chat-live-status { color: #267151; font-size: 12px; font-weight: 650; align-self: center; }
.chat-recall-button { margin-left: 8px; padding: 2px 7px; border: 0; border-radius: 999px; background: rgba(255,255,255,.72); color: #8a2b2b; font: inherit; cursor: pointer; }
.chat-message.recalled p { color: #68736f; font-style: italic; }
.agent-chat-heading > div { display: flex; flex-wrap: wrap; gap: 7px; }

/* Listing details: all server photos */
.public-photo-gallery .public-detail-photo { height: 360px; object-fit: contain; }
.public-gallery-controls { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 10px 0; }
.public-gallery-thumbnails { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 10px; }
.public-gallery-thumbnails button { flex: 0 0 88px; border: 3px solid transparent; padding: 0; border-radius: 8px; background: transparent; cursor: pointer; }
.public-gallery-thumbnails button.active { border-color: var(--brand, #8d302d); }
.public-gallery-thumbnails img { display: block; width: 82px; height: 64px; object-fit: cover; border-radius: 5px; }
@media (max-width: 600px) { .public-photo-gallery .public-detail-photo { height: 240px; } .public-gallery-controls { font-size: 14px; } }

/* Keep the account-specific action hidden even when .agent-btn sets display. */
[data-agent-access][hidden]{display:none!important}
[data-auth-only][hidden]{display:none!important}
/* Keep guest headers minimal, including before account initialization. */
.topbar-actions[data-signed-in="false"] > :not([data-openmls-account-button]){display:none!important}

#agentApplicationForm[hidden]{display:none!important}
.home-search-refresh #market>.buyer-tabs{justify-content:flex-start;margin:0 0 16px;gap:8px}
.home-search-refresh #market>.buyer-tabs button{min-height:44px}
/* Home search 1.8.1: roomy listings, compact primary search, optional filters. */
.home-search-refresh #buyerExperience{padding:24px 0;border:0;background:transparent;border-radius:0}
.home-search-refresh .public-market-hero{display:block;padding:38px clamp(20px,4vw,64px);background:#f3eee6}
.home-search-refresh .public-market-hero h1{display:block;max-width:780px;font-size:clamp(30px,3.2vw,48px);line-height:1.12;margin:10px 0 14px;color:#182226}
.home-search-refresh .public-market-hero>div>p:last-child{margin:0 0 24px;color:#5f6669}
.home-search-refresh #buyerFilters.home-search-bar{display:grid;grid-template-columns:minmax(220px,1fr) 150px auto auto;align-items:end;gap:10px;margin:0}
.home-search-bar>label{font-size:12px;font-weight:600;gap:6px}
.home-search-bar>label:first-child{min-width:0}
.home-search-bar input,.home-search-bar select,.home-search-bar>button{min-height:48px;font-size:15px;border-radius:10px}
.home-search-refresh [hidden],.search-filter-dialog [hidden]{display:none!important}
.home-results-heading{display:flex;align-items:center;justify-content:space-between;gap:18px;flex-wrap:wrap;margin-bottom:12px}
.home-results-heading h2{font-size:25px;margin:4px 0}.home-results-heading .eyebrow{margin:0}
.home-search-refresh .buyer-tabs{gap:6px;margin:0}.home-search-refresh .buyer-tabs button{padding:10px 13px;border-radius:9px;font-size:13px;min-height:42px}
.home-results-toolbar{display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin:0 0 12px;color:#637074;font-size:13px}.home-results-toolbar p{margin:0;flex:1}.home-filter-summary{color:#8d302d}.home-search-refresh #buyerStatus:empty{display:none}
.home-search-refresh .buyer-cards{grid-template-columns:repeat(2,minmax(0,1fr));gap:24px}
.home-search-refresh .buyer-photo img{height:clamp(220px,21vw,335px);display:block}.home-search-refresh .buyer-card-body{padding:20px}.home-search-refresh .buyer-card-body h3{font-size:25px}.home-search-refresh .buyer-card{box-shadow:0 3px 14px #18222608}
.search-filter-dialog{width:min(720px,calc(100% - 24px));max-height:90dvh;box-sizing:border-box;padding:24px;border:1px solid #d6cec6;border-radius:18px;overflow:auto;color:#182226}
.search-filter-dialog::backdrop{background:#10202666}.filter-dialog-head,.filter-dialog-footer{display:flex;align-items:center;justify-content:space-between;gap:12px}.filter-dialog-head h2{margin:4px 0 20px}.filter-dialog-head .eyebrow{margin:0}.filter-dialog-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.filter-dialog-fields label{display:grid;gap:7px;font-size:14px;font-weight:600}.filter-dialog-fields input,.filter-dialog-fields select{width:100%;box-sizing:border-box;min-height:46px;padding:10px;border:1px solid #cdc5bc;border-radius:9px;font:inherit;background:white;color:#182226}.filter-dialog-footer{position:sticky;bottom:-24px;margin-top:24px;padding:18px 0 4px;background:white}
@media(max-width:760px){.home-search-refresh .public-market-hero{padding:24px 18px}.home-search-refresh #buyerFilters.home-search-bar{grid-template-columns:minmax(0,1fr) 105px}.home-search-refresh .buyer-cards{grid-template-columns:1fr}.home-search-refresh .buyer-photo img{height:240px}.home-search-refresh #buyerExperience{padding:16px 0}.home-search-refresh .buyer-tabs{flex-wrap:wrap}.filter-dialog-fields{gap:12px}.search-filter-dialog{padding:18px}.home-results-heading{gap:12px}}
/* Buyer home search */
#heroSearchForm[hidden],[data-pane][hidden],#buyerCards[hidden]{display:none!important}
#buyerExperience{background:#fff;border:1px solid #e1ddd8;border-radius:18px;padding:clamp(14px,3vw,28px)}
.buyer-tabs,.buyer-actions{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin:12px 0}.buyer-tabs button{padding:12px 16px;border-radius:24px;border:1px solid #bfb4aa;background:white;color:#543c31}.buyer-tabs [aria-pressed=true]{background:#543c31;color:white}
#buyerStatus{min-height:24px}#buyerStatus[data-error=true]{color:#a52929;font-weight:600}.buyer-filters{display:grid;grid-template-columns:repeat(auto-fit,minmax(165px,1fr));gap:14px;margin:18px 0}.buyer-filters label,.buyer-edit-dialog label{display:grid;gap:6px;font-size:.9rem;font-weight:600}.buyer-filters input,.buyer-filters select,.buyer-edit-dialog input,.buyer-edit-dialog textarea,.buyer-table-scroll input{width:100%;padding:11px;border:1px solid #c9c1ba;border-radius:9px;box-sizing:border-box;background:white;color:#222}.buyer-filters .buyer-actions{grid-column:1/-1}.buyer-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,280px),1fr));gap:20px}.buyer-card{border:1px solid #e0dbd5;border-radius:14px;overflow:hidden;background:#fff}.buyer-photo{display:block;padding:0;border:0;width:100%;background:#e8e3dc}.buyer-photo img{width:100%;height:210px;object-fit:cover}.buyer-card-body{padding:18px}.buyer-card-body h3{font-size:1.4rem;margin:0}.buyer-card .ghost-btn{padding:8px 10px}.buyer-note{white-space:pre-wrap;overflow-wrap:anywhere}.buyer-search{padding:16px;background:#f7f4f0;border-radius:12px;margin:12px 0}.buyer-search p{overflow-wrap:anywhere}.buyer-edit-dialog{max-width:550px;width:calc(100% - 30px);padding:24px;border:1px solid #c9c1ba;border-radius:16px}.buyer-edit-dialog form{display:grid;gap:14px}.buyer-edit-dialog textarea{min-height:140px}.buyer-table-scroll{overflow:auto}.buyer-table-scroll table{border-collapse:collapse;min-width:650px;width:100%}.buyer-table-scroll th,.buyer-table-scroll td{text-align:left;padding:14px;border:1px solid #e0dbd5;min-width:160px;vertical-align:top;white-space:pre-wrap}.buyer-table-scroll th{background:#f7f4f0}.buyer-table-scroll input{min-width:110px}
/* State-specific review tools */
.license-lookup-picker{display:grid;gap:10px;padding:14px;margin:12px 0;border:1px solid #d8d4cf;border-radius:10px;background:#fff;min-width:0}
.license-lookup-picker legend{font-weight:700;padding:0 6px}
.license-lookup-picker label{display:grid;gap:6px}
.license-lookup-picker select{width:100%;min-height:44px;padding:9px;border:1px solid #d8d4cf;border-radius:7px;font:inherit;background:#fff;color:#172327}
.license-lookup-picker small{line-height:1.5;color:#59656a}
.license-lookup-picker a{overflow-wrap:anywhere}
.license-lookup-picker a[hidden]{display:none!important}
/* Home search 1.9 */
.search-quick-filters{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-top:12px}.search-quick-filters[hidden]{display:none}.search-active-chips{display:flex;gap:6px;flex-wrap:wrap}.filter-chip{border:1px solid #d8d4cf;border-radius:20px;padding:9px 12px;background:#fff;color:#8b302c;cursor:pointer}.home-search-bar>label:first-child{position:relative}.location-suggestions{position:absolute;top:100%;left:0;right:0;z-index:30;background:white;border:1px solid #d8d4cf;box-shadow:0 6px 20px #0002;border-radius:12px;overflow:hidden;max-height:320px;overflow-y:auto}.location-suggestions[hidden]{display:none}.location-suggestions button{display:block;width:100%;text-align:left;border:0;background:white;padding:12px 15px;font:inherit;cursor:pointer}.location-suggestions button:hover,.location-suggestions button.active{background:#f5e5df}
.search-card-media{position:relative;overflow:hidden}.search-card-media .buyer-photo{width:100%;display:block;padding:0;border:0}.search-card-media .buyer-photo img{width:100%;height:245px;object-fit:cover;display:block}.card-placeholder{height:245px;display:grid;place-items:center;background:#eee8df;color:#6d7375}.card-heart{position:absolute;right:12px;top:12px;border:0;background:white;color:#8b302c;border-radius:50%;width:44px;height:44px;font-size:26px;cursor:pointer}.card-status{position:absolute;left:12px;top:12px;background:white;padding:7px 10px;border-radius:14px;font-size:12px;font-weight:700}.card-photo-nav{position:absolute;right:10px;bottom:10px;display:flex;gap:7px;align-items:center;background:#000b;color:white;border-radius:20px;padding:3px 5px;font-size:12px}.card-photo-nav button{background:transparent;color:white;font-size:24px;border:0;min-width:38px;min-height:38px;cursor:pointer}.market-badge{display:inline-block;background:#edf5ed;color:#315535;font-size:12px;font-weight:700;border-radius:6px;padding:4px 8px}.card-more{position:relative}.card-more summary{padding:10px 14px;cursor:pointer}.card-more[open]{background:#f9f5ef;border-radius:8px}.card-more[open] button{display:block;margin:6px}.buyer-card.map-selected{outline:3px solid #8b302c;outline-offset:2px}
.map-area-tools{display:flex;flex-wrap:wrap;max-width:270px;gap:4px;background:white;padding:6px;border-radius:10px;box-shadow:0 2px 8px #0003}.map-area-tools button{min-height:38px;padding:6px 10px;border:1px solid #d8d4cf;border-radius:7px;background:white;color:#8b302c;cursor:pointer;font-weight:600}.map-area-tools button[hidden]{display:none}.property-section-nav{position:sticky;top:0;z-index:5;display:flex;gap:6px;flex-wrap:wrap;background:#fff;padding:10px 0;border-bottom:1px solid #ddd}.property-section-nav button{background:white;border:1px solid #ddd;padding:10px 14px;border-radius:18px;cursor:pointer;font-weight:700}.property-sticky-actions{position:sticky;bottom:0;z-index:5;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px;background:#fff;border-top:1px solid #ddd}.property-sticky-actions strong{font-size:20px}.property-insights section{scroll-margin-top:80px}.guided-showing-dialog{width:min(550px,calc(100% - 24px));max-height:88dvh;border:0;border-radius:18px;padding:24px;overflow-y:auto}.guided-showing-dialog::backdrop{background:#0006}.guided-showing-dialog form{display:grid;gap:12px}.guided-showing-dialog section{display:grid;gap:12px}.guided-showing-dialog [hidden]{display:none!important}.guided-showing-dialog input,.guided-showing-dialog select,.guided-showing-dialog textarea{display:block;width:100%;box-sizing:border-box;padding:12px;border:1px solid #ccc;border-radius:8px;margin-top:6px;font:inherit}.guided-showing-dialog textarea{min-height:85px}.guided-showing-dialog [role=status]{min-height:24px;color:#8b302c}
@media(min-width:1000px){.map-results-layout.map-enabled{display:grid;grid-template-columns:minmax(350px,1.1fr) minmax(350px,1fr);gap:20px;align-items:start}.map-enabled .home-map-shell{position:sticky;top:15px}.map-enabled .buyer-cards{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:12px}.map-enabled .buyer-card-body{padding:12px}.map-enabled .buyer-photo img{height:180px}.map-enabled .buyer-card h3{font-size:21px}}
@media(max-width:999px){.map-results-layout.map-enabled .home-search-map{height:48dvh;min-height:300px}.map-enabled .buyer-cards{margin-top:14px}.search-quick-filters>.ghost-btn{padding:9px 12px;font-size:13px}.property-sticky-actions .primary-btn{font-size:14px;padding:12px}}
