/* PropertyHub website - original design system. Mobile-first: base rules are for a 320px phone, media queries add room.
   Palette: ink #14202B, brand teal #0f6b5c, saffron accent #e8a33d, warm sand #f6f3ec. */

:root {
  --ink: #14202b;
  --ink-soft: #3a4856;
  --muted: #5a6672;
  --brand: #0f6b5c;
  --brand-dark: #0b5547;
  --brand-tint: #e4f1ee;
  --accent: #e8a33d;
  --accent-dark: #9a5f08;
  --sand: #f6f3ec;
  --line: #e3ded2;
  --white: #fff;
  --danger: #b3261e;
  --wa: #128c4a;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(20, 32, 43, .06), 0 6px 18px rgba(20, 32, 43, .07);
  --shadow-lg: 0 10px 34px rgba(20, 32, 43, .16);
  --font-display: Georgia, "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --header-h: 64px;
  --bs-body-font-family: var(--font-body);
  --bs-body-color: var(--ink);
  --bs-link-color: var(--brand);
  --bs-link-hover-color: var(--brand-dark);
  --bs-primary: var(--brand);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
body { font-family: var(--font-body); color: var(--ink); background: var(--white); line-height: 1.55; -webkit-text-size-adjust: 100%; overflow-wrap: break-word; }
img { max-width: 100%; height: auto; }
a { color: var(--brand); text-underline-offset: 2px; }
a:hover { color: var(--brand-dark); }
h1, h2, h3, h4 { line-height: 1.2; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.form-control:focus, .form-select:focus, .form-check-input:focus { border-color: var(--brand); box-shadow: 0 0 0 .22rem rgba(15, 107, 92, .25); }
.form-check-input:checked { background-color: var(--brand); border-color: var(--brand); }

.ph-skip { position: absolute; left: 8px; top: -60px; z-index: 2000; background: var(--ink); color: #fff; padding: .6rem 1rem; border-radius: 0 0 8px 8px; text-decoration: none; }
.ph-skip:focus { top: 0; color: #fff; }
.ph-icon { width: 1.15em; height: 1.15em; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.2em; }
.ph-muted { color: var(--muted); }
.ph-small { font-size: .875rem; }
.ph-ellipsis { max-width: 9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; vertical-align: bottom; }
.ph-prewrap { white-space: pre-line; }
.ph-hint { font-size: .8125rem; color: var(--muted); margin: .4rem 0 0; }
.ph-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.ph-main { min-height: 60vh; outline: none; }

/* ---------- buttons ---------- */
.btn { border-radius: 999px; font-weight: 600; padding: .55rem 1.15rem; display: inline-flex; align-items: center; justify-content: center; gap: .45rem; line-height: 1.25; }
.btn-brand { background: var(--brand); color: #fff; border: 1px solid var(--brand); }
.btn-brand:hover, .btn-brand:focus-visible { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.btn-outline-brand { background: transparent; color: var(--brand); border: 1.5px solid var(--brand); }
.btn-outline-brand:hover { background: var(--brand-tint); color: var(--brand-dark); border-color: var(--brand-dark); }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid transparent; }
.btn-ghost:hover { background: rgba(20, 32, 43, .06); color: var(--ink); }
.btn-wa { background: var(--wa); color: #fff; border: 1px solid var(--wa); }
.btn-wa:hover { background: #0e723c; color: #fff; }

/* ---------- header ---------- */
.ph-header { position: sticky; top: 0; z-index: 1030; background: rgba(255, 255, 255, .97); border-bottom: 1px solid var(--line); backdrop-filter: saturate(1.4) blur(8px); }
.ph-header__bar { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.ph-brand { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--ink); }
.ph-brand:hover { color: var(--ink); }
.ph-brand__mark { height: 40px; width: auto; flex: 0 0 auto; object-fit: contain; }
.ph-brand--light .ph-brand__mark { background: #fff; border-radius: 10px; padding: 4px; height: 46px; }
.ph-brand__name { font-family: var(--font-display); font-size: 1.35rem; letter-spacing: -.01em; }
.ph-brand__name b { color: var(--brand); }
.ph-brand--light, .ph-brand--light:hover { color: #fff; }
.ph-brand--light .ph-brand__name b { color: var(--accent); }
.ph-nav { gap: .15rem; align-items: center; }
.ph-nav a { text-decoration: none; color: var(--ink-soft); font-weight: 600; padding: .45rem .7rem; border-radius: 999px; font-size: .95rem; }
.ph-nav a:hover { background: var(--sand); color: var(--ink); }
.ph-nav a.is-active { color: var(--brand); background: var(--brand-tint); }
.ph-actions { display: flex; align-items: center; gap: .35rem; }
.ph-iconbtn { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; border: 0; background: transparent; color: var(--ink); text-decoration: none; }
.ph-iconbtn:hover { background: var(--sand); color: var(--ink); }
.ph-iconbtn .ph-icon { width: 1.4rem; height: 1.4rem; }
.ph-iconbtn__count { position: absolute; top: 3px; right: 1px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: var(--ink); font-size: .7rem; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.ph-menu { width: min(86vw, 340px); }
.ph-menu nav { display: flex; flex-direction: column; }
.ph-menu nav a { padding: .85rem .25rem; text-decoration: none; color: var(--ink); font-weight: 600; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
.ph-menu__auth { margin-top: 1.5rem; display: grid; gap: .6rem; }

/* ---------- flash ---------- */
.ph-flash { display: flex; gap: .6rem; align-items: flex-start; background: var(--brand-tint); color: var(--brand-dark); border: 1px solid #b8dcd4; border-radius: var(--radius-sm); padding: .8rem 1rem; font-weight: 600; }

/* ---------- hero ---------- */
.ph-hero { position: relative; color: #fff; background: radial-gradient(1200px 500px at 85% -10%, #14907c 0%, transparent 60%), linear-gradient(160deg, #0b5547 0%, #0f6b5c 55%, #12786a 100%); padding: 2.25rem 0 3.5rem; overflow: hidden; }
.ph-hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 90px; background: url("/img/hero.svg") center bottom / cover no-repeat; pointer-events: none; }
.ph-hero__inner { position: relative; z-index: 1; }
.ph-eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .75rem; font-weight: 700; color: var(--brand); margin: 0 0 .35rem; }
.ph-eyebrow--light { color: #ffd58a; }
.ph-hero__title { font-family: var(--font-display); font-weight: 700; font-size: clamp(2rem, 7.5vw, 3.6rem); letter-spacing: -.02em; margin: .2rem 0 .75rem; max-width: 18ch; }
.ph-hero__title em { font-style: italic; color: #ffd58a; }
.ph-hero__lead { max-width: 56ch; font-size: 1.05rem; color: #e1f0ec; margin-bottom: 1.5rem; }
.ph-searchbox { background: #fff; color: var(--ink); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: .75rem; max-width: 1040px; }
.ph-tabs { gap: .25rem; margin-bottom: .75rem; border: 0; flex-wrap: nowrap; }
.ph-tabs .nav-link { border: 0; border-radius: 999px; color: var(--ink-soft); font-weight: 700; padding: .45rem 1.2rem; background: transparent; }
.ph-tabs .nav-link:hover { background: var(--sand); }
.ph-tabs .nav-link.active { background: var(--brand); color: #fff; }
.ph-searchgrid { display: grid; gap: .75rem; grid-template-columns: 1fr; }
.ph-field label, .ph-flabel { display: block; font-size: .8rem; font-weight: 700; color: var(--ink-soft); margin-bottom: .3rem; letter-spacing: .01em; }
legend.ph-flabel { float: none; width: auto; padding: 0; margin-bottom: .45rem; font-size: .8rem; }
.ph-field .form-control, .ph-field .form-select, .ph-fgroup .form-control, .ph-fgroup .form-select { border-radius: var(--radius-sm); border-color: #cfc9ba; min-height: 44px; }
.ph-input-icon { position: relative; }
.ph-input-icon .ph-icon { position: absolute; left: .8rem; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.ph-input-icon .form-control { padding-left: 2.4rem; }
.ph-searchgrid__go { align-self: end; min-height: 44px; }
.ph-sell { display: grid; gap: 1rem; padding: .5rem .25rem; }
.ph-sell h2 { font-family: var(--font-display); font-size: 1.4rem; }
.ph-sell__actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.ph-hero__stats { list-style: none; padding: 0; margin: 1.5rem 0 0; display: flex; flex-wrap: wrap; gap: .5rem 1.75rem; color: #d3e9e4; font-size: .95rem; }
.ph-hero__stats strong { color: #fff; font-size: 1.25rem; font-family: var(--font-display); }

/* ---------- sections ---------- */
.ph-section { padding: 2.75rem 0; }
.ph-section--tint { background: var(--sand); }
.ph-section--brand { background: var(--brand); color: #fff; }
.ph-section--brand .ph-eyebrow { color: #ffd58a; }
.ph-section--brand .ph-link-more { color: #fff; }
.ph-section__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.4rem; flex-wrap: wrap; }
.ph-section__title { font-family: var(--font-display); font-size: clamp(1.5rem, 4.5vw, 2.15rem); letter-spacing: -.01em; margin: 0; }
.ph-link-more { display: inline-flex; align-items: center; gap: .3rem; font-weight: 700; text-decoration: none; }
.ph-link-more:hover { text-decoration: underline; }
.ph-subhead { font-size: 1.05rem; margin: 1.75rem 0 .75rem; font-weight: 700; }
.ph-empty { text-align: center; padding: 2.5rem 1rem; background: var(--sand); border: 1px dashed #d4cdba; border-radius: var(--radius); color: var(--ink-soft); }
.ph-empty h2 { font-size: 1.25rem; font-family: var(--font-display); }
.ph-empty__icon { width: 2.6rem; height: 2.6rem; color: var(--brand); margin-bottom: .5rem; }
.ph-empty--error { background: #fdf0ee; border-color: #f0c3be; }

/* ---------- categories, locations, tools ---------- */
.ph-cats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.ph-cat { display: flex; flex-direction: column; gap: .15rem; padding: 1rem; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); background: #fff; transition: transform .15s, box-shadow .15s, border-color .15s; }
.ph-cat:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--brand); color: var(--ink); }
.ph-cat__icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: var(--brand-tint); color: var(--brand); margin-bottom: .4rem; }
.ph-cat__icon .ph-icon { width: 1.5rem; height: 1.5rem; }
.ph-cat__name { font-weight: 700; }
.ph-cat__count { font-size: .85rem; color: var(--muted); }
.ph-loc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.ph-loc { display: grid; grid-template-columns: auto 1fr; column-gap: .75rem; align-items: center; padding: .85rem 1rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
.ph-loc:hover { border-color: var(--brand); box-shadow: var(--shadow); color: var(--ink); }
.ph-loc__icon { grid-row: span 2; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: var(--brand-tint); color: var(--brand); }
.ph-loc__name { font-weight: 700; line-height: 1.2; }
.ph-loc__count { font-size: .82rem; color: var(--muted); }
.ph-taglist { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.ph-taglist a { display: inline-flex; align-items: center; gap: .35rem; padding: .4rem .85rem; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--ink); background: #fff; font-weight: 600; font-size: .92rem; }
.ph-taglist a small { color: var(--muted); font-weight: 400; }
.ph-taglist a span { background: var(--brand-tint); color: var(--brand-dark); border-radius: 999px; padding: 0 .5rem; font-size: .78rem; }
.ph-taglist a:hover { border-color: var(--brand); }
.ph-tools { display: grid; gap: .85rem; grid-template-columns: 1fr; }
.ph-tool { display: block; padding: 1.25rem; border-radius: var(--radius); background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .25); color: #fff; text-decoration: none; transition: background .15s, transform .15s; }
.ph-tool:hover { background: rgba(255, 255, 255, .18); color: #fff; transform: translateY(-2px); }
.ph-tool .ph-icon { width: 1.9rem; height: 1.9rem; color: #ffd58a; }
.ph-tool h3 { font-size: 1.1rem; margin: .6rem 0 .25rem; }
.ph-tool p { margin: 0; color: #d8ece7; font-size: .93rem; }

/* ---------- grids ---------- */
.ph-grid { display: grid; gap: 1.1rem; grid-template-columns: 1fr; }

/* ---------- property card ---------- */
.ph-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; height: 100%; transition: box-shadow .18s, transform .18s; }
.ph-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.ph-card__top { position: relative; }
.ph-card__media { display: block; aspect-ratio: 4 / 3; background: var(--sand); overflow: hidden; }
.ph-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph-card__noimg { display: grid; place-items: center; width: 100%; height: 100%; min-height: 8rem; color: #b9b19c; background: var(--sand); }
.ph-card__noimg .ph-icon { width: 3rem; height: 3rem; }
.ph-card__badges { position: absolute; top: .6rem; left: .6rem; display: flex; flex-wrap: wrap; gap: .3rem; max-width: calc(100% - 4rem); }
.ph-badge { display: inline-flex; align-items: center; gap: .25rem; font-size: .72rem; font-weight: 800; letter-spacing: .02em; padding: .22rem .6rem; border-radius: 999px; text-transform: uppercase; }
.ph-badge .ph-icon { width: .95em; height: .95em; }
.ph-badge--featured { background: var(--accent); color: #2b1d00; }
.ph-badge--verified { background: #fff; color: var(--brand-dark); border: 1px solid #b8dcd4; }
.ph-pill { position: absolute; left: .6rem; bottom: .6rem; font-size: .75rem; font-weight: 800; padding: .22rem .65rem; border-radius: 999px; color: #fff; background: var(--ink); }
.ph-pill--rent { background: #2b5fa8; }
.ph-pill--sale { background: var(--brand); }
.ph-pill--status { background: var(--ink); }
.ph-fav { position: absolute; top: .55rem; right: .55rem; width: 44px; height: 44px; border-radius: 50%; border: 0; display: grid; place-items: center; background: rgba(255, 255, 255, .95); color: var(--ink); box-shadow: 0 2px 8px rgba(0, 0, 0, .2); cursor: pointer; }
.ph-fav:hover { color: #c62828; }
.ph-fav .ph-icon { width: 1.3rem; height: 1.3rem; }
.ph-fav[aria-pressed="true"] { color: #c62828; }
.ph-fav[aria-pressed="true"] .ph-icon { fill: #c62828; }
.ph-fav.is-busy { opacity: .6; pointer-events: none; }
.ph-card__count { position: absolute; right: .6rem; bottom: .6rem; background: rgba(20, 32, 43, .78); color: #fff; font-size: .75rem; padding: .15rem .55rem; border-radius: 999px; display: inline-flex; align-items: center; gap: .3rem; }
.ph-card__body { padding: .9rem 1rem 1rem; display: flex; flex-direction: column; gap: .35rem; flex: 1; }
.ph-card__price { font-size: 1.3rem; font-weight: 800; color: var(--brand-dark); margin: 0; letter-spacing: -.01em; }
.ph-card__price small { font-size: .8rem; font-weight: 600; color: var(--muted); }
.ph-card__nego { display: inline-block; margin-left: .5rem; font-size: .7rem; font-weight: 700; color: var(--accent-dark); background: #fdf1d9; padding: .1rem .45rem; border-radius: 6px; vertical-align: middle; }
.ph-card__title { font-size: 1rem; font-weight: 700; margin: 0; line-height: 1.3; }
.ph-card__title a { color: var(--ink); text-decoration: none; }
.ph-card__title a:hover { color: var(--brand); text-decoration: underline; }
.ph-card__loc { display: flex; gap: .35rem; align-items: flex-start; color: var(--muted); font-size: .88rem; margin: 0; }
.ph-card__loc .ph-icon { margin-top: .2rem; }
.ph-card__loc--lg { font-size: 1rem; }
.ph-card__meta { margin: 0; color: var(--muted); font-size: .85rem; }
.ph-facts { list-style: none; padding: .6rem 0 0; margin: auto 0 0; display: flex; flex-wrap: wrap; gap: .35rem .9rem; border-top: 1px solid var(--line); font-size: .88rem; color: var(--ink-soft); font-weight: 600; }
.ph-facts li { display: inline-flex; align-items: center; gap: .3rem; }
.ph-facts .ph-icon { color: var(--brand); }
.ph-card--list .ph-card__top { width: 100%; }

/* ---------- agent / project / blog cards ---------- */
.ph-agent, .ph-agency { display: flex; gap: .9rem; padding: 1rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); height: 100%; transition: box-shadow .18s; }
.ph-agent:hover, .ph-agency:hover { box-shadow: var(--shadow); }
.ph-avatar { flex: 0 0 auto; width: 72px; height: 72px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: linear-gradient(135deg, var(--brand), #14907c); color: #fff; font-weight: 800; font-size: 1.35rem; text-decoration: none; }
.ph-avatar img { width: 100%; height: 100%; object-fit: cover; }
.ph-avatar--sm { width: 48px; height: 48px; font-size: 1rem; }
.ph-avatar--lg { width: 112px; height: 112px; font-size: 2rem; }
.ph-avatar--sq { border-radius: 16px; background: linear-gradient(135deg, var(--accent), #f3c27a); color: #2b1d00; }
.ph-agent__body { min-width: 0; }
.ph-agent__name { font-size: 1.02rem; font-weight: 700; margin: 0; display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; }
.ph-agent__name a { color: var(--ink); text-decoration: none; }
.ph-agent__name a:hover { color: var(--brand); text-decoration: underline; }
.ph-agent__role { margin: .1rem 0 .3rem; color: var(--brand-dark); font-weight: 600; font-size: .9rem; }
.ph-agent__meta { margin: 0 0 .3rem; color: var(--muted); font-size: .85rem; display: flex; flex-wrap: wrap; gap: .1rem .75rem; }
.ph-agent__stats { margin: 0; display: flex; flex-wrap: wrap; gap: .15rem .9rem; font-size: .85rem; color: var(--ink-soft); }
.ph-rating { display: inline-flex; align-items: center; gap: .2rem; font-weight: 700; }
.ph-rating .ph-icon { color: var(--accent); fill: var(--accent); }
.ph-rating small { color: var(--muted); font-weight: 400; }
.ph-verified { display: inline-flex; color: var(--brand); }
.ph-verified--lg .ph-icon { width: 1.4rem; height: 1.4rem; margin-left: .4rem; }
.ph-project, .ph-post { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; height: 100%; transition: box-shadow .18s, transform .18s; }
.ph-project:hover, .ph-post:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.ph-project__media, .ph-post__media { position: relative; display: block; aspect-ratio: 16 / 10; background: var(--sand); overflow: hidden; }
.ph-project__media img, .ph-post__media img { width: 100%; height: 100%; object-fit: cover; }
.ph-project__body, .ph-post__body { padding: .9rem 1rem 1rem; display: flex; flex-direction: column; gap: .3rem; }
.ph-project__name, .ph-post__title { font-size: 1.05rem; font-weight: 700; margin: 0; }
.ph-project__name a, .ph-post__title a { color: var(--ink); text-decoration: none; }
.ph-project__name a:hover, .ph-post__title a:hover { color: var(--brand); text-decoration: underline; }
.ph-project__dev { margin: 0; font-size: .88rem; color: var(--muted); }
.ph-project__price { margin: 0; color: var(--brand-dark); }
.ph-post__cat { margin: 0; font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.ph-post__cat a { text-decoration: none; color: var(--accent-dark); }
.ph-post__excerpt { margin: 0; color: var(--ink-soft); font-size: .93rem; }

/* ---------- page head, breadcrumb ---------- */
.ph-pagehead { background: var(--sand); border-bottom: 1px solid var(--line); padding: 1.4rem 0 1.5rem; }
.ph-pagehead--slim { padding: .7rem 0; }
.ph-pagehead__title { font-family: var(--font-display); font-size: clamp(1.6rem, 5vw, 2.4rem); margin: .25rem 0 0; letter-spacing: -.01em; }
.ph-pagehead__sub { margin: .3rem 0 0; color: var(--ink-soft); }
.ph-crumbs { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; font-size: .85rem; color: var(--muted); }
.ph-crumbs a { color: var(--muted); text-decoration: none; }
.ph-crumbs a:hover { color: var(--brand); text-decoration: underline; }
.ph-pagebody { padding-top: 1.5rem; padding-bottom: 3rem; }

/* ---------- search page ---------- */
.ph-search { padding-top: 1rem; padding-bottom: 3rem; }
.ph-search__bar { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-bottom: .75rem; flex-wrap: wrap; }
.ph-search__tools { display: flex; align-items: center; gap: .6rem; margin-left: auto; }
.ph-sort { min-width: 10.5rem; border-radius: 999px; min-height: 40px; }
.ph-viewtoggle { display: inline-flex; border: 1px solid #cfc9ba; border-radius: 999px; overflow: hidden; }
.ph-viewtoggle a { display: grid; place-items: center; width: 42px; height: 38px; color: var(--ink-soft); text-decoration: none; }
.ph-viewtoggle a.is-on { background: var(--brand); color: #fff; }
.ph-chips { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; padding: 0; margin: 0 0 1rem; }
.ph-chip { display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .4rem .3rem .8rem; background: var(--brand-tint); color: var(--brand-dark); border-radius: 999px; text-decoration: none; font-size: .85rem; font-weight: 600; min-height: 32px; }
.ph-chip .ph-icon { width: .95rem; height: .95rem; }
.ph-chip:hover { background: #cfe6e1; color: var(--brand-dark); }
.ph-chip--clear { background: transparent; color: var(--muted); text-decoration: underline; padding: .3rem .6rem; }
.ph-search__layout { display: block; }
.ph-filters.offcanvas-lg { --bs-offcanvas-width: min(92vw, 380px); }
.ph-filterform { padding-bottom: 5rem; }
.ph-fgroup { margin-bottom: 1.05rem; border: 0; padding: 0; min-width: 0; }
.ph-checkgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .35rem .75rem; }
.ph-checkgrid--scroll { max-height: 15rem; overflow: auto; padding: .25rem; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.ph-range { display: grid; grid-template-columns: 1fr auto 1fr; gap: .5rem; align-items: center; }
.ph-range span { color: var(--muted); font-size: .85rem; }
.ph-triple { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.ph-details > summary { cursor: pointer; margin-bottom: .5rem; list-style-position: outside; }
.ph-filterform__actions { position: sticky; bottom: 0; display: grid; gap: .5rem; background: #fff; padding: .75rem 0; border-top: 1px solid var(--line); margin-top: 1rem; }
.ph-results { min-width: 0; }
.ph-list { display: grid; gap: 1rem; }
.ph-showing { text-align: center; margin: 1.25rem 0 .5rem; }

/* ---------- pager ---------- */
.ph-pager { display: flex; justify-content: center; align-items: center; gap: .4rem; margin: 1.75rem 0 0; flex-wrap: wrap; }
.ph-pager ul { list-style: none; display: flex; gap: .3rem; padding: 0; margin: 0; flex-wrap: wrap; justify-content: center; }
.ph-pager a { display: inline-flex; align-items: center; justify-content: center; min-width: 42px; height: 42px; padding: 0 .6rem; border-radius: 10px; border: 1px solid var(--line); text-decoration: none; color: var(--ink); font-weight: 700; background: #fff; gap: .25rem; }
.ph-pager a:hover { border-color: var(--brand); color: var(--brand); }
.ph-pager a.is-current { background: var(--brand); border-color: var(--brand); color: #fff; }
.ph-pager__gap { align-self: center; color: var(--muted); padding: 0 .2rem; }

/* ---------- detail page ---------- */
.ph-detail { padding-top: 1rem; padding-bottom: 3rem; display: block; }
.ph-detail__main { min-width: 0; }
.ph-gallery { position: relative; margin-bottom: 1.25rem; border-radius: var(--radius); overflow: hidden; background: #0e1820; }
.ph-gallery .carousel-item { background: #0e1820; }
.ph-gallery__img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; display: block; max-height: 540px; }
.form-control::placeholder { color: #6f7b86; opacity: 1; }
.ph-gallery__cap { position: absolute; left: 0; right: 0; bottom: 0; padding: .5rem 1rem; color: #fff; background: linear-gradient(transparent, rgba(0, 0, 0, .65)); font-size: .85rem; }
.ph-gallery__arrow { width: 44px; height: 44px; border-radius: 50%; background: rgba(255, 255, 255, .95); color: var(--ink); display: grid; place-items: center; box-shadow: 0 2px 8px rgba(0, 0, 0, .3); }
.ph-gallery .carousel-control-prev, .ph-gallery .carousel-control-next { width: 14%; opacity: 1; }
.ph-gallery__thumbs { display: flex; gap: .4rem; padding: .5rem; overflow-x: auto; background: #fff; }
.ph-gallery__thumbs button { flex: 0 0 auto; border: 2px solid transparent; padding: 0; border-radius: 8px; overflow: hidden; background: none; opacity: .7; }
.ph-gallery__thumbs button.active { border-color: var(--brand); opacity: 1; }
.ph-gallery__thumbs img { width: 84px; height: 56px; object-fit: cover; display: block; }
.ph-gallery__none { display: flex; align-items: center; justify-content: center; gap: .6rem; aspect-ratio: 3 / 2; color: #b9b19c; background: var(--sand); }
.ph-gallery__badges { position: absolute; top: .75rem; left: .75rem; display: flex; gap: .4rem; z-index: 2; }
.ph-detail__head { display: grid; gap: .75rem; margin-bottom: 1.5rem; }
.ph-detail__price { font-size: clamp(1.6rem, 5vw, 2.2rem); font-weight: 800; color: var(--brand-dark); margin: 0; letter-spacing: -.01em; }
.ph-detail__price small { font-size: 1rem; color: var(--muted); font-weight: 600; }
.ph-detail__title { font-family: var(--font-display); font-size: clamp(1.4rem, 4.5vw, 2rem); margin: .2rem 0 .4rem; }
.ph-detail__actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.ph-fav-btn[aria-pressed="true"] { background: #fdecec; border-color: #c62828; color: #c62828; }
.ph-fav-btn[aria-pressed="true"] .ph-icon { fill: #c62828; }
.ph-block { margin-bottom: 2rem; }
.ph-block__title { font-family: var(--font-display); font-size: 1.35rem; margin-bottom: .9rem; }
.ph-factgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; margin: 0; }
.ph-factgrid > div { background: var(--sand); border-radius: var(--radius-sm); padding: .65rem .85rem; }
.ph-factgrid dt { font-size: .78rem; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; display: flex; gap: .35rem; align-items: center; }
.ph-factgrid dd { margin: .15rem 0 0; font-weight: 700; }
.ph-prose { max-width: 70ch; font-size: 1.04rem; line-height: 1.7; }
.ph-prose h2 { font-family: var(--font-display); font-size: 1.45rem; margin: 1.8rem 0 .6rem; }
.ph-prose p { margin: 0 0 1rem; }
.ph-amenities { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem .75rem; }
.ph-amenities li { display: flex; gap: .45rem; align-items: flex-start; }
.ph-amenities .ph-icon { color: var(--brand); margin-top: .2rem; }
.ph-videos { display: grid; gap: 1rem; }
.ph-videos iframe { border: 0; border-radius: var(--radius); }
.ph-detail__side { margin-top: 1rem; }
.ph-contact { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem; box-shadow: var(--shadow); }
.ph-contact__who { display: flex; gap: .75rem; align-items: center; margin-bottom: 1rem; }
.ph-contact__name { font-weight: 700; margin: 0; display: flex; align-items: center; gap: .3rem; }
.ph-contact__buttons { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.ph-contact__buttons .btn:only-child { grid-column: 1 / -1; }
.ph-contact__phone { text-align: center; color: var(--muted); font-size: .9rem; margin: .5rem 0 0; }
.ph-contact__h { font-size: 1.1rem; font-weight: 700; margin-bottom: .75rem; }
.ph-safety { font-size: .85rem; color: var(--muted); margin: .9rem .25rem 0; display: flex; gap: .45rem; }
.ph-stickycta { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1020; display: flex; gap: .5rem; padding: .6rem .75rem calc(.6rem + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -4px 16px rgba(0, 0, 0, .08); }
.ph-stickycta .btn { flex: 1 1 0; min-width: 0; padding: .55rem .4rem; font-size: .92rem; white-space: nowrap; }
body:has(.ph-stickycta) .ph-footer { padding-bottom: 5.5rem; }
@media (max-width: 380px) { .ph-stickycta .btn .ph-icon { display: none; } }
.ph-profile { display: flex; gap: 1.1rem; align-items: center; margin-bottom: 1.5rem; flex-wrap: wrap; }

/* ---------- directories, filter bars ---------- */
.ph-filterbar { display: grid; gap: .75rem; grid-template-columns: 1fr; margin-bottom: 1.25rem; align-items: end; background: var(--sand); padding: .9rem; border-radius: var(--radius); }
.ph-filterbar--inline { background: transparent; padding: 0; grid-template-columns: 1fr auto; }
.ph-field--check { padding-bottom: .55rem; }
.ph-citytabs { display: flex; gap: .4rem; flex-wrap: nowrap; overflow-x: auto; padding-bottom: .5rem; margin-bottom: 1rem; -webkit-overflow-scrolling: touch; }
.ph-citytabs a { flex: 0 0 auto; padding: .45rem 1rem; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--ink-soft); font-weight: 600; background: #fff; }
.ph-citytabs a small { color: var(--muted); }
.ph-citytabs a:hover { border-color: var(--brand); }
.ph-citytabs a.is-on { background: var(--brand); border-color: var(--brand); color: #fff; }
.ph-citytabs a.is-on small { color: #cfe6e1; }

/* ---------- blog and forum ---------- */
.ph-article { max-width: 780px; padding-top: 1.5rem; padding-bottom: 3rem; }
.ph-article__title { font-family: var(--font-display); font-size: clamp(1.8rem, 6vw, 2.8rem); letter-spacing: -.02em; margin: .3rem 0 .6rem; }
.ph-article__img { width: 100%; height: auto; border-radius: var(--radius); margin: 1rem 0 1.5rem; aspect-ratio: 1200 / 630; object-fit: cover; }
.ph-article__cta { background: var(--sand); border-radius: var(--radius); padding: 1.5rem; margin-top: 2rem; text-align: center; }
.ph-article__cta h2 { font-family: var(--font-display); font-size: 1.3rem; }
.ph-forumbar { display: flex; flex-direction: column; gap: .75rem; margin-bottom: 1rem; }
.ph-topics { list-style: none; padding: 0; margin: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.ph-topic { display: flex; gap: 1rem; justify-content: space-between; padding: 1rem; background: #fff; }
.ph-topic + .ph-topic { border-top: 1px solid var(--line); }
.ph-topic__main { min-width: 0; }
.ph-topic__title { font-size: 1.05rem; font-weight: 700; margin: 0 0 .25rem; }
.ph-topic__title a { color: var(--ink); text-decoration: none; }
.ph-topic__title a:hover { color: var(--brand); text-decoration: underline; }
.ph-topic p { margin: 0 0 .15rem; }
.ph-topic__stats { display: flex; gap: .9rem; margin: 0; text-align: center; flex: 0 0 auto; }
.ph-topic__stats dd { margin: 0; font-weight: 800; font-size: 1.15rem; line-height: 1.1; }
.ph-topic__stats span { font-size: .72rem; color: var(--muted); }
.ph-tag { display: inline-block; margin-left: .5rem; padding: .1rem .5rem; border-radius: 6px; background: #fdf1d9; color: var(--accent-dark); font-size: .7rem; font-weight: 800; text-transform: uppercase; vertical-align: middle; }
.ph-tag--muted { background: #eceff2; color: var(--muted); }
.ph-thread { max-width: 820px; padding-top: 1.25rem; padding-bottom: 3rem; }
.ph-post-op { padding-bottom: 1.5rem; border-bottom: 1px solid var(--line); margin-bottom: 1.5rem; }
.ph-replies { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: .9rem; }
.ph-reply { display: flex; gap: .75rem; background: var(--sand); padding: .9rem 1rem; border-radius: var(--radius); }
.ph-reply__meta { margin: 0 0 .25rem; font-size: .9rem; }

/* ---------- forms and auth ---------- */
.ph-formpage { max-width: 760px; padding-top: 1.5rem; padding-bottom: 3rem; }
.ph-formcard { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow); }
.ph-two { display: grid; gap: 0 1rem; grid-template-columns: 1fr; }
.ph-contactpage { display: grid; gap: 1.5rem; }
.ph-contactinfo { background: var(--sand); border-radius: var(--radius); padding: 1.25rem; align-self: start; }
.ph-contactinfo h2 { font-size: 1.1rem; font-family: var(--font-display); }
.ph-authpage { display: flex; justify-content: center; padding-top: 2rem; padding-bottom: 3.5rem; }
.ph-authcard { width: 100%; max-width: 440px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); }
.ph-authcard--wide { max-width: 620px; }
.ph-authcard h1 { font-family: var(--font-display); font-size: 1.7rem; }
.ph-authcard__alt { text-align: center; margin: 1.1rem 0 0; color: var(--ink-soft); }
.invalid-feedback { font-size: .84rem; }
.is-invalid ~ .invalid-feedback, .is-invalid + .invalid-feedback { display: block; }

/* ---------- tools ---------- */
.ph-toolgrid { display: grid; gap: 1.1rem; grid-template-columns: 1fr; }
.ph-toolcard { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow); }
.ph-toolcard h2 { font-family: var(--font-display); font-size: 1.3rem; display: flex; align-items: center; gap: .5rem; margin-bottom: 1rem; }
.ph-toolcard h2 .ph-icon { color: var(--brand); }
.ph-toolform--row { display: grid; grid-template-columns: repeat(auto-fit, minmax(7rem, 1fr)); gap: .75rem; }
.ph-result { background: var(--brand-tint); border-radius: var(--radius-sm); padding: 1rem; margin-top: .5rem; }
.ph-result__big { font-size: 1.6rem; font-weight: 800; color: var(--brand-dark); margin: 0 0 .5rem; line-height: 1.15; }
.ph-result__big small { font-size: .85rem; font-weight: 600; color: var(--ink-soft); }
.ph-result__list { margin: 0; display: grid; gap: .35rem; }
.ph-result__list > div { display: flex; justify-content: space-between; gap: 1rem; border-top: 1px solid rgba(15, 107, 92, .2); padding-top: .35rem; }
.ph-result__list dt { font-weight: 600; color: var(--ink-soft); }
.ph-result__list dd { margin: 0; font-weight: 800; text-align: right; }

/* ---------- error ---------- */
.ph-errorpage { text-align: center; padding: 4rem 1rem 5rem; max-width: 640px; }
.ph-errorpage__code { font-family: var(--font-display); font-size: clamp(4rem, 18vw, 7rem); color: var(--brand); margin: 0; line-height: 1; letter-spacing: -.04em; }

/* ---------- footer ---------- */
.ph-footer { background: #0d1a22; color: #b9c6cf; padding: 2.75rem 0 1.5rem; margin-top: 2rem; }
.ph-footer a { color: #dfe8ed; text-decoration: none; }
.ph-footer a:hover { color: #fff; text-decoration: underline; }
.ph-footer__grid { display: grid; gap: 1.75rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ph-footer__about { grid-column: 1 / -1; }
.ph-footer__about p { max-width: 42ch; margin-top: .75rem; }
.ph-footer nav, .ph-footer__grid > div:last-child { display: flex; flex-direction: column; gap: .5rem; }
.ph-footer__h { font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; color: #fff; margin: 0 0 .4rem; font-family: var(--font-body); font-weight: 800; }
.ph-footer__contact { display: flex; gap: .5rem; align-items: center; margin: 0; word-break: break-word; }
.ph-footer__legal { display: flex; flex-direction: column; gap: .3rem; margin-top: 2rem; padding-top: 1.1rem; border-top: 1px solid rgba(255, 255, 255, .12); font-size: .82rem; color: #8ea0ac; }

/* =====================================================  >= 576px  */
@media (min-width: 576px) {
  .ph-searchgrid { grid-template-columns: repeat(2, 1fr); }
  .ph-searchgrid .ph-field--wide { grid-column: 1 / -1; }
  .ph-cats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ph-loc-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ph-grid, .ph-grid--results, .ph-grid--2, .ph-grid--3, .ph-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ph-tools { grid-template-columns: repeat(2, 1fr); }
  .ph-footer__legal { flex-direction: row; justify-content: space-between; }
  .ph-two { grid-template-columns: 1fr 1fr; }
  .ph-filterbar { grid-template-columns: 1fr 1fr; }
  .ph-filterbar .ph-field--wide { grid-column: 1 / -1; }
  .ph-amenities { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ph-factgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ph-forumbar { flex-direction: row; align-items: end; justify-content: space-between; }
  .ph-forumbar form { flex: 1; max-width: 520px; }
}

/* =====================================================  >= 768px  */
@media (min-width: 768px) {
  .ph-hero { padding: 3.5rem 0 5rem; }
  .ph-searchbox { padding: 1rem 1.25rem 1.25rem; }
  .ph-searchgrid { grid-template-columns: 2fr 1fr 1fr 1fr 1fr; align-items: end; }
  .ph-searchgrid .ph-field--wide { grid-column: 1 / -1; }
  .ph-searchgrid__go { grid-column: 1 / -1; }
  .ph-section { padding: 3.5rem 0; }
  .ph-cats { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .ph-loc-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .ph-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ph-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ph-tools { grid-template-columns: repeat(4, 1fr); }
  .ph-footer__grid { grid-template-columns: 2fr 1fr 1fr 1fr 1.4fr; }
  .ph-footer__about { grid-column: auto; }
  .ph-toolgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ph-filterbar { grid-template-columns: 2fr 1fr 1fr auto; }
  .ph-filterbar .ph-field--wide { grid-column: auto; }
  .ph-contactpage { grid-template-columns: 1.6fr 1fr; }
  .ph-card--list { flex-direction: row; }
  .ph-card--list .ph-card__top { width: 300px; flex: 0 0 300px; }
  .ph-card--list .ph-card__media { height: 100%; aspect-ratio: auto; min-height: 210px; }
}

/* =====================================================  >= 992px  */
@media (min-width: 992px) {
  .ph-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ph-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ph-searchgrid { grid-template-columns: 2.2fr 1.1fr 1.1fr 1fr 1fr auto; }
  .ph-searchgrid .ph-field--wide { grid-column: auto; }
  .ph-searchgrid__go { grid-column: auto; }
  .ph-search__layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 1.75rem; align-items: start; }
  .ph-filters { position: sticky; top: calc(var(--header-h) + 12px); max-height: calc(100vh - var(--header-h) - 24px); overflow: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
  .ph-filters .offcanvas-body { padding: 1rem; }
  .ph-filterform { padding-bottom: 0; }
  .ph-grid--results { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ph-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ph-grid--4 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ph-detail { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 2rem; align-items: start; }
  .ph-detail__side { position: sticky; top: calc(var(--header-h) + 14px); margin-top: 0; }
  .ph-detail__head { grid-template-columns: 1fr auto; align-items: start; }
  .ph-stickycta { display: none !important; }
}

/* =====================================================  >= 1200px  */
@media (min-width: 1200px) {
  .ph-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .ph-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ph-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ph-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .ph-grid--results { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ph-brand__name { font-size: 1.5rem; }
  .ph-nav a { padding: .45rem .85rem; }
}

/* very small phones (320px) */
@media (max-width: 380px) {
  .ph-brand__name { font-size: 1.15rem; }
  .ph-brand__mark { height: 34px; }
  .ph-actions { gap: .1rem; }
  .ph-cats, .ph-loc-grid { grid-template-columns: 1fr; }
  .ph-checkgrid { grid-template-columns: 1fr; }
  .ph-triple { grid-template-columns: 1fr 1fr; }
  .ph-card__price { font-size: 1.15rem; }
  .ph-topic { flex-direction: column; }
  .ph-sort { min-width: 0; width: 100%; }
  .ph-search__tools { width: 100%; margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
@media print {
  .ph-header, .ph-footer, .ph-stickycta, .ph-filters, .ph-detail__actions, .ph-fav { display: none !important; }
}

.ph-resend { display: flex; gap: .5rem; }
.ph-resend .form-control { min-width: 0; }

/* ==========================================================================
   Phase 8 - dashboards (mobile first; classes only, no inline styles)
   ========================================================================== */
.ph-flash--error { background: #fdf0ee; color: #7a1812; border-color: #f0c3be; }
.ph-info { display: flow-root; background: var(--brand-tint); border: 1px solid #b8dcd4; color: var(--ink-soft); border-radius: var(--radius-sm); padding: .75rem 1rem; margin-bottom: 1.1rem; font-size: .9rem; }
.ph-info .ph-icon { float: left; margin: .2rem .6rem 0 0; color: var(--brand-dark); }
.ph-h3 { font-size: 1.15rem; font-family: var(--font-display); margin: 1.5rem 0 .75rem; }
.ph-danger { color: var(--danger) !important; }
.ph-req { color: var(--danger); }
.ph-narrow { max-width: 34rem; }
.ph-narrow--wide { max-width: 46rem; }
.ph-ellipsis-block { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* shell */
.ph-dash { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; max-width: 1280px; margin: 0 auto; padding: 1rem .9rem 3rem; }
.ph-dash__side { background: var(--sand); border-radius: var(--radius); padding: .9rem; align-self: start; }
.ph-dash__who { display: flex; gap: .7rem; align-items: center; margin-bottom: .75rem; }
.ph-dash__name { font-weight: 800; margin: 0; line-height: 1.2; overflow-wrap: anywhere; }
.ph-dash__toggle { width: 100%; justify-content: space-between; display: flex; align-items: center; gap: .5rem; min-height: 44px; }
.ph-dash__nav { margin-top: .6rem; }
.ph-dash__nav hr { margin: .6rem 0; border-color: var(--line); opacity: 1; }
.ph-dash__link { display: flex; align-items: center; gap: .65rem; min-height: 44px; padding: .45rem .7rem; border-radius: var(--radius-sm); color: var(--ink-soft); text-decoration: none; font-weight: 600; width: 100%; }
.ph-dash__link .ph-icon { width: 1.2rem; height: 1.2rem; flex: 0 0 auto; }
.ph-dash__link:hover { background: #ece7da; color: var(--ink); }
.ph-dash__link.is-active { background: var(--brand); color: #fff; }
.ph-dash__link--btn { background: transparent; border: 0; text-align: left; font: inherit; font-weight: 600; cursor: pointer; }
.ph-dash__badge { margin-left: auto; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--accent); color: var(--ink); font-size: .75rem; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.ph-dash__main { min-width: 0; }
.ph-dash__top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.ph-dash__title { font-family: var(--font-display); font-size: 1.6rem; margin: 0; }
.ph-dash__bell { flex: 0 0 auto; background: var(--sand); }

/* cards and panels */
.ph-statgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; margin-bottom: 1.1rem; }
.ph-stat { position: relative; display: flex; gap: .7rem; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem; box-shadow: var(--shadow); min-width: 0; }
.ph-stat__icon { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-tint); color: var(--brand-dark); }
.ph-stat__body { min-width: 0; }
.ph-stat__label { margin: 0; font-size: .8rem; font-weight: 700; color: var(--muted); }
.ph-stat__value { margin: 0; font-size: 1.6rem; font-weight: 800; line-height: 1.15; font-family: var(--font-display); }
.ph-stat__hint { margin: .1rem 0 0; font-size: .78rem; color: var(--muted); }
.ph-stat__link { position: absolute; inset: 0; border-radius: var(--radius); color: transparent; display: flex; align-items: flex-start; justify-content: flex-end; padding: .5rem; }
.ph-stat__link:focus-visible { outline: 3px solid var(--accent-dark); outline-offset: 2px; }
.ph-stat__link .ph-icon { display: none; }
.ph-dashgrid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; margin-bottom: 1rem; align-items: start; }
.ph-panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; margin-bottom: 1rem; box-shadow: var(--shadow); min-width: 0; }
.ph-dashgrid > .ph-panel, .ph-dashgrid > div > .ph-panel:last-child { margin-bottom: 0; }
.ph-panel__head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; margin-bottom: .75rem; }
.ph-panel__head h2 { font-size: 1.1rem; font-family: var(--font-display); margin: 0; }
.ph-panel--danger { border-color: #f0c3be; }
.ph-callout { display: flex; gap: 1rem; align-items: center; justify-content: space-between; flex-wrap: wrap; background: #fff8e8; border: 1px solid #f0d9a4; border-radius: var(--radius); padding: .9rem 1rem; margin-bottom: 1rem; }
.ph-callout--soft { background: var(--brand-tint); border-color: #b8dcd4; }
.ph-actions-row { display: flex; gap: .6rem; flex-wrap: wrap; margin-bottom: 1.1rem; }
.ph-checklist { list-style: none; padding: 0; margin: 0 0 .75rem; display: grid; gap: .55rem; }
.ph-checklist li { display: flex; gap: .6rem; align-items: flex-start; }
.ph-checklist .ph-icon { flex: 0 0 auto; margin-top: .2rem; color: var(--brand); }
.ph-cards1 { display: grid; gap: 1rem; grid-template-columns: minmax(0, 1fr); }

/* tables */
.ph-tablewrap { position: relative; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; margin-bottom: 1rem; -webkit-overflow-scrolling: touch; }
.ph-table { margin: 0; min-width: 560px; --bs-table-bg: transparent; }
.ph-table th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: var(--sand); white-space: nowrap; }
.ph-table td, .ph-table th { padding: .7rem .8rem; vertical-align: middle; }
.ph-table--listings { min-width: 680px; }
.ph-rowactions { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; }
.ph-table td.ph-rowactions { white-space: nowrap; }
.ph-listcell { display: flex; gap: .7rem; align-items: center; min-width: 14rem; }
.ph-listcell img, .ph-listcell__none { width: 64px; height: 48px; flex: 0 0 auto; border-radius: 8px; object-fit: cover; background: var(--sand); }
.ph-listcell__none { display: grid; place-items: center; color: var(--muted); }
.ph-listcell__title { font-weight: 700; text-decoration: none; color: var(--ink); }
.ph-listcell__title:hover { color: var(--brand); text-decoration: underline; }

/* status pills */
.ph-status { display: inline-block; padding: .15rem .6rem; border-radius: 999px; font-size: .75rem; font-weight: 800; background: #ece9e0; color: var(--ink-soft); white-space: nowrap; }
.ph-status--ok { background: #dff2e5; color: #14632f; }
.ph-status--new { background: #e3ecfb; color: #1b3f8f; }
.ph-status--info { background: #e0f1f5; color: #0d5463; }
.ph-status--warn { background: #fff0cf; color: #7a4d00; }
.ph-status--bad { background: #fbe1de; color: #8a1a12; }
.ph-status--muted { background: #ece9e0; color: #4b5560; }

/* charts */
.ph-chart { display: block; width: 100%; height: auto; }
.ph-chart__grid { stroke: var(--line); stroke-width: 1; }
.ph-chart__axis { font-size: 13px; fill: var(--muted); }
.ph-chart__label { font-size: 14px; fill: var(--ink-soft); }
.ph-chart__value { font-size: 14px; font-weight: 700; fill: var(--ink); }
.ph-chart__area { fill: rgba(15, 107, 92, .14); stroke: none; }
.ph-chart__line { fill: none; stroke: var(--brand); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.ph-chart__dot { fill: #fff; stroke: var(--brand); stroke-width: 2; }
.ph-chart__bar { fill: var(--accent-dark); }
.ph-chart--bars .ph-chart__bar { fill: var(--brand); }
.ph-chart__track { fill: #f0ece1; }
.ph-datatable { margin-top: .5rem; font-size: .875rem; }
.ph-datatable summary { cursor: pointer; color: var(--brand); font-weight: 600; min-height: 32px; }
.ph-datatable table { max-width: 28rem; }
.ph-meter { display: block; width: 100%; height: 12px; border-radius: 6px; accent-color: var(--brand); }
.ph-usage { display: grid; gap: .9rem; margin-bottom: .75rem; }

/* filters, tabs */
.ph-segment { display: inline-flex; background: var(--sand); border-radius: 999px; padding: 3px; margin-bottom: 1rem; flex-wrap: wrap; }
.ph-segment a { padding: .4rem .9rem; border-radius: 999px; text-decoration: none; color: var(--ink-soft); font-weight: 700; font-size: .9rem; min-height: 36px; display: inline-flex; align-items: center; }
.ph-segment a.is-on { background: var(--brand); color: #fff; }
.ph-toolbar { display: flex; justify-content: space-between; align-items: center; gap: .75rem; flex-wrap: wrap; margin-bottom: .5rem; }
.ph-toolbar .ph-segment { margin-bottom: 0; }

/* notifications, threads, chat */
.ph-notes { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: .6rem; }
.ph-note { display: flex; gap: .8rem; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: .85rem; }
.ph-note.is-unread { border-color: #b8dcd4; background: #f4faf8; border-left: 4px solid var(--brand); }
.ph-note__icon { flex: 0 0 auto; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-tint); color: var(--brand-dark); }
.ph-note__body { flex: 1 1 auto; min-width: 0; }
.ph-note__title { margin: 0; font-weight: 800; }
.ph-note__text { margin: .1rem 0; color: var(--ink-soft); }
.ph-note__actions { display: flex; gap: .3rem; align-items: center; flex: 0 0 auto; flex-wrap: wrap; justify-content: flex-end; }
.ph-threads { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: .5rem; }
.ph-thread { display: flex; gap: .8rem; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem; text-decoration: none; color: var(--ink); }
.ph-thread:hover { border-color: var(--brand); }
.ph-thread.is-unread { background: #f4faf8; border-left: 4px solid var(--brand); }
.ph-thread__body { flex: 1 1 auto; min-width: 0; display: grid; }
.ph-thread__top { display: flex; justify-content: space-between; gap: .5rem; }
.ph-thread__subject { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ph-chat { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: .6rem; max-height: 60vh; overflow-y: auto; }
.ph-chat__msg { max-width: min(34rem, 90%); background: var(--sand); border-radius: 14px 14px 14px 4px; padding: .6rem .85rem; }
.ph-chat__msg.is-mine { margin-left: auto; background: var(--brand-tint); border-radius: 14px 14px 4px 14px; }
.ph-chat__meta { margin: 0; font-size: .78rem; color: var(--muted); }
.ph-chat__text { margin: .15rem 0 0; }
.ph-chat__form { border-top: 1px solid var(--line); padding-top: 1rem; }

/* saved searches */
.ph-saved__form { display: grid; gap: .6rem; margin-bottom: .6rem; }
.ph-savesearch { margin: 0 0 1rem; }
.ph-savesearch summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: .4rem; }
.ph-savesearch summary::-webkit-details-marker { display: none; }
.ph-savesearch__form { display: grid; gap: .5rem; margin-top: .6rem; max-width: 22rem; background: var(--sand); padding: .8rem; border-radius: var(--radius-sm); }
.ph-message h2 { font-size: 1.05rem; }

/* property form and media */
.ph-propform .ph-panel { margin-bottom: 1rem; }
.ph-four { display: grid; gap: 0 .9rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ph-range { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: .5rem; }
.ph-range > span { display: none; }
.ph-fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.ph-checkgrid--wide { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ph-formactions { display: flex; gap: .7rem; align-items: center; flex-wrap: wrap; margin: 1rem 0 2rem; position: sticky; bottom: 0; background: linear-gradient(to top, #fff 70%, rgba(255, 255, 255, 0)); padding: .8rem 0; z-index: 5; }
.ph-statusbar { display: flex; gap: 1rem; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.ph-reason { background: #fdf0ee; border-radius: var(--radius-sm); padding: .5rem .7rem; margin: .5rem 0 0; font-size: .9rem; }
.ph-photos { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: .75rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ph-photo { position: relative; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; background: #fff; }
.ph-photo img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.ph-photo__cover { position: absolute; top: .4rem; left: .4rem; }
.ph-photo__actions { display: flex; flex-wrap: wrap; gap: .3rem; padding: .4rem; justify-content: space-between; }
.ph-upload { border-top: 1px solid var(--line); padding-top: 1rem; }
.ph-videolist { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: .4rem; }
.ph-videolist li { display: flex; justify-content: space-between; gap: .5rem; align-items: center; flex-wrap: wrap; }

/* leads */
.ph-leads { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: .9rem; }
.ph-lead { margin: 0; }
.ph-lead__head { display: flex; justify-content: space-between; gap: .75rem; align-items: flex-start; }
.ph-lead__name { font-size: 1.1rem; margin: 0; }
.ph-lead__prop { margin: .6rem 0 .4rem; }
.ph-lead__msg { margin: .4rem 0; padding: .5rem .8rem; border-left: 3px solid var(--line); color: var(--ink-soft); background: var(--sand); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.ph-lead__contact { display: flex; gap: .4rem; flex-wrap: wrap; margin: .6rem 0; }
.ph-lead__form { display: grid; gap: .6rem; border-top: 1px solid var(--line); padding-top: .75rem; align-items: end; }

/* reviews, plans, misc */
.ph-reviews { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: .75rem; }
.ph-reviews .ph-panel { margin: 0; }
.ph-reviews__stars { margin: 0 0 .3rem; display: flex; gap: 2px; color: #c9c2ae; }
.ph-reviews__stars .is-on { color: var(--accent-dark); }
.ph-reviews__stars .ph-icon { fill: currentColor; }
.ph-reviews__title { font-size: 1rem; margin: 0 0 .25rem; }
.ph-plans { display: grid; gap: 1rem; grid-template-columns: minmax(0, 1fr); }
.ph-plan.is-current { border: 2px solid var(--brand); }
.ph-plan__name { font-size: 1.1rem; font-family: var(--font-display); margin: 0; }
.ph-plan__price { font-size: 1.5rem; font-weight: 800; margin: .2rem 0 .5rem; }
.ph-planname { font-size: 1.3rem; font-weight: 800; margin: 0 0 .2rem; font-family: var(--font-display); }
.ph-inline { display: flex; gap: .6rem; flex-wrap: wrap; }
.ph-inline .form-control { flex: 1 1 14rem; min-height: 44px; }
.ph-confirm { position: relative; }
.ph-confirm summary { list-style: none; cursor: pointer; }
.ph-confirm summary::-webkit-details-marker { display: none; }
.ph-confirm__box { position: absolute; right: 0; z-index: 10; width: min(18rem, 80vw); background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .75rem; box-shadow: var(--shadow-lg); white-space: normal; }
.ph-verified { display: inline-flex; margin-left: .3rem; color: var(--brand); vertical-align: middle; }

@media (min-width: 576px) {
  .ph-statgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ph-photos { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ph-lead__form { grid-template-columns: 11rem 1fr auto; }
  .ph-plans { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 768px) {
  .ph-four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .ph-checkgrid--wide { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ph-saved__form { display: flex; flex-wrap: wrap; gap: .6rem 1rem; align-items: center; }
  .ph-cards1 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 992px) {
  .ph-dash { grid-template-columns: 250px minmax(0, 1fr); gap: 1.5rem; padding: 1.5rem 1.25rem 4rem; }
  .ph-dash__side { position: sticky; top: calc(var(--header-h) + 12px); }
  .ph-statgrid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .ph-dashgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ph-photos { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .ph-plans { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ph-dash__title { font-size: 1.9rem; }
}
@media (max-width: 419.98px) { .ph-stat__icon { display: none; } .ph-stat { padding: .8rem; } .ph-stat__value { font-size: 1.45rem; } }
@media (max-width: 575.98px) {
  .ph-formactions { position: static; background: none; }
  .ph-note { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) { .ph-dash * { transition: none !important; } }

/* announcement banner (admin Settings) */
.ph-announce { background: var(--brand); color: #fff; text-align: center; padding: .55rem 0; font-weight: 600; font-size: .95rem; }
.ph-announce a, .ph-announce span { color: #fff; text-decoration: none; display: inline-flex; gap: .4rem; align-items: center; justify-content: center; }
.ph-announce a:hover { text-decoration: underline; }
.ph-footer__social { display: flex; gap: .9rem; flex-wrap: wrap; }

.ph-closed { display: flex; gap: .7rem; align-items: flex-start; background: #fff3d6; border: 1px solid #f0d9a4; border-radius: var(--radius); padding: .8rem 1rem; margin-bottom: 1rem; }
.ph-closed .ph-icon { flex: 0 0 auto; margin-top: .15rem; color: var(--accent-dark); }
.ph-contact--closed { padding: 1rem; }
td.ph-rowactions { display: table-cell; white-space: nowrap; }
td.ph-rowactions > * { margin-right: .35rem; vertical-align: middle; }

.ph-chips { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 .6rem; }
.ph-chip { display: inline-flex; gap: .4rem; align-items: center; padding: .35rem .8rem; border-radius: 999px; background: var(--sand); color: var(--ink-soft); text-decoration: none; font-weight: 600; font-size: .9rem; min-height: 36px; border: 1px solid transparent; }
.ph-chip strong { background: #fff; border-radius: 999px; padding: 0 .5rem; font-size: .8rem; }
.ph-chip:hover { border-color: var(--brand); }
.ph-chip.is-on { background: var(--brand); color: #fff; }
.ph-chip.is-on strong { color: var(--brand-dark); }
.ph-matchcount { margin: 0 0 .6rem; color: var(--brand-dark); }

/* ---- Phase 11: real-time ---- */
[data-rt-badge][hidden], [data-rt-unread][hidden], .ph-chat__seen[hidden], .ph-typing[hidden], .ph-livebanner[hidden], .ph-chat__status[hidden] { display: none !important; }
.ph-presence { display: inline-flex; align-items: center; gap: .3rem; font-size: .8rem; color: var(--muted); margin-left: .5rem; }
.ph-presence__dot { width: .55rem; height: .55rem; border-radius: 50%; background: #b8b3a6; display: inline-block; }
.ph-presence.is-online { color: var(--brand-dark); }
.ph-presence.is-online .ph-presence__dot { background: #1f9d55; box-shadow: 0 0 0 3px rgba(31, 157, 85, .2); }
.ph-chat__seen { color: var(--brand-dark); font-weight: 600; }
.ph-typing { margin: 0 0 .6rem; color: var(--muted); font-size: .85rem; font-style: italic; }
.ph-livebanner { display: flex; gap: .75rem; align-items: center; justify-content: space-between; background: var(--brand-tint); border: 1px solid var(--brand); border-radius: var(--radius); padding: .6rem .9rem; margin-bottom: .8rem; }
.ph-lead__chat { margin: .5rem 0; }
.ph-lead__chat summary { cursor: pointer; display: inline-flex; list-style: none; }
.ph-lead__chat summary::-webkit-details-marker { display: none; }
.ph-lead__chat form { margin-top: .6rem; }
.ph-toasts { position: fixed; right: 1rem; bottom: 1rem; z-index: 1080; display: grid; gap: .5rem; width: min(22rem, calc(100vw - 2rem)); }
.ph-toast { display: flex; align-items: flex-start; gap: .5rem; background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: var(--radius); box-shadow: 0 10px 30px rgba(0, 0, 0, .15); padding: .7rem .8rem; }
.ph-toast__link { flex: 1; color: var(--ink); text-decoration: none; display: grid; gap: .15rem; min-width: 0; overflow-wrap: anywhere; }
.ph-toast__link span { color: var(--muted); font-size: .88rem; }
.ph-toast__close { border: 0; background: transparent; font-size: 1.3rem; line-height: 1; padding: 0 .25rem; color: var(--muted); min-width: 32px; min-height: 32px; }

/* ---- Phase 12: forum likes, follows and reports ---- */
.ph-postactions { display: flex; flex-wrap: wrap; gap: .6rem; align-items: flex-start; margin-top: .5rem; }
.ph-inline { display: inline-flex; align-items: center; gap: .5rem; margin: 0; }
.ph-likebtn { display: inline-flex; align-items: center; gap: .35rem; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: .25rem .8rem; font-size: .85rem; font-weight: 600; min-height: 36px; color: var(--ink); }
.ph-likebtn .ph-icon { width: 1rem; height: 1rem; }
.ph-likebtn[aria-pressed="true"] { background: var(--brand-tint); border-color: var(--brand); color: var(--brand-dark); }
.ph-likebtn:disabled { opacity: .6; }
.ph-likecount { font-variant-numeric: tabular-nums; }
.ph-report { font-size: .85rem; }
.ph-report > summary { cursor: pointer; color: var(--muted); min-height: 36px; display: inline-flex; align-items: center; list-style: none; }
.ph-report > summary::-webkit-details-marker { display: none; }
.ph-report[open] { flex-basis: 100%; max-width: 26rem; border: 1px solid var(--line); border-radius: var(--radius); padding: .5rem .8rem; background: var(--sand); }
.ph-topicbar { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; margin: .5rem 0 1rem; }
.ph-reportlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.ph-quote { margin: .5rem 0; padding: .6rem .9rem; border-left: 4px solid var(--line); background: var(--sand); border-radius: 0 var(--radius) var(--radius) 0; }
.ph-h3x { font-size: 1.05rem; }

/* ---- Phase 12: blog CMS ---- */
.ph-blogimg { max-width: 100%; max-height: 14rem; border-radius: var(--radius); border: 1px solid var(--line); display: block; }
.ph-prefix { position: absolute; left: .7rem; color: var(--muted); font-size: .9rem; pointer-events: none; }
.ph-inputwrap .ph-prefix + .form-control { padding-left: 3.6rem; padding-right: .75rem; }
.ph-hint.is-good { color: #14633a; }
.ph-serp { border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem 1rem; margin: 0 0 1rem; background: #fff; }
.ph-serp__url { margin: 0; font-size: .8rem; color: #3c6b4f; overflow-wrap: anywhere; }
.ph-serp__title { margin: .1rem 0; font-size: 1.1rem; color: #1a0dab; }
.ph-serp__desc { margin: 0; font-size: .85rem; color: #4d5156; }
.ph-authorlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.ph-avatarimg { width: 3.2rem; height: 3.2rem; border-radius: 50%; object-fit: cover; }
.ph-authorbox { display: flex; gap: 1rem; align-items: flex-start; border: 1px solid var(--line); border-radius: var(--radius); background: var(--sand); padding: 1rem; margin: 2rem 0 1rem; }
.ph-authorhead { display: flex; gap: 1.2rem; align-items: center; margin-bottom: 1.5rem; }
.ph-authorhead__img { border-radius: 50%; object-fit: cover; flex: 0 0 auto; }
@media (max-width: 575.98px) { .ph-authorhead { flex-direction: column; align-items: flex-start; } }

/* ---- Phase 12b: projects ---- */
.ph-citytabs--sub { margin-top: -.4rem; font-size: .9rem; }
.ph-plan { border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem; background: var(--sand); margin-bottom: 1rem; }
.ph-plan__row { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fit, minmax(7.5rem, 1fr)); }
.ph-plan__total { margin: .4rem 0 0; font-weight: 700; }
.ph-plan__total.is-ok { color: #14633a; }
.ph-plan__total.is-bad { color: #b42318; }
.ph-checkgrid { display: grid; gap: .3rem .8rem; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); }
.ph-mediagrid { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); }
.ph-mediacard { border: 1px solid var(--line); border-radius: var(--radius); padding: .6rem; background: #fff; display: grid; gap: .4rem; align-content: start; }
.ph-mediacard img { width: 100%; height: 9rem; object-fit: cover; border-radius: 8px; background: var(--sand); }

/* ---- Phase 13: plans, checkout and invoices ---- */
.ph-checklist li.is-off { color: var(--muted, #6b7280); }
.ph-checklist li.is-off .ph-icon { color: currentColor; opacity: .6; }
.ph-checklist--inline { grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); margin-top: .75rem; }
.ph-plan { display: flex; flex-direction: column; gap: .35rem; }
.ph-plan > form, .ph-plan > .btn { margin-top: auto; }
.ph-table--summary th { font-weight: 500; }
.ph-total th, .ph-total td { border-top: 2px solid var(--line); font-size: 1.1rem; }
.ph-info--bad { border-color: #b42318; }
.ph-invoice { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 1.25rem; margin-bottom: 1rem; }
.ph-invoice__head { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; flex-wrap: wrap; }
.ph-invoice__head h2 { margin: 0; font-size: 1.4rem; }
.ph-invoice__parties { display: grid; gap: 1rem; margin: 1rem 0; }
@media (min-width: 576px) { .ph-invoice__parties { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1200px) { .ph-plans { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media print {
  header, footer, .ph-dash__side, .ph-noprint, .ph-skip, nav { display: none !important; }
  .ph-invoice { border: 0; padding: 0; }
  body { background: #fff; }
}

/* ---- Tools menu + Decoration & Contractors ---- */
.ph-nav__btn { border: 0; background: none; font: inherit; font-weight: 600; font-size: .95rem; color: var(--ink-soft); padding: .45rem .7rem; border-radius: 999px; display: inline-flex; align-items: center; gap: .25rem; }
.ph-nav__btn:hover, .ph-nav__btn[aria-expanded="true"] { background: var(--sand); color: var(--ink); }
.ph-nav__btn.is-active { color: var(--brand); background: var(--brand-tint); }
.ph-nav__btn .ph-icon { width: 14px; height: 14px; }
.ph-tools { position: static; }
.ph-header__bar { position: relative; }
.ph-mega { width: min(1080px, calc(100vw - 2rem)); left: 50% !important; transform: translateX(-50%); margin-top: .6rem; padding: 1.1rem 1.25rem; border-radius: 14px; border: 1px solid var(--line, #e5e1d8); box-shadow: 0 18px 40px rgba(0,0,0,.14); max-height: 78vh; overflow-y: auto; }
.ph-mega.show { display: block; }
.ph-mega__grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1.1rem; }
.ph-mega__col a { display: block; padding: .18rem 0; font-size: .86rem; color: var(--ink-soft); text-decoration: none; border-radius: 4px; }
.ph-mega__col a:hover { color: var(--brand); }
.ph-mega__h { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--brand); margin: 0 0 .4rem; }
.ph-mega__all { display: inline-flex; gap: .3rem; align-items: center; margin-top: .9rem; padding-top: .7rem; border-top: 1px solid var(--line, #e5e1d8); width: 100%; font-weight: 700; text-decoration: none; }
.ph-mega__all .ph-icon { width: 16px; height: 16px; }
@media (max-width: 1199px) { .ph-mega__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .ph-nav a, .ph-nav__btn { padding: .45rem .5rem; font-size: .9rem; } }
.ph-menu__group summary { font-weight: 600; padding: .6rem 0; cursor: pointer; }
.ph-menu__group a { padding-left: 1rem; font-size: .92rem; }
.ph-menu__sub { display: block; margin: .6rem 0 .1rem 1rem; font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--brand); }
.ph-toolbar { display: flex; gap: .75rem; flex-wrap: wrap; align-items: center; }
.ph-toolbar .form-control { flex: 1 1 260px; max-width: 420px; }
.ph-toolcard { display: block; height: 100%; padding: .9rem 1rem; border: 1px solid var(--line, #e5e1d8); border-radius: 12px; background: #fff; text-decoration: none; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
.ph-toolcard:hover { border-color: var(--brand); box-shadow: 0 6px 18px rgba(10,107,46,.1); }
.ph-toolcard strong { display: block; font-size: .95rem; margin-bottom: .2rem; }
.ph-toolcard span { display: block; font-size: .82rem; color: var(--ink-soft); }

.ph-nav a, .ph-nav__btn { white-space: nowrap; }
.ph-actions .btn { white-space: nowrap; }
@media (max-width: 1399px) { .ph-nav a, .ph-nav__btn { padding: .4rem .5rem; font-size: .88rem; } .ph-nav { gap: 0; } .ph-actions .btn { padding-left: .8rem; padding-right: .8rem; font-size: .9rem; } }
.ph-mega { position: absolute; top: 100%; }
.ph-nav .ph-mega__col a { white-space: normal; padding: .18rem 0; font-size: .86rem; font-weight: 500; border-radius: 4px; background: none; }
.ph-nav .ph-mega__col a:hover { color: var(--brand); background: none; }
.ph-nav .ph-mega__all { white-space: nowrap; padding: .7rem 0 0; font-size: .95rem; background: none; border-radius: 0; }
.ph-mega__grid { gap: 1.1rem 1.5rem; }
.ph-brand { flex: none; margin-right: .5rem; }
.ph-small { font-size: .85rem; }
