:root {
  --bg: #f6f5f1;
  --surface: #ffffff;
  --surface-alt: #fafbfc;
  --border: #e1e6ec;
  --text: #1c2733;
  --muted: #64748b;
  --primary: #0f6e5f;
  --primary-hover: #0b5548;
  --primary-soft: #e7f3f0;
  --accent: #b8873a;
  --accent-hover: #9c7130;
  --accent-soft: #f7eedc;
  --terracotta: #c1552c;
  --terracotta-soft: #fbe9e0;
  --surface-warm: #fbf7ef;
  --danger: #b3261e;
  --danger-soft: #fbeae9;
  --info: #2b6cb0;
  --info-hover: #1e4e82;
  --info-soft: #e4eefa;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06);
  --shadow-md: 0 4px 14px rgba(16, 24, 40, 0.08);
  --shadow-lg: 0 12px 32px rgba(16, 24, 40, 0.12);

  --font-body: "Plus Jakarta Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;

  --badge-good-bg: #e5f5ec; --badge-good-text: #1a7a44;
  --badge-warn-bg: #fdf3df; --badge-warn-text: #92660b;
  --badge-bad-bg: #fbeae9; --badge-bad-text: #a02e24;
  --badge-neutral-bg: #eef0f3; --badge-neutral-text: #475066;
}

html[dir="rtl"] {
  --font-body: "Cairo", "Segoe UI", system-ui, sans-serif;
  --font-display: "Cairo", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

.site-main h1, .site-main h2, .site-main h3,
.login-card h1, .prose h2 {
  font-family: var(--font-display);
  letter-spacing: -0.01em;
}

.icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* ---- Top bar ---- */

header.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.brand-subtitle {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.01em;
}

.brand .icon {
  width: 24px;
  height: 24px;
  color: var(--primary);
}

header.topbar h1 {
  font-size: 1.08rem;
  margin: 0;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.session-badge {
  font-size: 0.78rem;
  color: var(--muted);
  background: var(--surface-alt);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 999px;
}

.lang-switch {
  display: flex;
  gap: 4px;
  background: var(--surface-alt);
  padding: 3px;
  border-radius: 999px;
  border: 1px solid var(--border);
}

.lang-btn {
  border: none;
  background: transparent;
  border-radius: 999px;
  padding: 4px 11px;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
}

.lang-btn.active {
  background: var(--primary);
  color: white;
}

.lang-select {
  border: 1px solid var(--border);
  background: var(--surface-alt);
  border-radius: 999px;
  padding: 4px 10px;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
}

/* ---- Layout ---- */

.layout {
  display: flex;
  min-height: calc(100vh - 57px);
}

nav#nav {
  width: 232px;
  flex-shrink: 0;
  background: var(--surface);
  border-inline-end: 1px solid var(--border);
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-category {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-top: 10px;
  padding: 8px 10px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--surface-alt);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary-hover);
  cursor: pointer;
  transition: background 0.12s ease;
}
.nav-category:first-child { margin-top: 0; }
.nav-category:hover { background: var(--primary-soft); }

.nav-category-chevron {
  width: 20px;
  height: 20px;
  padding: 3px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--surface);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease;
}
.nav-category[aria-expanded="false"] .nav-category-chevron { transform: rotate(-90deg); }

.nav-category-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.nav-category-group[hidden] { display: none; }

.nav-subcategory {
  padding: 6px 12px 2px 18px;
  font-size: 0.64rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  opacity: 0.75;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: start;
  padding: 9px 12px;
  border: none;
  background: var(--bg);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.89rem;
  color: var(--text);
  transition: background 0.12s ease;
}

.nav-item .nav-icon { color: var(--muted); }

.nav-item:hover { background: var(--border); }

.nav-item.active {
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 600;
}

.nav-item.active .nav-icon { color: var(--primary); }

main#view {
  flex: 1;
  padding: 26px 34px 60px;
  max-width: 1180px;
}

.fade-in { animation: fadeIn 0.22s ease; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.subtitle { color: var(--muted); margin-top: -6px; font-size: 0.92rem; }

/* ---- Dashboard cards ---- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.card-clickable { cursor: pointer; text-align: start; font: inherit; width: 100%; }
.card-clickable:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }

.card-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: var(--primary-soft);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.card-icon .icon { width: 22px; height: 22px; }

.card-value { font-size: 1.55rem; font-weight: 700; color: var(--text); line-height: 1.1; }
.card-label { color: var(--muted); font-size: 0.82rem; margin-top: 3px; }

/* ---- Section header / controls ---- */

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.section-header h2 { margin: 0; font-size: 1.25rem; letter-spacing: -0.01em; }

.section-header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 7px 13px;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--text);
  transition: background 0.12s ease, border-color 0.12s ease;
}

button.primary {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  font-weight: 600;
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

button.primary:hover { background: var(--primary-hover); transform: translateY(-1px); box-shadow: var(--shadow-md); }
button.primary:active { transform: translateY(0); }
button:hover { background: var(--bg); }

button.ghost {
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}
button.ghost:hover { background: var(--bg); color: var(--text); }

.btn-icon { width: 15px; height: 15px; }

select, input[type="text"], input[type="number"], input[type="date"], input[type="password"], input[type="file"], input[type="search"] {
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.86rem;
  color: var(--text);
  background: white;
  font-family: inherit;
}
select:focus, input:focus {
  outline: 2px solid var(--primary-soft);
  border-color: var(--primary);
}

/* ---- Table ---- */

.table-wrap { margin-top: 16px; }
.table-wrap table thead th { position: sticky; top: 0; z-index: 1; }

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 14px;
}
.pagination-status { color: var(--muted); font-size: 0.85rem; }

table {
  width: 100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

th, td {
  padding: 10px 10px;
  border-bottom: 1px solid var(--border);
  text-align: start;
  font-size: 0.85rem;
}

td { white-space: normal; overflow-wrap: anywhere; }

th {
  background: var(--primary-soft);
  color: var(--primary-hover);
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: normal;
  line-height: 1.3;
  border-bottom: 1px solid var(--primary);
}

tbody tr:hover { background: var(--surface-alt); }
tbody tr:last-child td { border-bottom: none; }

.bool-filter-label { display: inline-flex; align-items: center; gap: 6px; font-size: 0.85rem; color: var(--muted); }

.row-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; max-width: 210px; }
.row-action { padding: 4px 9px; font-size: 0.72rem; white-space: nowrap; font-weight: 600; border-color: transparent; }

.row-action.tone-success { background: var(--primary-soft); color: var(--primary-hover); }
.row-action.tone-success:hover { background: var(--primary); color: #fff; }

.row-action.tone-danger { background: var(--danger-soft); color: var(--danger); }
.row-action.tone-danger:hover { background: var(--danger); color: #fff; }

.row-action.tone-info { background: var(--info-soft); color: var(--info-hover); }
.row-action.tone-info:hover { background: var(--info); color: #fff; }

.row-action.tone-neutral { background: var(--surface-alt); color: var(--muted); border-color: var(--border); }
.row-action.tone-neutral:hover { background: var(--bg); color: var(--text); }

.actions-col { width: 210px; }

.details-col { width: 34px; max-width: 34px; padding: 4px 6px; }

.row-expand {
  padding: 4px;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}
.row-expand:hover { background: var(--bg); }
.row-expand .icon { transition: transform 0.15s ease; }
.row-expand.expanded .icon { transform: rotate(180deg); }

.detail-row td {
  background: var(--surface-alt);
  border-top: 1px dashed var(--border);
  white-space: normal;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px 24px;
  margin: 0;
  padding: 4px 2px;
}

.detail-item dt {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--muted);
  font-weight: 650;
  margin-bottom: 2px;
}

.detail-item dd { margin: 0; font-size: 0.85rem; color: var(--text); }

.col-title { color: var(--primary); font-weight: 650; }

.col-narrow {
  width: 76px;
  max-width: 76px;
  white-space: normal;
  text-align: center;
  line-height: 1.25;
}
th.col-narrow { font-size: 0.66rem; }

.empty, .error { color: var(--muted); margin-top: 16px; font-size: 0.88rem; }
.error { color: var(--danger); }

/* ---- Badges ---- */

.badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 650;
  text-transform: capitalize;
  background: var(--badge-neutral-bg);
  color: var(--badge-neutral-text);
  white-space: nowrap;
}

.badge[data-value="ACTIVE"], .badge[data-value="COMPLETED"], .badge[data-value="RESOLVED"],
.badge[data-value="APPROVED"], .badge[data-value="AUTO_APPROVED"], .badge[data-value="OWNER_APPROVED"],
.badge[data-value="CONFIRMED"], .badge[data-value="SENT"], .badge[data-value="SUCCEEDED"],
.badge[data-value="PASSED"], .badge[data-value="HARVESTED"], .badge[data-value="STREAMING"],
.badge[data-value="APPROVE"], .badge[data-value="PAYOUT"], .badge[data-value="REWARDED"] {
  background: var(--badge-good-bg); color: var(--badge-good-text);
}

.badge[data-value="PENDING"], .badge[data-value="SCHEDULED"], .badge[data-value="REQUESTED"],
.badge[data-value="SUBMITTED"], .badge[data-value="IN_PROGRESS"], .badge[data-value="OWNER_NOTIFIED"],
.badge[data-value="REPORTED"], .badge[data-value="MEDIUM"], .badge[data-value="QUEUED"],
.badge[data-value="PROPOSED"], .badge[data-value="OPEN"], .badge[data-value="PAUSED"],
.badge[data-value="NOT_STARTED"] {
  background: var(--badge-warn-bg); color: var(--badge-warn-text);
}

.badge[data-value="REJECTED"], .badge[data-value="BLOCKED"], .badge[data-value="CANCELLED"],
.badge[data-value="CRITICAL"], .badge[data-value="HIGH"], .badge[data-value="REVOKED"],
.badge[data-value="CLOSED"], .badge[data-value="FAILED"], .badge[data-value="DECLINED"],
.badge[data-value="OFFLINE"], .badge[data-value="MAINTENANCE_NEEDED"], .badge[data-value="NO_SHOW"],
.badge[data-value="REJECT"], .badge[data-value="CANCEL"], .badge[data-value="REVOKE"],
.badge[data-value="DELETE"] {
  background: var(--badge-bad-bg); color: var(--badge-bad-text);
}

.referral-code-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.referral-code {
  font-family: monospace;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  background: var(--primary-soft);
  color: var(--primary-hover);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
}
.referral-stats { color: var(--muted); font-size: 0.88rem; margin: 10px 0 0; }
.referral-pref-option {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 0.92rem;
}

/* ---- Forms ---- */

.entity-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 480px;
  box-shadow: var(--shadow-sm);
}

.entity-form h3 { margin: 0 0 2px; font-size: 1rem; }

.form-row {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 0.83rem;
  color: var(--muted);
  font-weight: 600;
}

.form-row input[type="checkbox"] { width: 18px; height: 18px; align-self: start; }

.form-actions { margin-top: 4px; }
.form-message { color: var(--danger); font-size: 0.85rem; }

/* ---- Chat ---- */

.chat-window {
  margin-top: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--shadow-sm);
}

.chat-bubble {
  display: flex;
  gap: 8px;
  max-width: 78%;
}

.chat-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.9rem;
  background: var(--primary-soft);
  color: var(--primary);
}

.chat-content {
  padding: 8px 12px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
}

.chat-bubble.user { align-self: end; flex-direction: row-reverse; }
.chat-bubble.user .chat-content { background: var(--primary); color: white; }
.chat-bubble.user .chat-avatar { background: rgba(255,255,255,0.25); color: white; }
.chat-bubble.assistant .chat-content { background: var(--surface-alt); border: 1px solid var(--border); }

.chat-role { font-size: 0.7rem; opacity: 0.75; margin-bottom: 2px; font-weight: 600; }
.chat-text { white-space: pre-wrap; }

.chat-form {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.chat-form input {
  flex: 1;
  padding: 9px 12px;
}

html[dir="rtl"] .chat-bubble.user { flex-direction: row; align-self: start; }
html[dir="rtl"] .chat-bubble.assistant { align-self: end; }

/* ---- Property profile ---- */

.back-btn { margin-bottom: 14px; }

.profile-header h2 { margin: 0 0 6px; font-size: 1.3rem; }
.profile-meta {
  display: flex;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-size: 0.86rem;
  flex-wrap: wrap;
}

.profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 20px;
}

.profile-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}

.profile-card-wide { grid-column: 1 / -1; }

.profile-card h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  font-size: 0.98rem;
  color: var(--text);
}
.profile-card h3 .icon { color: var(--primary); }

.photo-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.photo-card {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface-alt);
}
.photo-card img { width: 100%; height: 90px; object-fit: cover; display: block; }
.photo-caption {
  font-size: 0.7rem;
  color: var(--muted);
  padding: 4px 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.icon-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  padding: 4px;
  background: rgba(255,255,255,0.9);
  border-radius: 6px;
  border: none;
  color: var(--danger);
}
.icon-btn .icon { width: 14px; height: 14px; }

.document-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
  position: relative;
}
.document-row:last-child { border-bottom: none; }
.document-row .icon { color: var(--muted); }
.document-row a { color: var(--primary); text-decoration: none; font-weight: 600; }
.document-row a:hover { text-decoration: underline; }
.doc-desc { color: var(--muted); font-size: 0.8rem; }
.document-row .icon-btn { position: static; margin-inline-start: auto; }

.upload-form {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
}
.upload-form input[type="text"] { flex: 1; min-width: 120px; }

.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.timeline-item {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: var(--surface-alt);
  font-size: 0.84rem;
}
.timeline-type { font-weight: 650; text-transform: capitalize; }
.timeline-title { color: var(--text); }
.timeline-detail { color: var(--muted); grid-column: 2 / span 2; }
.timeline-item time { color: var(--muted); font-size: 0.76rem; white-space: nowrap; }

/* ---- Login page ---- */

.login-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, var(--primary-soft), var(--bg));
}

.login-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 34px 32px;
  width: 360px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--primary);
  font-weight: 650;
  font-size: 0.85rem;
  margin-bottom: 18px;
}
.login-brand .icon { width: 20px; height: 20px; }

.login-card h1 { margin: 0 0 4px; font-size: 1.35rem; }
.login-sub { color: var(--muted); font-size: 0.85rem; margin: 0 0 20px; }

.login-form { display: flex; flex-direction: column; gap: 14px; }
.login-form label { display: flex; flex-direction: column; gap: 5px; font-size: 0.83rem; font-weight: 600; color: var(--muted); }
.login-form input { padding: 9px 11px; }
.login-submit { justify-content: center; padding: 9px; margin-top: 4px; }
.login-error { color: var(--danger); font-size: 0.83rem; margin: 0; }
.login-hint { margin-top: 18px; font-size: 0.74rem; color: var(--muted); line-height: 1.5; }
.login-hint code { background: var(--surface-alt); padding: 1px 5px; border-radius: 4px; }

@media (max-width: 720px) {
  .profile-grid { grid-template-columns: 1fr; }
  nav#nav { width: 76px; }
  .nav-item span { display: none; }
}

/* ==== Marketing site (landing / about / security / register) ==== */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 6vw;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  background: var(--primary-soft);
  border-radius: 999px;
  padding: 10px 22px;
}

.site-nav a, .site-nav button {
  position: relative;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  background: none;
  border: none;
  padding: 0 0 4px;
  font-family: inherit;
  cursor: pointer;
  transition: color 0.15s ease;
}
.site-nav a::after, .site-nav button::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform 0.18s ease;
}
.site-nav a:hover, .site-nav a.active, .site-nav button:hover, .site-nav button.active { color: var(--primary); }
.site-nav a:hover::after, .site-nav a.active::after, .site-nav button:hover::after, .site-nav button.active::after {
  transform: scaleX(1);
}

.site-cta {
  display: flex;
  gap: 10px;
  align-items: center;
}

.referral-banner {
  display: flex;
  align-items: center;
  gap: 20px;
  background: linear-gradient(100deg, var(--accent-soft) 0%, var(--surface) 60%);
  border: 1px solid var(--accent);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-bottom: 32px;
}
.referral-banner .card-icon { background: var(--accent-soft); color: var(--accent-hover); }
.referral-banner-copy { flex: 1 1 auto; }
.referral-banner h3 { margin: 0 0 4px; font-size: 1rem; }
.referral-banner p { margin: 0; color: var(--muted); font-size: 0.85rem; }
.referral-banner button { flex-shrink: 0; white-space: nowrap; }
@media (max-width: 640px) {
  .referral-banner { flex-direction: column; text-align: center; }
}

.site-menu {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border: none;
  background: var(--primary-soft);
  border-radius: 999px;
  color: var(--primary);
  cursor: pointer;
}
.nav-toggle .icon { width: 20px; height: 20px; }

main.site-main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 6vw 80px;
}

.hero {
  padding: 48px 0 36px;
  text-align: center;
}

.hero-illustrated {
  background: radial-gradient(ellipse 70% 100% at 85% 20%, var(--primary-soft) 0%, transparent 65%);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
}

.hero-eyebrow {
  display: inline-block;
  color: var(--accent-hover);
  background: var(--accent-soft);
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 18px;
}

.hero h1 {
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  line-height: 1.18;
  margin: 0 0 16px;
  letter-spacing: -0.02em;
  color: var(--primary);
  text-wrap: balance;
}

.hero-subbrand {
  margin: 8px 0 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.01em;
}

.hero p.lead {
  font-size: 1.08rem;
  color: var(--muted);
  max-width: 620px;
  margin: 0 auto 30px;
  line-height: 1.6;
}

.hero-illustrated {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  text-align: left;
}
.hero-illustrated[hidden] { display: none; }
.hero-illustrated .hero-copy { flex: 1 1 auto; }
.hero-illustrated .hero-eyebrow { margin-bottom: 12px; }
.hero-illustrated h1 { margin: 0; }
.hero-illustration { flex: 0 0 190px; max-width: 190px; }
.hero-illustration svg { width: 100%; height: auto; display: block; }
@media (max-width: 720px) {
  .hero-illustrated { flex-direction: column; text-align: center; }
  .hero-illustration { flex-basis: auto; width: 160px; }
}

.referral-promo {
  max-width: 1040px;
  margin: 0 auto 8px;
  padding: 16px 6vw;
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--accent-soft);
  border-radius: var(--radius-lg);
}
.referral-promo-icon { width: 30px; height: 30px; flex: 0 0 auto; color: var(--accent-hover); }
.referral-promo-text { flex: 1 1 auto; display: flex; flex-direction: column; gap: 2px; }
.referral-promo-text strong { color: var(--text); font-size: 0.98rem; }
.referral-promo-text span { color: var(--muted); font-size: 0.86rem; }
@media (max-width: 640px) {
  .referral-promo { flex-wrap: wrap; margin: 0 16px 8px; }
  .referral-promo-text { flex-basis: 100%; }
}

.emergency-list { display: flex; flex-direction: column; gap: 6px; max-width: 760px; margin: 0 auto; }
.emergency-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 8px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-inline-start: 3px solid var(--primary);
  border-radius: var(--radius-sm, 8px);
  font-size: 0.85rem;
  overflow-x: auto;
}
.emergency-row > * { white-space: nowrap; }
.emergency-row strong { color: var(--primary); }

.provider-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}
.provider-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.provider-photo {
  width: calc(100% + 32px);
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  margin: -16px -16px 4px;
}
.provider-badge {
  align-self: flex-start;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.provider-badge-vetted { background: var(--badge-good-bg); color: var(--badge-good-text); }
.provider-badge-independent { background: var(--badge-neutral-bg); color: var(--badge-neutral-text); }
.provider-card h4 { margin: 0; font-size: 0.92rem; }
.provider-card .provider-meta { color: var(--muted); font-size: 0.78rem; }
.provider-card .provider-actions { display: flex; gap: 8px; margin-top: auto; }
.provider-card .provider-actions button { flex: 1 1 auto; font-size: 0.78rem; padding: 7px 10px; }

.directory-search-bar { display: flex; gap: 10px; max-width: 640px; margin: 0 auto 20px; }
.directory-search-input-wrap { position: relative; flex: 1; }
.directory-search-input-wrap input[type="search"] {
  width: 100%;
  padding: 11px 16px 11px 40px;
  border-radius: 999px;
  font-size: 0.92rem;
  box-shadow: var(--shadow-sm);
}
.directory-search-input-wrap .icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--muted);
  pointer-events: none;
}
.directory-region-select {
  border-radius: 999px;
  padding: 11px 16px;
  font-size: 0.92rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  min-width: 170px;
  flex-shrink: 0;
}
@media (max-width: 560px) {
  .directory-search-bar { flex-direction: column; }
  .directory-region-select { min-width: 0; }
}

.service-category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.service-category-tile {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  background: var(--surface-alt);
  padding: 0;
  display: block;
  transition: transform 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}
.service-category-tile:hover { transform: translateY(-2px); }
.service-category-tile.active { border-color: var(--primary); }
.service-category-tile.filtered-out { opacity: 0.35; }
.service-category-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.service-category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 23, 33, 0.68) 0%, rgba(15, 23, 33, 0) 55%);
}
.service-category-tile span {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 7px;
  z-index: 1;
  color: white;
  font-size: 0.76rem;
  font-weight: 650;
  line-height: 1.25;
  text-align: left;
}
.service-category-tile--noPhoto {
  background: var(--primary-soft);
  display: flex;
  align-items: center;
  justify-content: center;
}
.service-category-tile--noPhoto::after { display: none; }
.service-category-tile--noPhoto span { position: static; color: var(--primary); text-align: center; }
@media (max-width: 520px) {
  .service-category-grid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
}

.service-disclosure { margin-top: 20px; }
.service-disclosure > summary {
  cursor: pointer;
  font-weight: 650;
  color: var(--primary);
  padding: 4px 0;
}
.service-disclosure[open] > summary { margin-bottom: 16px; }

#partner-kind-tabs { margin-bottom: 16px; }

.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-actions button, .hero-actions a.btn-link {
  padding: 11px 22px;
  font-size: 0.92rem;
  text-decoration: none;
}

.section-block { padding: 48px 0; border-top: 1px solid var(--border); }
.section-block h2 { font-size: 1.5rem; letter-spacing: -0.01em; margin: 0 0 8px; }
.section-block p.section-lead { color: var(--muted); max-width: 640px; margin: 0 0 32px; line-height: 1.6; }

/* Alternating rounded "bands" - a contained version of a full-bleed color-band layout,
   since every panel on this site lives inside the shared max-width column rather than
   breaking out to the viewport edge. Each band gives one content group its own visual
   beat instead of the page reading as one long undifferentiated scroll. */
.content-band { border-radius: var(--radius-lg); padding: 36px 32px; margin-bottom: 24px; }
.content-band > h2, .content-band > h3 { margin-top: 0; }
.content-band-white { background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.content-band-primary { background: var(--primary-soft); }
.content-band-accent { background: var(--accent-soft); }
@media (max-width: 640px) { .content-band { padding: 24px 18px; } }

.cam-feature {
  display: flex;
  align-items: center;
  gap: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 20px 24px;
  margin-top: 24px;
}
.cam-feature img { width: 100px; height: 100px; object-fit: cover; border-radius: var(--radius-md); flex-shrink: 0; }
.cam-feature p { margin: 0; color: var(--muted); font-size: 0.88rem; line-height: 1.55; }
@media (max-width: 560px) { .cam-feature { flex-direction: column; text-align: center; } }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.feature-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--primary-soft); }

.feature-photo {
  width: calc(100% + 44px);
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  margin: -22px -22px 14px;
  display: block;
}
.feature-photo + .card-icon { display: none; }

.feature-card-highlight {
  position: relative;
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 22px;
  border-color: var(--accent);
  background: linear-gradient(100deg, var(--accent-soft) 0%, var(--surface) 45%);
}
.feature-card-highlight:hover { border-color: var(--accent-hover); }
.feature-card-highlight .card-icon { margin-bottom: 0; flex-shrink: 0; width: 52px; height: 52px; }
.feature-card-highlight .card-icon .icon { width: 28px; height: 28px; }
.feature-card-highlight h3 { margin: 0 0 4px; }
.feature-card-highlight p { max-width: 560px; }
@media (max-width: 560px) {
  .feature-card-highlight { flex-direction: column; align-items: flex-start; text-align: left; }
}
.feature-badge {
  position: absolute;
  top: -10px;
  right: 16px;
  background: var(--accent);
  color: white;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 3px 10px;
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
}
html[dir="rtl"] .feature-badge { right: auto; left: 16px; }

.photo-showcase {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  max-width: 900px;
  margin: 40px auto 0;
}
.photo-showcase figure { flex: 1 1 280px; margin: 0; }
.photo-showcase-regions { max-width: 1100px; justify-content: center; }
.photo-showcase-regions figure { flex: 0 1 190px; }
.photo-showcase img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.photo-showcase figcaption {
  margin-top: 10px;
  text-align: center;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 600;
}

.feature-card .card-icon { margin-bottom: 14px; border-radius: 999px; }
.feature-card h3 { margin: 0 0 8px; font-size: 1.02rem; }
.feature-card p { margin: 0; color: var(--muted); font-size: 0.87rem; line-height: 1.55; }

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
  max-width: 960px;
  margin-inline: auto;
}

.pricing-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 26px 22px;
  box-shadow: var(--shadow-sm);
  text-align: center;
}

.pricing-card-highlight { border-color: var(--primary); box-shadow: var(--shadow-md); }

.pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: white;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 3px 12px;
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  white-space: nowrap;
}

.pricing-card h3 { margin: 4px 0 10px; font-size: 1.05rem; }

.pricing-price { margin: 0 0 18px; font-size: 1.9rem; font-weight: 700; color: var(--primary); }
.pricing-price small { font-size: 0.85rem; font-weight: 500; color: var(--muted); margin-left: 4px; }

.pricing-features { list-style: none; margin: 0; padding: 0; text-align: left; }
.pricing-features li {
  padding: 8px 0 8px 22px;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--muted);
  position: relative;
}
.pricing-features li:first-child { border-top: none; }
.pricing-features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 700;
}
html[dir="rtl"] .pricing-features li { padding: 8px 22px 8px 0; }
html[dir="rtl"] .pricing-features li::before { left: auto; right: 0; }

.pricing-note { text-align: center; color: var(--muted); font-size: 0.8rem; margin: 24px 0 0; }

.plan-recommendation {
  background: var(--primary-soft);
  border: 1px solid var(--primary-soft);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 0.85rem;
  color: var(--text);
  margin: 0 0 14px;
}
.pricing-referral { text-align: center; color: var(--primary); font-size: 0.8rem; font-weight: 600; margin: 10px 0 0; }

.pricing-checklist {
  max-width: 720px;
  margin: 0 auto;
}
.pricing-checklist h3 { text-align: center; margin: 0 0 6px; font-size: 1.05rem; }
.pricing-checklist-lead { text-align: center; color: var(--muted); font-size: 0.85rem; margin: 0 0 20px; }

.checklist-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 24px;
}
.checklist-grid li {
  padding: 8px 0 8px 22px;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--muted);
  position: relative;
}
.checklist-grid li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 700;
}
@media (max-width: 640px) {
  .checklist-grid { grid-template-columns: 1fr; }
}
html[dir="rtl"] .checklist-grid li { padding: 8px 22px 8px 0; }
html[dir="rtl"] .checklist-grid li::before { left: auto; right: 0; }

.trust-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

@media (max-width: 640px) {
  .trust-grid {
    grid-template-columns: 1fr;
  }
}

.trust-item {
  display: flex;
  gap: 14px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.trust-item:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--primary-soft); }
.trust-item .card-icon { flex-shrink: 0; border-radius: 999px; }
.trust-item h3 { margin: 0 0 6px; font-size: 0.95rem; }
.trust-item p { margin: 0; color: var(--muted); font-size: 0.85rem; line-height: 1.55; }

.prose { font-size: 0.95rem; line-height: 1.75; color: var(--text); }
.prose p { margin: 0 0 16px; }
.prose h2 { font-size: 1.25rem; margin: 32px 0 10px; }
.prose ul { margin: 0 0 16px; padding-inline-start: 20px; }
.prose li { margin-bottom: 6px; color: var(--muted); }

.callout {
  background: var(--primary-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  margin: 24px 0;
  font-size: 0.88rem;
  color: var(--text);
}

.site-footer {
  background: var(--primary-hover);
  color: rgba(255, 255, 255, 0.82);
  margin-top: 48px;
}

.footer-inner {
  padding: 48px 6vw 32px;
  display: flex;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-brand {
  max-width: 320px;
}

.footer-brand-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
  color: #ffffff;
}

.footer-brand-name .icon {
  width: 20px;
  height: 20px;
}

.footer-brand p {
  margin: 10px 0 0;
  font-size: 0.85rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.62);
}

.footer-contact-email {
  display: inline-block;
  margin-top: 14px;
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
}
.footer-contact-email:hover { color: #ffffff; text-decoration: underline; }

.footer-links {
  display: flex;
  gap: 48px;
  flex-wrap: wrap;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col h4 {
  margin: 0 0 2px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.48);
}

.footer-col a {
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
  font-size: 0.87rem;
}

.footer-col a:hover {
  color: #ffffff;
  text-decoration: underline;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  padding: 16px 6vw;
  text-align: center;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.55);
}

@media (max-width: 640px) {
  .footer-inner {
    flex-direction: column;
    gap: 28px;
  }
  .footer-links {
    gap: 28px;
  }
}

.register-tabs {
  display: flex;
  gap: 6px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px;
  width: fit-content;
  margin: 0 auto 28px;
}
.register-tab {
  border: none;
  background: transparent;
  border-radius: 999px;
  padding: 7px 18px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
}
.register-tab.active { background: var(--primary); color: white; }

.register-card {
  max-width: 720px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}

.register-stepper {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 26px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}
.register-stepper-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  cursor: pointer;
}
.register-stepper-item:hover { color: var(--primary); }
.register-stepper-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.75rem;
  flex-shrink: 0;
}
.register-stepper-item.active { color: var(--primary); }
.register-stepper-item.active .register-stepper-num { background: var(--primary); border-color: var(--primary); color: white; }
@media (max-width: 640px) {
  .register-stepper-item span:not(.register-stepper-num) { display: none; }
}

.register-form[hidden] { display: none; }
.register-form label { display: flex; flex-direction: column; gap: 5px; font-size: 0.83rem; font-weight: 600; color: var(--muted); }
.register-form input, .register-form select, .register-form textarea {
  padding: 9px 11px;
  font-family: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.register-form input:focus, .register-form select:focus, .register-form textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.register-form textarea { resize: vertical; min-height: 70px; }

.register-simple-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.register-simple-form label:has(textarea), .register-simple-form label:has(input[type="checkbox"]),
.register-simple-form button, .register-simple-form .form-message, .register-simple-form .register-benefit {
  grid-column: 1 / -1;
}
@media (max-width: 560px) {
  .register-simple-form { grid-template-columns: 1fr; }
}

.register-benefit {
  background: var(--primary-soft);
  border: 1px solid var(--primary-soft);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}

.register-panel-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
@media (max-width: 560px) {
  .register-panel-grid { grid-template-columns: 1fr; }
}

.feature-checkbox-grid { margin: 6px 0 16px; }
.feature-checkbox {
  flex-direction: row !important;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  font-weight: 500 !important;
  color: var(--text) !important;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease;
}
.feature-checkbox:hover { background: var(--surface-alt); border-color: var(--primary); }
.feature-checkbox input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--primary); flex-shrink: 0; }

.register-notes { margin-top: 4px; }

.register-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 26px;
}
.register-nav button[hidden] { display: none; }
.register-nav-progress { color: var(--muted); font-size: 0.82rem; }

.register-success { text-align: center; padding: 20px 0; }
.register-success .icon { width: 42px; height: 42px; color: var(--primary); margin-bottom: 10px; }

@media (max-width: 640px) {
  .nav-toggle { display: inline-flex; }

  .site-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 18px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 16px 6vw 22px;
    box-shadow: var(--shadow-md);
  }
  .site-menu.open { display: flex; }

  .site-nav {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    background: none;
    border-radius: 0;
    padding: 0;
  }
  .site-nav a, .site-nav button {
    padding: 10px 6px;
    font-size: 0.95rem;
  }
  .site-nav a::after, .site-nav button::after { display: none; }

  .site-cta { flex-wrap: wrap; }
  .site-cta > a { flex: 1 1 auto; }
  .site-cta > a > button { width: 100%; }
}

/* ---- Landing page tabs ---- */

.landing-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto 32px;
}
.landing-tab {
  border: none;
  background: transparent;
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 0.86rem;
  font-weight: 650;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.landing-tab:hover:not(.active) { background: var(--surface); color: var(--text); }
.landing-tab.active { background: var(--primary); color: white; box-shadow: var(--shadow-sm); }
.landing-panel { display: none; }
.landing-panel.active { display: block; animation: panel-fade-in 0.2s ease; }
.realestate-subpanel { display: none; }
.realestate-subpanel.active { display: block; animation: panel-fade-in 0.2s ease; }

.whyus-subpanel { display: none; }
.whyus-subpanel.active { display: block; animation: panel-fade-in 0.2s ease; }

.pricing-subpanel { display: none; }
.pricing-subpanel.active { display: block; animation: panel-fade-in 0.2s ease; }

.checklist-tier-title { text-align: center; margin: 22px 0 4px; font-size: 0.95rem; }
.checklist-tier-title:first-of-type { margin-top: 0; }

.addon-list { margin-top: 8px; }
.addon-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--border);
}
.addon-row:first-child { border-top: none; }
.addon-row strong { display: block; font-size: 0.9rem; }
.addon-row p { margin: 2px 0 0; color: var(--muted); font-size: 0.8rem; }
.addon-price { flex-shrink: 0; font-weight: 700; color: var(--primary); white-space: nowrap; }
@media (max-width: 560px) {
  .addon-row { flex-direction: column; align-items: flex-start; gap: 4px; }
}
@keyframes panel-fade-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---- Interactive demo walkthrough ---- */

.demo-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 24px;
  /* Always left-to-right, even on an RTL page: the arrows are a fixed left-to-right
     flowchart convention, and reversing a wrapping flex row under direction:rtl (with
     the arrows as flex items of their own) produces an inconsistent, hard-to-predict
     step order. Card text inside stays in the reader's own language either way. */
  direction: ltr;
}

.demo-arrow { flex-shrink: 0; color: var(--border); width: 20px; height: 20px; }

.mock-window {
  width: 190px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  text-align: center;
  padding: 18px 14px;
  transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
}

.mock-window .card-icon { margin: 0 auto 12px; }
.mock-window h4 { font-size: 0.84rem; margin: 0; line-height: 1.4; }

.mock-window.demo-step-active {
  box-shadow: 0 0 0 4px var(--primary-soft), var(--shadow-md);
  border-color: var(--primary);
  transform: translateY(-3px);
}

@keyframes demo-pulse {
  0%, 15%, 100% { box-shadow: var(--shadow-sm); transform: translateY(0); }
  5% { box-shadow: 0 0 0 4px var(--primary-soft), var(--shadow-md); transform: translateY(-2px); }
}
#demo-flow:not(.demo-narrating) .mock-window { animation: demo-pulse 7.5s ease-in-out infinite; }
#demo-flow:not(.demo-narrating) .mock-window:nth-child(3) { animation-delay: 1.5s; }
#demo-flow:not(.demo-narrating) .mock-window:nth-child(5) { animation-delay: 3s; }
#demo-flow:not(.demo-narrating) .mock-window:nth-child(7) { animation-delay: 4.5s; }
#demo-flow:not(.demo-narrating) .mock-window:nth-child(9) { animation-delay: 6s; }
@media (prefers-reduced-motion: reduce) {
  .mock-window { animation: none !important; }
}

.demo-btn-row { display: flex; justify-content: center; margin-top: 22px; }
.demo-progress { display: none; max-width: 380px; margin: 18px auto 0; }
.demo-progress.is-visible { display: block; }
.demo-progress-label { text-align: center; font-size: 0.82rem; font-weight: 650; color: var(--primary); margin-bottom: 8px; }
.demo-progress-bar { display: flex; gap: 6px; direction: ltr; }
.demo-progress-dot { flex: 1; height: 4px; border-radius: 3px; background: var(--border); }
.demo-progress-dot.is-done { background: var(--primary); opacity: 0.5; }
.demo-progress-dot.is-active { background: var(--primary); }
.demo-hint { text-align: center; color: var(--muted); font-size: 0.78rem; margin-top: 10px; }

/* ---- Toasts ---- */

#toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 1000;
  max-width: 340px;
}

.toast {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.visible { opacity: 1; transform: translateY(0); }

.toast-anchored { position: fixed; z-index: 1000; max-width: 280px; }

.toast-success { background: var(--primary); }
.toast-danger { background: var(--danger); }
.toast-info { background: var(--info); }

/* ---- Inline profile links (a property/owner name that opens its profile) ---- */

.link-btn {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-align: start;
}
.link-btn:hover { text-decoration: underline; }

/* ---- Modal dialogs (replaces chains of native prompt()) ---- */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 24, 30, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
}

.modal-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 22px;
  width: 100%;
  max-width: 440px;
  max-height: 88vh;
  overflow-y: auto;
}
.modal-card h3 { margin: 0 0 8px; font-size: 1.05rem; }
.modal-description { margin: 0 0 14px; font-size: 0.85rem; color: var(--muted); }
