/* RM-08/10/12/13/14/15 — high contrast, html[data-theme] + prefers-color-scheme. Does not edit raha-2040.css. */
:root {
  --rp-text: #161410;
  --rp-muted: #3f3a33;
  --rp-line: #cfc6b8;
  --rp-card: #fff;
  --rp-bg: #f6f3ec;
  --rp-accent: #0f6b4c;
  --rp-accent-text: #fff;
  --rp-danger: #8b1e1e;
}
html[data-theme="dark"] {
  --rp-text: #f5f1ea;
  --rp-muted: #d2cdc4;
  --rp-line: #4a453c;
  --rp-card: #1e1c19;
  --rp-bg: #141311;
  --rp-accent: #3dcea0;
  --rp-accent-text: #10231c;
  --rp-danger: #ffb4b0;
}
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) {
    --rp-text: #f5f1ea;
    --rp-muted: #d2cdc4;
    --rp-line: #4a453c;
    --rp-card: #1e1c19;
    --rp-bg: #141311;
    --rp-accent: #3dcea0;
    --rp-accent-text: #10231c;
    --rp-danger: #ffb4b0;
  }
}

/* RM-10: tighter service chips, wrap text instead of truncating */
.prof .svc-chips, .pmeta .svc-chips {
  display: flex;
  flex-wrap: wrap;
  gap: .28rem .35rem;
  margin: .35rem 0 .5rem;
  max-height: none;
  overflow: visible;
}
.prof .svc-chip, .pmeta .svc-chip {
  display: inline-block;
  padding: .12rem .45rem;
  margin: 0;
  line-height: 1.25;
  font-size: .86rem;
  font-weight: 600;
  border: 1px solid var(--rp-line);
  border-radius: 999px;
  color: var(--rp-text);
  background: var(--rp-card);
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
  max-width: 100%;
  word-break: break-word;
}

/* RM-08 */
.plan-card.is-elite-earn { box-shadow: 0 0 0 2px var(--rp-accent); }
.plan-ribbon.is-elite { background: var(--rp-accent); color: var(--rp-accent-text); }
.plan-elite-note { color: var(--rp-muted); font-size: .9rem; margin: .25rem 0 0; }

/* RM-12: county/area list as a disclosure, full names visible */
.hchips-wrap { margin: 0 0 1rem; }
.hchips-toggle {
  display: flex; align-items: center; justify-content: space-between; gap: .6rem;
  width: 100%; max-width: 100%;
  padding: .65rem .9rem; border: 1px solid var(--rp-line); border-radius: 10px;
  background: var(--rp-card); color: var(--rp-text); font: inherit; font-weight: 700;
  cursor: pointer; text-align: left; white-space: normal;
}
.hchips-toggle:focus-visible { outline: 3px solid var(--rp-accent); outline-offset: 2px; }
.hchips-panel {
  margin-top: .45rem; padding: .5rem; border: 1px solid var(--rp-line); border-radius: 10px;
  background: var(--rp-card);
}
.hchips-panel[hidden] { display: none !important; }
.hchips-panel .hchips, .hchips-panel .hchips-areas {
  display: flex; flex-wrap: wrap; gap: .35rem; overflow: visible; max-height: none;
}
.hchips-panel .hchip, .hchips-panel .hchip small {
  white-space: normal; overflow: visible; text-overflow: unset; word-break: break-word;
  color: inherit;
}

/* RM-13: phone-like gallery + badges */
.rg-actions, .gal-actions { display: flex; flex-wrap: wrap; gap: .4rem; margin: .4rem 0 .7rem; }
.rg-actions .rd-btn, .gal-actions .rd-btn, .rg-actions button, .gal-actions button {
  display: inline-block; border: 1px solid var(--rp-line); border-radius: 999px;
  padding: .4rem .8rem; font: inherit; font-weight: 700; cursor: pointer;
  background: var(--rp-accent); color: var(--rp-accent-text);
}
.rg-actions button.ghost, .gal-actions button.ghost, .rg-actions .ghost {
  background: transparent; color: var(--rp-text);
}
.rg-grid, .pg-grid, .vg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .5rem; }
.rg-card, .pg-card, .vg-card { position: relative; margin: 0; }
.rg-new, .pg-new {
  position: absolute; top: .35rem; left: .35rem; z-index: 2;
  background: var(--rp-accent); color: var(--rp-accent-text);
  font-size: .7rem; font-weight: 800; letter-spacing: .04em;
  padding: .12rem .4rem; border-radius: 999px;
}
.rg-new-bar, .pg-new-bar {
  margin: 0 0 .6rem; font-weight: 700; color: var(--rp-text);
}
.rp-lightbox {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(10,8,6,.92); color: #f5f1ea;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.rp-lightbox[hidden] { display: none !important; }
.rp-lightbox img, .rp-lightbox video {
  max-width: min(96vw, 900px); max-height: 78vh; object-fit: contain; background: #000;
}
.rp-lb-bar { display: flex; gap: .6rem; align-items: center; margin-top: .7rem; color: #f5f1ea; }
.rp-lb-bar button {
  border: 1px solid #cfc6b8; background: #1e1c19; color: #f5f1ea;
  border-radius: 999px; padding: .4rem .8rem; font: inherit; cursor: pointer;
}
.rp-lb-bar button:focus-visible { outline: 3px solid #3dcea0; }

/* RM-14 model app bar menu */
.raha-model-menu { position: relative; margin-left: .35rem; }
.raha-model-menu-btn {
  width: 2.35rem; height: 2.35rem; border-radius: 50%;
  border: 1px solid var(--rp-line, #cfc6b8);
  background: var(--rp-card, #fff); color: var(--rp-text, #161410);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.raha-model-menu-btn:focus-visible { outline: 3px solid var(--rp-accent); outline-offset: 2px; }
.raha-model-menu-btn svg { width: 1.25rem; height: 1.25rem; fill: currentColor; }
.raha-model-menu-list {
  position: absolute; right: 0; top: calc(100% + .4rem);
  min-width: 16rem; max-width: calc(100vw - 1.5rem);
  background: var(--rp-card, #fff); color: var(--rp-text, #161410);
  border: 1px solid var(--rp-line, #cfc6b8); border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,.18); padding: .35rem; z-index: 60;
}
.raha-model-menu-list[hidden] { display: none !important; }
.raha-model-menu-list a, .raha-model-menu-list button.menu-link {
  display: block; width: 100%; text-align: left; padding: .55rem .7rem;
  color: var(--rp-text, #161410); text-decoration: none; border: 0; background: none;
  font: inherit; border-radius: 8px; cursor: pointer; white-space: normal;
}
.raha-model-menu-list a:hover, .raha-model-menu-list a:focus,
.raha-model-menu-list button.menu-link:hover, .raha-model-menu-list button.menu-link:focus {
  background: var(--rp-bg, #f6f3ec); outline: none;
}
.raha-model-menu-list a:focus-visible { outline: 2px solid var(--rp-accent); }
.raha-model-menu-list .sep { height: 1px; background: var(--rp-line, #cfc6b8); margin: .3rem 0; border: 0; }
html[data-theme="dark"] .raha-model-menu-btn,
html[data-theme="dark"] .raha-model-menu-list { background: #1e1c19; color: #f5f1ea; border-color: #4a453c; }
html[data-theme="dark"] .raha-model-menu-list a:hover,
html[data-theme="dark"] .raha-model-menu-list a:focus { background: #141311; color: #f5f1ea; }
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .raha-model-menu-btn,
  html:not([data-theme="light"]) .raha-model-menu-list { background: #1e1c19; color: #f5f1ea; border-color: #4a453c; }
  html:not([data-theme="light"]) .raha-model-menu-list a:hover,
  html:not([data-theme="light"]) .raha-model-menu-list a:focus { background: #141311; color: #f5f1ea; }
}

.pacts .bs { /* SMS */
  display: inline-flex; align-items: center; gap: .3rem;
}
