/* === SRGB FALLBACKS for browsers without oklch() support ===
   Approximated from the OKLCH definitions in the design system.
   Modern browsers will use the oklch() values from :root below; old
   Safari (<15.4) will fall back to these. */
body.mrpc-design {
  --ink:        #1a2230;   /* deep harbour */
  --ink-2:      #36475a;   /* mid-tide */
  --muted:      #7d8794;
  --soft:       #adb6bf;
  --line:       #dadfe3;
  --line-2:     #e7eaed;
  --mist:       #eef0f2;   /* soft fog panel */
  --paper:      #fbf9f5;   /* warm white */
  --paper-2:    #f7f5f1;
  --accent:     #b78b5c;   /* driftwood */
  --accent-ink: #6f5232;
  --kelp:       #4a7270;
}

/* ============================================================
   VICTORIA BC CONDOS — Coastal Calm design system
   ============================================================ */

body.mrpc-design {
  /* Coastal Calm palette */
  --ink:        oklch(0.22 0.025 235);   /* deep harbour */
  --ink-2:      oklch(0.36 0.030 232);   /* mid-tide */
  --muted:      oklch(0.55 0.022 230);
  --soft:       oklch(0.72 0.018 225);
  --line:       oklch(0.88 0.012 225);
  --line-2:     oklch(0.93 0.010 225);
  --mist:       oklch(0.955 0.010 225);  /* soft fog panel */
  --paper:      oklch(0.985 0.005 90);   /* warm white */
  --paper-2:    oklch(0.975 0.006 85);
  --accent:     oklch(0.66 0.085 55);    /* driftwood / sun-bleached cedar */
  --accent-ink: oklch(0.42 0.080 55);
  --kelp:       oklch(0.48 0.055 175);   /* sea kelp */

  /* fonts */
  --display: 'Newsreader', 'Times New Roman', serif;
  --sans:    'Geist', system-ui, -apple-system, sans-serif;
  --mono:    'JetBrains Mono', ui-monospace, monospace;

  /* rhythm */
  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 14px;
  --r-xl: 22px;

  --container: 1280px;
  --container-wide: 1440px;
}

body.mrpc-design, body.mrpc-design * { box-sizing: border-box; }

body.mrpc-design {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.mrpc-design a { color: inherit; text-decoration: none; }

body.mrpc-design img { max-width: 100%; display: block; }

body.mrpc-design ::selection { background: var(--ink); color: var(--paper); }

/* ----------------------------- Type ----------------------------- */

body.mrpc-design .serif { font-family: var(--display); font-weight: 400; letter-spacing: -0.01em; }
body.mrpc-design .mono { font-family: var(--mono); font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; }
body.mrpc-design .eyebrow { font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }

body.mrpc-design h1, body.mrpc-design h2, body.mrpc-design h3, body.mrpc-design h4 { font-family: var(--display); font-weight: 400; letter-spacing: -0.018em; line-height: 1.05; margin: 0; color: var(--ink); }
body.mrpc-design h1 { font-size: clamp(48px, 6.4vw, 96px); }
body.mrpc-design h2 { font-size: clamp(34px, 3.6vw, 56px); }
body.mrpc-design h3 { font-size: clamp(22px, 1.8vw, 28px); }
body.mrpc-design h4 { font-size: 18px; font-family: var(--sans); font-weight: 500; letter-spacing: 0; }

body.mrpc-design p { margin: 0 0 1em; color: var(--ink-2); }
body.mrpc-design p.lede { font-family: var(--display); font-size: clamp(20px, 1.6vw, 26px); line-height: 1.4; color: var(--ink); font-weight: 300; }

/* italic display tag for editorial accents */
body.mrpc-design em.italic-accent { font-family: var(--display); font-style: italic; font-weight: 400; color: var(--ink); }

/* ----------------------------- Layout ----------------------------- */

body.mrpc-design .container { max-width: var(--container); margin: 0 auto; padding: 0 32px; }
body.mrpc-design .container-wide { max-width: var(--container-wide); margin: 0 auto; padding: 0 32px; }
body.mrpc-design .container-fluid { width: 100%; padding: 0 32px; }

body.mrpc-design section { padding: 96px 0; }
body.mrpc-design section.tight { padding: 56px 0; }

body.mrpc-design hr.rule { border: 0; border-top: 1px solid var(--line); margin: 0; }

/* ----------------------------- Top bar / Nav ----------------------------- */

body.mrpc-design .topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in oklch, var(--paper) 92%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}

body.mrpc-design .topbar-inner {
  max-width: var(--container-wide);
  margin: 0 auto;
  padding: 0 32px;
  height: 72px;
  display: flex;
  align-items: center;
  gap: 32px;
}

body.mrpc-design .brand {
  display: flex; align-items: baseline; gap: 10px;
  font-family: var(--display);
  font-size: 22px;
  letter-spacing: -0.01em;
  color: var(--ink);
}
body.mrpc-design .brand .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); display: inline-block; align-self: center; }
body.mrpc-design .brand .sub { font-family: var(--mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); margin-left: 4px; }

body.mrpc-design .nav { display: flex; align-items: center; gap: 28px; margin-left: auto; }
body.mrpc-design .nav a {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 2px;
  border-bottom: 1px solid transparent;
  transition: color .15s, border-color .15s;
}
body.mrpc-design .nav a:hover { color: var(--ink); }
body.mrpc-design .nav a.is-active { color: var(--ink); border-bottom-color: var(--ink); }
body.mrpc-design .nav .caret { width: 8px; height: 8px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translate(-1px,-1px); opacity: 0.6; }

body.mrpc-design .nav-cta {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px;
  background: var(--ink);
  color: var(--paper) !important;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
}
body.mrpc-design .nav-cta:hover { background: var(--ink-2); }

body.mrpc-design .fav-icon {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: inline-flex; align-items: center; justify-content: center;
  position: relative;
}
body.mrpc-design .fav-icon::after {
  content: ''; position: absolute; top: 8px; right: 8px;
  width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
}

/* dropdown */
body.mrpc-design .nav-item { position: relative; }
body.mrpc-design .nav-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: -16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 24px 28px;
  min-width: 560px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  box-shadow: 0 24px 60px -20px oklch(0.22 0.025 235 / 0.18);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: all .18s;
}
body.mrpc-design .nav-item:hover .nav-dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
body.mrpc-design .nav-dropdown h5 {
  font-family: var(--display); font-size: 17px; font-weight: 500;
  margin: 0 0 10px;
  color: var(--ink);
}
body.mrpc-design .nav-dropdown a { display: block; padding: 4px 0; border: 0; font-size: 13px; color: var(--ink-2); }
body.mrpc-design .nav-dropdown a:hover { color: var(--accent-ink); }

/* ----------------------------- Buttons ----------------------------- */

body.mrpc-design .btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s, transform .15s;
}
body.mrpc-design .btn-primary { background: var(--ink); color: var(--paper); }
body.mrpc-design .btn-primary:hover { background: var(--ink-2); }
body.mrpc-design .btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
body.mrpc-design .btn-ghost:hover { border-color: var(--ink); }
body.mrpc-design .btn-accent { background: var(--accent); color: var(--paper); }
body.mrpc-design .btn-accent:hover { background: var(--accent-ink); }
body.mrpc-design .btn-lg { padding: 16px 28px; font-size: 15px; }

body.mrpc-design .icon-arrow {
  width: 14px; height: 14px;
  position: relative; display: inline-block;
}
body.mrpc-design .icon-arrow::before {
  content: ''; position: absolute; left: 0; top: 50%;
  width: 100%; height: 1.5px; background: currentColor;
  transform: translateY(-50%);
}
body.mrpc-design .icon-arrow::after {
  content: ''; position: absolute; right: 0; top: 50%;
  width: 7px; height: 7px;
  border-top: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
  transform: translateY(-50%) rotate(45deg);
}

/* ----------------------------- Tags / Chips ----------------------------- */

body.mrpc-design .tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono);
  font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-2);
  padding: 5px 10px;
  background: var(--mist);
  border: 1px solid var(--line);
  border-radius: 999px;
}
body.mrpc-design .tag.is-new { background: var(--accent); color: var(--paper); border-color: transparent; }
body.mrpc-design .tag.is-area { background: transparent; }

body.mrpc-design .chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  color: var(--ink-2);
  background: var(--paper);
  cursor: pointer;
}
body.mrpc-design .chip:hover { border-color: var(--ink); color: var(--ink); }
body.mrpc-design .chip.is-active { background: var(--ink); color: var(--paper); border-color: var(--ink); }
body.mrpc-design .chip .count { font-family: var(--mono); font-size: 10px; opacity: 0.7; }

/* ----------------------------- Placeholders ----------------------------- */

body.mrpc-design .ph {
  position: relative;
  background:
    repeating-linear-gradient(
      135deg,
      color-mix(in oklch, var(--ink) 6%, transparent) 0 1px,
      transparent 1px 9px
    ),
    var(--mist);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
}
body.mrpc-design .ph.ph-tall { aspect-ratio: 4/5; }
body.mrpc-design .ph.ph-wide { aspect-ratio: 16/10; }
body.mrpc-design .ph.ph-sq { aspect-ratio: 1/1; }
body.mrpc-design .ph .ph-label {
  position: absolute;
  top: 12px; left: 12px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-2);
  background: var(--paper);
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid var(--line);
}
body.mrpc-design .ph .ph-caption {
  position: absolute;
  bottom: 12px; left: 12px; right: 12px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
}

/* darker placeholder variant */
body.mrpc-design .ph-dark {
  background:
    repeating-linear-gradient(
      135deg,
      color-mix(in oklch, var(--paper) 8%, transparent) 0 1px,
      transparent 1px 9px
    ),
    var(--ink);
  color: var(--paper);
  border-color: transparent;
}
body.mrpc-design .ph-dark .ph-label { background: var(--ink-2); color: var(--paper); border-color: transparent; }
body.mrpc-design .ph-dark .ph-caption { color: color-mix(in oklch, var(--paper) 60%, transparent); }

/* ----------------------------- Building Card ----------------------------- */

body.mrpc-design .card {
  display: flex; flex-direction: column;
  gap: 14px;
  cursor: pointer;
}
body.mrpc-design .card .card-media { position: relative; aspect-ratio: 4/3; overflow: hidden; border-radius: var(--r-md); }
body.mrpc-design .card .card-media .ph { position: absolute; inset: 0; border-radius: var(--r-md); }
body.mrpc-design .card .card-media .badges {
  position: absolute;
  top: 12px; left: 12px; right: 12px;
  display: flex; gap: 6px; align-items: center;
}
body.mrpc-design .card .card-media .heart {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: color-mix(in oklch, var(--paper) 92%, transparent);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  margin-left: auto;
}
body.mrpc-design .card .card-meta-top {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted);
}
body.mrpc-design .card .card-meta-top .sep { width: 3px; height: 3px; background: var(--soft); border-radius: 50%; }
body.mrpc-design .card .card-title { font-family: var(--display); font-size: 22px; line-height: 1.15; color: var(--ink); }
body.mrpc-design .card .card-address { font-size: 13px; color: var(--muted); }
body.mrpc-design .card .card-row {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-top: 4px;
}
body.mrpc-design .card .card-row .price { font-family: var(--display); font-size: 20px; color: var(--ink); }
body.mrpc-design .card .card-row .price .from { font-family: var(--sans); font-size: 11px; color: var(--muted); margin-right: 4px; text-transform: uppercase; letter-spacing: 0.1em; }
body.mrpc-design .card .card-row .stats {
  font-family: var(--mono); font-size: 11px; color: var(--ink-2);
  display: flex; gap: 12px;
}

body.mrpc-design .card:hover .card-title { color: var(--accent-ink); }

/* compact card variant */
body.mrpc-design .card.card-compact .card-title { font-size: 18px; }
body.mrpc-design .card.card-compact .card-media { aspect-ratio: 3/2; }

/* ----------------------------- Listings grid ----------------------------- */

body.mrpc-design .grid {
  display: grid;
  gap: 36px 28px;
}
body.mrpc-design .grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
body.mrpc-design .grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
body.mrpc-design .grid.cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 900px) {
  body.mrpc-design .grid.cols-3, body.mrpc-design .grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
  body.mrpc-design .grid.cols-2 { grid-template-columns: 1fr; }
}

/* ----------------------------- Section heads ----------------------------- */

body.mrpc-design .section-head {
  display: flex; align-items: end; justify-content: space-between;
  margin-bottom: 40px;
  gap: 24px;
}
body.mrpc-design .section-head .eyebrow { margin-bottom: 12px; display: block; }
body.mrpc-design .section-head h2 { max-width: 700px; }
body.mrpc-design .section-head .meta {
  font-family: var(--mono); font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  display: flex; align-items: center; gap: 12px;
}
body.mrpc-design .section-head .meta a { color: var(--ink); border-bottom: 1px solid var(--ink); padding-bottom: 1px; }

/* ----------------------------- Footer ----------------------------- */

body.mrpc-design .footer {
  background: var(--ink);
  color: color-mix(in oklch, var(--paper) 75%, transparent);
  padding: 96px 0 32px;
}
body.mrpc-design .footer .container-wide { padding: 0 32px; }
body.mrpc-design .footer h5 { font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: color-mix(in oklch, var(--paper) 55%, transparent); margin: 0 0 18px; font-weight: 500; }
body.mrpc-design .footer a { color: color-mix(in oklch, var(--paper) 85%, transparent); display: block; padding: 4px 0; font-size: 14px; }
body.mrpc-design .footer a:hover { color: var(--paper); }
body.mrpc-design .footer .footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1.4fr;
  gap: 48px;
  padding-bottom: 56px;
  border-bottom: 1px solid color-mix(in oklch, var(--paper) 12%, transparent);
}
body.mrpc-design .footer .footer-brand {
  font-family: var(--display); font-size: 28px; color: var(--paper); margin-bottom: 14px;
}
body.mrpc-design .footer .footer-brand .dot { width: 10px; height: 10px; background: var(--accent); border-radius: 50%; display: inline-block; margin-right: 6px; vertical-align: middle; }
body.mrpc-design .footer .footer-tag { font-size: 14px; max-width: 380px; line-height: 1.55; }
body.mrpc-design .footer .legal {
  margin-top: 32px;
  display: flex; justify-content: space-between; gap: 24px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase;
  color: color-mix(in oklch, var(--paper) 45%, transparent);
}
body.mrpc-design .footer .social { display: flex; gap: 10px; margin-top: 14px; }
body.mrpc-design .footer .social a {
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid color-mix(in oklch, var(--paper) 18%, transparent);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px;
  padding: 0;
}
body.mrpc-design .footer .social a:hover { border-color: var(--paper); }
body.mrpc-design .footer .newsletter { display: flex; gap: 0; margin-top: 8px; }
body.mrpc-design .footer .newsletter input {
  flex: 1;
  background: transparent;
  border: 1px solid color-mix(in oklch, var(--paper) 20%, transparent);
  color: var(--paper);
  padding: 12px 14px;
  font-family: var(--sans); font-size: 13px;
  border-radius: 999px 0 0 999px;
  border-right: 0;
}
body.mrpc-design .footer .newsletter input::placeholder { color: color-mix(in oklch, var(--paper) 50%, transparent); }
body.mrpc-design .footer .newsletter button {
  background: var(--paper);
  color: var(--ink);
  border: 0;
  border-radius: 0 999px 999px 0;
  padding: 0 18px;
  font-size: 13px;
  cursor: pointer;
}

/* ----------------------------- Map (SVG hero) ----------------------------- */

body.mrpc-design .map-hero {
  position: relative;
  background: var(--mist);
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
body.mrpc-design .map-hero .map-svg {
  display: block;
  width: 100%;
  height: auto;
}

body.mrpc-design .map-region {
  fill: color-mix(in oklch, var(--ink) 8%, var(--paper));
  stroke: var(--line);
  stroke-width: 1;
  cursor: pointer;
  transition: fill 0.2s;
}
body.mrpc-design .map-region:hover { fill: color-mix(in oklch, var(--accent) 22%, var(--paper)); }
body.mrpc-design .map-region.is-active { fill: color-mix(in oklch, var(--ink) 22%, var(--paper)); }

body.mrpc-design .map-water { fill: color-mix(in oklch, var(--kelp) 14%, var(--paper)); }
body.mrpc-design .map-label {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  fill: var(--ink-2);
  pointer-events: none;
}
body.mrpc-design .map-label.is-region { font-size: 11px; fill: var(--ink); letter-spacing: 0.18em; }

body.mrpc-design .map-pin {
  fill: var(--accent);
  stroke: var(--paper);
  stroke-width: 2;
  cursor: pointer;
  transition: r 0.15s;
}
body.mrpc-design .map-pin:hover { r: 7; }

/* ----------------------------- Filters bar ----------------------------- */

body.mrpc-design .filters {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 16px 24px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: 0 14px 36px -18px oklch(0.22 0.025 235 / 0.18);
}
body.mrpc-design .filters .filter-divider { width: 1px; height: 22px; background: var(--line); margin: 0 4px; }
body.mrpc-design .filters .filter {
  display: inline-flex; flex-direction: column;
  padding: 4px 16px;
  cursor: pointer;
  border-radius: 999px;
  min-width: 0;
}
body.mrpc-design .filters .filter:hover { background: var(--mist); }
body.mrpc-design .filters .filter .l {
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted);
}
body.mrpc-design .filters .filter .v {
  font-size: 14px; color: var(--ink); font-weight: 500;
  white-space: nowrap;
}
body.mrpc-design .filters .filter-search {
  margin-left: auto;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  display: inline-flex; align-items: center; justify-content: center;
  border: 0;
  cursor: pointer;
  font-size: 16px;
}

/* ----------------------------- Misc ----------------------------- */

body.mrpc-design .divider-mark {
  display: flex; align-items: center; gap: 16px;
  color: var(--muted);
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase;
  margin: 8px 0 18px;
}
body.mrpc-design .divider-mark::before, body.mrpc-design .divider-mark::after { content: ''; flex: 1; height: 1px; background: var(--line); }

body.mrpc-design .kpi {
  display: flex; flex-direction: column; gap: 4px;
}
body.mrpc-design .kpi .kpi-n { font-family: var(--display); font-size: 44px; line-height: 1; color: var(--ink); }
body.mrpc-design .kpi .kpi-l { font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }

/* Breadcrumb */
body.mrpc-design .crumbs {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted);
  display: flex; align-items: center; gap: 10px;
  padding: 22px 0;
}
body.mrpc-design .crumbs a:hover { color: var(--ink); }
body.mrpc-design .crumbs .sep { opacity: 0.5; }
body.mrpc-design .crumbs .here { color: var(--ink); }

/* Underline-on-hover text link */
body.mrpc-design .link {
  position: relative;
  color: var(--ink);
  border-bottom: 1px solid currentColor;
  padding-bottom: 1px;
}
body.mrpc-design .link:hover { color: var(--accent-ink); }
