/* Prime Estate & Properties: dark mode and the few new components.
   The light design in site-pages.css, home.css and portal.css is NOT changed.
   Everything below only applies when <html data-theme="dark"> is set by rc-theme.js,
   except the "new components" block at the bottom, which uses the same colours as the light design. */

/* ---------- dark palette ---------- */
html[data-theme="dark"]{
  color-scheme:dark;
  --green:#2d7d65;--green2:#8fd3a5;--cream:#15211c;--ink:#e8f0eb;--muted:#a3b5ab;--line:#2a3a33;
  --brand:#2d7d65;--brand-dark:#25695a;--paper:#15211c;--leaf:#6cc788;
  --g:#2d7d65;--g2:#8fd3a5;--bg:#0e1613;--mut:#a3b5ab;
  --rc-surface:#15211c;--rc-surface2:#1b2a24;--rc-field:#0e1613;--rc-border:#3a4d44;--rc-text:#e8f0eb;
}
html[data-theme="dark"] .home{--muted:#a3b5ab}
html[data-theme="dark"] body{background:#0e1613;color:#e8f0eb}
html[data-theme="dark"] a{color:#8fd3a5}
html[data-theme="dark"] ::selection{background:#2d7d65;color:#fff}

/* ---------- shared header and footer ---------- */
html[data-theme="dark"] .rcn-head{background:#0e1613;border-bottom-color:#2a3a33}
html[data-theme="dark"] .rcn-brand{color:#e8f0eb}
html[data-theme="dark"] .rcn-brand span{color:#6cc788}
html[data-theme="dark"] .rcn-links a{color:#e8f0eb}
html[data-theme="dark"] .rcn-links a:hover,html[data-theme="dark"] .rcn-links a.on{color:#8fd3a5}
html[data-theme="dark"] .rcn-links a.rcn-cta{background:#2d7d65;color:#fff}
html[data-theme="dark"] .rcn-links a.rcn-cta:hover{background:#25695a;color:#d9f27a}
html[data-theme="dark"] .rcn-menu{background:#15211c;border-color:#3a4d44;color:#e8f0eb}
html[data-theme="dark"] .rcn-theme{background:#15211c;border-color:#3a4d44;color:#d9f27a}
html[data-theme="dark"] .rcn-theme:hover{border-color:#8fd3a5;color:#8fd3a5}
html[data-theme="dark"] .rcn-foot{background:#08130f}
html[data-theme="dark"] .rcn-foot a{color:#cfe0d7}
html[data-theme="dark"] .rcn-foot a:hover{color:#d9f27a}
@media(max-width:860px){
  html[data-theme="dark"] .rcn-links{background:#0e1613;border-bottom-color:#2a3a33}
  html[data-theme="dark"] .rcn-links a{border-bottom-color:#22302a}
}

/* ---------- inner pages (site-pages.css) ---------- */
html[data-theme="dark"] .hero{background:#15211c}
html[data-theme="dark"] .eyebrow{color:#8fd3a5}
html[data-theme="dark"] .panel{background:#15211c;border-color:#2a3a33}
html[data-theme="dark"] .callout{background:#15211c;border-left-color:#6cc788}
html[data-theme="dark"] .btn{background:#2d7d65;color:#fff}
html[data-theme="dark"] .btn:hover{background:#25695a}
html[data-theme="dark"] .btn.alt{background:transparent;color:#d9f27a;border:1px solid #6b8f7d}
html[data-theme="dark"] .btn.alt:hover{background:#1b2a24;border-color:#d9f27a}
html[data-theme="dark"] .btn.mark{background:#d9f27a;color:#0b3326;border-color:#d9f27a}
html[data-theme="dark"] .btn.ghost-light{background:transparent;color:#fff;border-color:rgba(255,255,255,.55)}

/* ---------- homepage (home.css) ---------- */
html[data-theme="dark"] .home-hero{background:radial-gradient(1100px 420px at 85% -10%,#1d3a2d 0,rgba(29,58,45,0) 60%),#0e1613;border-bottom-color:#2a3a33}
html[data-theme="dark"] .hh-copy h1,
html[data-theme="dark"] .hc-price strong,
html[data-theme="dark"] .pd-price{color:#f1f7f3}
html[data-theme="dark"] .specimen,
html[data-theme="dark"] .finder,
html[data-theme="dark"] .home-card,
html[data-theme="dark"] .p-steps li,
html[data-theme="dark"] .report-box,
html[data-theme="dark"] .checks .callout,
html[data-theme="dark"] dialog,
html[data-theme="dark"] .modal-head{background:#15211c;border-color:#2a3a33;color:#e8f0eb}
html[data-theme="dark"] .specimen{box-shadow:0 2px 4px rgba(0,0,0,.4),0 12px 32px rgba(0,0,0,.45)}
html[data-theme="dark"] .sp-tag{background:#0e1613;border-color:#2a3a33}
html[data-theme="dark"] .sp-costs{border-top-color:#3a4d44}
html[data-theme="dark"] .sp-costs .total,html[data-theme="dark"] .pd-costs .total{background:#2d7d65}
html[data-theme="dark"] .sp-stamp{color:#6cc788;border-color:#6cc788}
html[data-theme="dark"] .finder label,html[data-theme="dark"] .form-group label,html[data-theme="dark"] .sort label{color:#cfe0d7}
html[data-theme="dark"] .finder input,html[data-theme="dark"] .finder select,html[data-theme="dark"] .sort select,html[data-theme="dark"] .form-control{background:#0e1613;color:#e8f0eb;border-color:#3a4d44}
html[data-theme="dark"] .finder input::placeholder,html[data-theme="dark"] .form-control::placeholder{color:#7f9488}
html[data-theme="dark"] .finder input:focus,html[data-theme="dark"] .finder select:focus,html[data-theme="dark"] .sort select:focus,html[data-theme="dark"] .form-control:focus{outline-color:#2d7d65;border-color:#8fd3a5}
html[data-theme="dark"] .skel{background:linear-gradient(100deg,#15211c 30%,#1f2f28 50%,#15211c 70%) 0 0/200% 100%}
html[data-theme="dark"] .hc-photo,html[data-theme="dark"] .pd-stage,html[data-theme="dark"] .pd-gallery{background:#1b2a24}
html[data-theme="dark"] .hc-facts,html[data-theme="dark"] .pd-desc{color:#cfe0d7}
html[data-theme="dark"] .hc-total{background:#0e1613;border-color:#2a3a33;color:#a3b5ab}
html[data-theme="dark"] .hc-total strong{color:#d9f27a}
html[data-theme="dark"] .badge.no{background:#3a3216;color:#f1dfa1;border-color:#6b5a1f}
html[data-theme="dark"] .badge.no .ic{color:#f1c94c}
html[data-theme="dark"] .save-btn,html[data-theme="dark"] .pd-arrow{background:rgba(21,33,28,.95);color:#e8f0eb}
html[data-theme="dark"] .save-btn.saved{color:#ff6b9a}
html[data-theme="dark"] .modal-close{background:#15211c;border-color:#3a4d44;color:#e8f0eb}
html[data-theme="dark"] .modal-close:hover{background:#1b2a24}
html[data-theme="dark"] .empty{background:#15211c;border-color:#3a4d44}
html[data-theme="dark"] .empty h3{color:#e8f0eb}
html[data-theme="dark"] .checks{background:#121c18}
html[data-theme="dark"] .cl-tick,html[data-theme="dark"] .pd-checks .t{background:#2d7d65}
html[data-theme="dark"] .pd-checks .t.off{background:transparent;border-color:#5b7468}
html[data-theme="dark"] .pd-costs>div{border-bottom-color:#2a3a33}
html[data-theme="dark"] .pd-thumbs button{background:#1b2a24}
html[data-theme="dark"] .pd-thumbs button[aria-current="true"]{border-color:#8fd3a5}
html[data-theme="dark"] .join-owners{background:#15211c;border-color:#2a3a33}
html[data-theme="dark"] .join-agents{background:#173d32}
html[data-theme="dark"] .faq details,html[data-theme="dark"] .faq details:first-child{border-color:#2a3a33}
html[data-theme="dark"] .report-box{border-top-color:#f2c94c}
html[data-theme="dark"] dialog::backdrop{background:rgba(0,0,0,.72)}
html[data-theme="dark"] button.link{color:#ff8f86}
html[data-theme="dark"] .toast{background:#e8f0eb;color:#0e1613}

/* ---------- agent and admin portals (portal.css) ---------- */
html[data-theme="dark"] .card{background:#15211c;border-color:#2a3a33;box-shadow:none}
html[data-theme="dark"] .portal input,html[data-theme="dark"] .portal select,html[data-theme="dark"] .portal textarea,
html[data-theme="dark"] input,html[data-theme="dark"] select,html[data-theme="dark"] textarea{background:#0e1613;color:#e8f0eb;border-color:#3a4d44}
html[data-theme="dark"] input:focus,html[data-theme="dark"] select:focus,html[data-theme="dark"] textarea:focus{outline-color:#8fd3a5}
html[data-theme="dark"] .portal button{background:#2d7d65;color:#fff}
html[data-theme="dark"] .portal button:hover{background:#25695a}
html[data-theme="dark"] .portal button.alt{background:transparent;color:#cfe9d6;border:1px solid #5b7468}
html[data-theme="dark"] .portal button.alt:hover{background:#1b2a24}
html[data-theme="dark"] .portal button.bad{background:#b3261e;color:#fff}
html[data-theme="dark"] .seg{border-color:#5b7468}
html[data-theme="dark"] .seg button{background:transparent;color:#cfe9d6}
html[data-theme="dark"] .seg button.on{background:#2d7d65;color:#fff}
html[data-theme="dark"] .tabs button{background:#15211c;color:#cfe9d6;border-color:#2a3a33}
html[data-theme="dark"] .tabs button[aria-selected="true"]{background:#2d7d65;color:#fff;border-color:#2d7d65}
html[data-theme="dark"] .stat{background:#0e1613}
html[data-theme="dark"] .stat b{color:#d9f27a}
html[data-theme="dark"] .pill{background:#22352d;color:#cfe0d7}
html[data-theme="dark"] .pill.good{background:#17382a;color:#8fe0a5}
html[data-theme="dark"] .pill.warn{background:#3a3216;color:#f1dfa1}
html[data-theme="dark"] .pill.bad{background:#40201d;color:#ff9d95}
html[data-theme="dark"] .private{background:#3a3216;color:#f1dfa1;border-left-color:#e0a800}
html[data-theme="dark"] .drop{background:#0e1613;border-color:#4a6558}
html[data-theme="dark"] .drop.over{background:#173d32}
html[data-theme="dark"] .ph{background:#15211c;border-color:#2a3a33}
html[data-theme="dark"] .lst{border-top-color:#2a3a33}
html[data-theme="dark"] #msg.ok,html[data-theme="dark"] .ok{color:#8fe0a5}
html[data-theme="dark"] #msg.err,html[data-theme="dark"] .err{color:#ff9d95}
html[data-theme="dark"] small,html[data-theme="dark"] .hint{color:#a3b5ab}
html[data-theme="dark"] code{background:#1b2a24;color:#d9f27a}

/* ---------- new components (same look as the light design, theme-aware) ---------- */
.rc-two{display:grid;grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);gap:20px;align-items:start}
.rc-two .panel h2{margin-top:0}
.rc-list{list-style:none;margin:0 0 6px;padding:0}
.rc-list li{padding:9px 0;border-bottom:1px solid var(--line)}
.rc-list li:last-child{border-bottom:0}
.rc-list b{display:block;font-size:.8rem;text-transform:uppercase;letter-spacing:.08em;color:var(--muted);font-weight:800}
.rc-field{margin:0 0 14px}
.rc-field label{display:block;font-size:.85rem;font-weight:700;margin:0 0 6px;color:var(--ink)}
.rc-field input,.rc-field select,.rc-field textarea{width:100%;padding:12px;font:inherit;color:var(--ink);background:var(--rc-field,#fff);border:1px solid var(--rc-border,#c3cec7);border-radius:10px}
.rc-field textarea{min-height:130px;resize:vertical}
.rc-field input:focus,.rc-field select:focus,.rc-field textarea:focus{outline:3px solid #b9dcc4;border-color:var(--green2)}
html[data-theme="dark"] .rc-field input:focus,html[data-theme="dark"] .rc-field select:focus,html[data-theme="dark"] .rc-field textarea:focus{outline-color:#2d7d65}
.rc-hp{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}
.rc-form-msg{margin:12px 0 0;padding:12px 14px;border-radius:10px;font-size:.95rem;display:none}
.rc-form-msg.show{display:block}
.rc-form-msg.ok{background:#e6f4ea;color:#145c2c}
.rc-form-msg.err{background:#fbdcd9;color:#8c1d16}
html[data-theme="dark"] .rc-form-msg.ok{background:#17382a;color:#8fe0a5}
html[data-theme="dark"] .rc-form-msg.err{background:#40201d;color:#ff9d95}
.rc-who{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin:6px 0 28px}
.rc-who .panel{display:flex;flex-direction:column;gap:6px}
.rc-who .panel h3{margin:0;font-size:1.02rem}
.rc-who .panel p{margin:0 0 8px;color:var(--muted);font-size:.93rem}
.rc-who .panel a.btn{margin-top:auto;text-align:center}
.rc-staff-note{font-size:.9rem;color:var(--muted);margin:0 0 12px}
@media(max-width:900px){.rc-two{grid-template-columns:1fr}.rc-who{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:520px){.rc-who{grid-template-columns:1fr}}

/* ---------- small polish shared by every page ---------- */
button.btn{font:inherit;font-weight:750;border:1px solid transparent;cursor:pointer}
button.btn.alt{border-color:var(--green)}
html[data-theme="dark"] button.btn.alt{border-color:#6b8f7d}
button.btn:disabled{opacity:.6;cursor:not-allowed}
.rcn-links a{white-space:nowrap}
@media(min-width:861px) and (max-width:1100px){.rcn-links{gap:16px}.rcn-links a.rcn-cta{padding:11px 16px}}
/* the "No photo yet" picture is a drawn placeholder, so dim it in dark mode; real photos are never changed */
html[data-theme="dark"] img[src^="data:image/svg+xml"]{filter:brightness(.32) saturate(.8)}
html[data-theme="dark"] .rcn-tag{color:#9fb3a7}
.rcn-foot .rcn-tag{color:#cfe0d7}
