/* Client portal: same paper/ink world as beyondfrontdoor.com, tuned for a working screen. */
:root {
	--paper: #f7f7f5;
	--stone: #ecebe7;
	--ink: #161513;
	--ink-2: #55514a;
	--rule: #dedbd4;
	--white: #fff;
	--ok: #1f6b3a;
	--bad: #a3261b;
	--serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
	--sans: "Hanken Grotesk", system-ui, sans-serif;
	--gutter: clamp(16px, 4vw, 56px);
	--wide: 1180px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.55 var(--sans); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: .2em; text-decoration-thickness: 1px; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 2px; }
h1, h2 { font-family: var(--serif); font-weight: 400; letter-spacing: -.01em; margin: 0; line-height: 1.05; text-wrap: balance; }
h1 { font-size: clamp(2.2rem, 4.4vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 2.8vw, 2.3rem); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }

.p-head, .p-main, .p-foot { width: min(100% - 2 * var(--gutter), var(--wide)); margin-inline: auto; }
.p-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding: 22px 0; border-bottom: 1px solid var(--rule); }
.p-mark { display: inline-flex; align-items: center; gap: 14px; font-family: var(--serif); font-size: 1.5rem; text-decoration: none; line-height: 1; min-height: 44px; }
.p-mark svg { height: 30px; width: auto; display: block; }
.p-mark span { font-family: var(--sans); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); padding-left: 14px; border-left: 1px solid var(--rule); }
.p-head nav { display: flex; gap: 22px; font-size: .92rem; }
.p-head nav a { text-decoration: none; padding: 10px 0; }
.p-head nav a:hover { text-decoration: underline; }
.p-main { padding: clamp(28px, 5vw, 56px) 0 72px; min-height: 60vh; }
.p-foot { border-top: 1px solid var(--rule); padding: 24px 0 40px; color: var(--ink-2); font-size: .9rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }
.p-foot p { margin: 0; }

.p-lede { color: var(--ink-2); font-size: 1.05rem; max-width: 46ch; margin: 12px 0 28px; }
.p-small { color: var(--ink-2); font-size: .9rem; }
.p-note, .p-alert { padding: 12px 16px; background: var(--stone); border: 1px solid var(--rule); max-width: 60ch; }
.p-alert { background: #f8ecea; border-color: #e4c2bd; color: #5c1a12; }
.p-empty { color: var(--ink-2); }
.p-count { font-family: var(--sans); font-size: .9rem; color: var(--ink-2); vertical-align: middle; margin-left: 6px; }
.p-back { margin: 0 0 18px; font-size: .92rem; }
.p-back a { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: var(--ink-2); min-height: 44px; }
.p-back .p-ico { width: 18px; height: 18px; }
.p-back a:hover { color: var(--ink); }

/* Buttons */
.p-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px; border: 1px solid var(--ink); background: var(--ink); color: var(--paper); font: 500 .92rem var(--sans); text-decoration: none; cursor: pointer; border-radius: 0; white-space: nowrap; }
.p-btn:hover { background: #2b2925; }
.p-btn--line { background: transparent; color: var(--ink); }
.p-btn--line:hover { background: var(--ink); color: var(--paper); }
.p-btn[disabled] { opacity: .5; cursor: progress; }
.p-link { font-size: .92rem; }

/* Sign in + profile */
.p-login, .p-form { max-width: 460px; }
.p-login form p, .p-fields label { display: grid; gap: 6px; margin: 0 0 16px; font-size: .9rem; color: var(--ink-2); }
.p-login input[type=text], .p-login input[type=password], .p-fields input { font: inherit; color: var(--ink); background: var(--white); border: 1px solid #bdb8ae; min-height: 46px; padding: 0 12px; width: 100%; }
.p-login input:focus, .p-fields input:focus { outline: 2px solid var(--ink); outline-offset: 0; border-color: var(--ink); }
.p-login .login-remember label { display: flex; align-items: center; gap: 8px; color: var(--ink); }
.p-login .login-submit input, .p-form button { appearance: none; border: 1px solid var(--ink); background: var(--ink); color: var(--paper); font: 500 1rem var(--sans); min-height: 48px; padding: 0 24px; cursor: pointer; }
.p-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 520px) { .p-fields { grid-template-columns: 1fr; } }

/* Dashboard */
.p-intro { display: grid; gap: 20px; margin-bottom: clamp(36px, 5vw, 56px); }
.p-card { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 16px 40px; padding: 20px 22px; background: var(--white); border: 1px solid var(--rule); }
.p-card > div { display: grid; }
.p-card strong { font-size: 1.1rem; font-weight: 600; }
.p-card > div span { color: var(--ink-2); }
.p-card dl { display: flex; flex-wrap: wrap; gap: 8px 32px; margin: 0; }
.p-card dt { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); }
.p-card dd { margin: 0; }
.p-card .p-link { margin-left: auto; align-self: center; }
.p-props h2 { margin-bottom: 20px; }
.p-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.p-tile a { display: block; text-decoration: none; background: var(--white); border: 1px solid var(--rule); height: 100%; transition: border-color .15s; }
.p-tile a:hover { border-color: var(--ink); }
.p-tile__img { display: block; aspect-ratio: 3 / 2; background: var(--stone); overflow: hidden; }
.p-tile__img img { width: 100%; height: 100%; object-fit: cover; }
.p-tile__body { display: grid; gap: 2px; padding: 14px 16px 16px; }
.p-tile__body strong { font-weight: 600; }
.p-tile__body > span { color: var(--ink-2); font-size: .92rem; }
.p-meta { display: flex; align-items: center; gap: 10px; margin-top: 8px; font-size: .85rem; }
.p-badge { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; padding: 3px 8px; border: 1px solid var(--rule); color: var(--ink-2); }
.p-badge.is-live { border-color: var(--ok); color: var(--ok); }

/* Property */
.p-hero { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: clamp(20px, 4vw, 48px); align-items: end; margin-bottom: clamp(36px, 5vw, 56px); }
.p-hero img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; background: var(--stone); }
.p-hero p { color: var(--ink-2); margin: 10px 0 0; font-size: 1.05rem; }
.p-section { border-top: 1px solid var(--rule); padding: clamp(24px, 4vw, 40px) 0; }
.p-section h2 { margin-bottom: 18px; }
.p-links { display: grid; gap: 12px; }
.p-linkrow, .p-extra li { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto auto; gap: 8px; align-items: center; }
.p-label, .p-extra li > span { font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.p-linkrow input, .p-extra input { font: inherit; font-size: .95rem; min-height: 44px; padding: 0 12px; border: 1px solid var(--rule); background: var(--white); color: var(--ink); width: 100%; }
.p-extra { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.p-qr { display: flex; gap: 20px; align-items: center; margin-top: 12px; padding: 16px; background: var(--white); border: 1px solid var(--rule); max-width: 560px; }
.p-qr__code { width: 116px; height: 116px; flex: none; }
.p-qr__code svg { width: 100%; height: 100%; display: block; }
.p-qr p { margin: 2px 0 10px; color: var(--ink-2); font-size: .92rem; }
.p-sizes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.p-size { display: grid; gap: 4px; text-align: left; padding: 16px 18px; border: 1px solid var(--ink); background: var(--white); color: var(--ink); font: inherit; cursor: pointer; }
.p-size:hover { background: var(--ink); color: var(--paper); }
.p-size:hover span { color: #cfcac0; }
.p-size strong { font-weight: 600; }
.p-size span { font-size: .88rem; color: var(--ink-2); }
.p-size[disabled] { opacity: .5; cursor: progress; }
.p-progress { min-height: 1.6em; margin: 12px 0; color: var(--ink-2); }
.p-progress.is-error { color: var(--bad); }
.p-photos { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.p-photos li { position: relative; background: var(--stone); }
.p-photos img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.p-photo__dl { display: flex; justify-content: space-between; gap: 2px; padding: 6px 8px; background: var(--white); border: 1px solid var(--rule); border-top: 0; font-size: .82rem; }
.p-photo__dl a { padding: 6px 2px; }

@media (max-width: 800px) {
	.p-hero { grid-template-columns: 1fr; }
	.p-sizes { grid-template-columns: 1fr; }
	.p-linkrow, .p-extra li { grid-template-columns: 1fr auto auto; }
	.p-label, .p-extra li > span { grid-column: 1 / -1; }
	.p-card .p-link { margin-left: 0; }
}

/* Sign in: link first, password second */
.p-magic { display: grid; gap: 6px; margin-bottom: 20px; }
.p-magic label { font-size: .9rem; color: var(--ink-2); }
.p-magic__row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.p-magic input { font: inherit; color: var(--ink); background: var(--white); border: 1px solid #bdb8ae; min-height: 48px; padding: 0 12px; width: 100%; }
.p-magic input:focus { outline: 2px solid var(--ink); outline-offset: 0; border-color: var(--ink); }
.p-magic .p-btn { min-height: 48px; }
.p-pw { border-top: 1px solid var(--rule); padding-top: 14px; }
.p-pw summary { cursor: pointer; font-size: .95rem; padding: 8px 0; }
.p-pw form { margin-top: 12px; }
@media (max-width: 520px) { .p-magic__row { grid-template-columns: 1fr; } }
.p-btn--big { min-height: 54px; padding: 0 28px; font-size: 1rem; margin: 8px 0 14px; }

/* ---------- 0.6: richer property page ---------- */
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.p-actions { margin: -12px 0 36px; }
.p-linkbtn { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; text-underline-offset: .2em; cursor: pointer; }
.p-eyebrow { font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); margin: 0 0 10px; }
.p-lede--tight { margin: 0 0 18px; }
.p-check { display: flex; align-items: center; gap: 10px; margin: 14px 0 6px; cursor: pointer; }
.p-check input { width: 20px; height: 20px; accent-color: var(--ink); }

.p-hero .p-badge { display: inline-block; margin-bottom: 14px; }
.p-glance { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 22px; color: var(--ink-2); font-size: .92rem; }
.p-glance strong { color: var(--ink); font-size: 1.15rem; font-weight: 600; margin-right: 2px; }
.p-jump { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 0; }

.p-section__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; margin-bottom: 18px; }
.p-section__head h2 { margin: 0; }
.p-hint { margin: 0; }
.p-sizegroup { margin-bottom: 14px; }
.p-sizegroup h3 { font: 600 .72rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); margin: 0 0 8px; }
.p-sizes--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.p-size[disabled] { opacity: .45; }

/* Photo grid with pick + zoom */
.p-photos li { position: relative; }
.p-zoom { display: block; width: 100%; padding: 0; border: 0; background: var(--stone); cursor: zoom-in; }
.p-zoom img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; transition: opacity .2s; }
.p-num { position: absolute; right: 8px; bottom: 8px; font-size: .72rem; color: #fff; background: rgba(22,21,19,.55); padding: 1px 6px; pointer-events: none; }
.p-pick { position: absolute; top: 0; left: 0; z-index: 2; width: 48px; height: 48px; display: grid; place-items: center; cursor: pointer; }
.p-pick input { appearance: none; width: 24px; height: 24px; margin: 0; border-radius: 50%; border: 2px solid #fff; background: rgba(22,21,19,.35); box-shadow: 0 0 0 1px rgba(0,0,0,.25); cursor: pointer; display: grid; place-items: center; }
.p-pick input:checked { background: var(--ink); border-color: #fff; }
.p-pick input:checked::after { content: ""; width: 10px; height: 6px; border: solid #fff; border-width: 0 0 2px 2px; transform: translateY(-1px) rotate(-45deg); }
.p-pick input:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.p-photos li.is-picked .p-zoom { outline: 3px solid var(--ink); outline-offset: -3px; }
.p-photos li.is-picked img { opacity: .82; }
.p-photos--view { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }

/* Selection tray */
.p-tray { position: sticky; bottom: 12px; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 16px; padding: 12px 16px; background: var(--ink); color: var(--paper); box-shadow: 0 8px 30px rgba(22,21,19,.18); }
.p-tray[hidden] { display: none; }
.p-tray__count { font-weight: 600; }
.p-tray__spacer { flex: 1; }
.p-tray__hint { font-size: .9rem; color: #cfcac0; }
.p-tray .p-btn { background: var(--paper); color: var(--ink); border-color: var(--paper); }

/* Viewer + share sheet */
.p-lightbox { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: #0d0c0b; color: #fff; }
.p-lightbox::backdrop { background: #0d0c0b; }
.p-lightbox[open] { display: grid; grid-template-rows: 1fr auto; }
.p-lightbox img { width: 100%; height: 100%; object-fit: contain; min-height: 0; }
.p-lightbox__bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }
.p-lightbox__n { font-size: .9rem; color: #bdb8ae; min-width: 4.5em; }
.p-lightbox__dl { display: flex; flex-wrap: wrap; gap: 6px 14px; flex: 1; font-size: .9rem; }
.p-lightbox__dl a { color: #fff; padding: 8px 0; }
.p-lightbox__btn { width: 44px; height: 44px; border: 1px solid #55514a; background: none; color: #fff; cursor: pointer; display: grid; place-items: center; }
.p-lightbox__btn .p-ico { width: 20px; height: 20px; }
.p-lightbox__btn:hover { background: #2b2925; }
.p-sharesheet { border: 0; padding: 24px; width: min(92vw, 440px); background: var(--paper); color: var(--ink); }
.p-sharesheet::backdrop { background: rgba(22,21,19,.55); }
.p-sharesheet h2 { margin-bottom: 8px; }
.p-sharesheet__sizes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 16px 0 8px; }
.p-sharesheet [data-share-go] { width: 100%; margin: 6px 0 12px; }

/* Seller link */
.p-share { max-width: 760px; }
.p-linkrow--share { grid-template-columns: minmax(0, 1fr) auto auto; }

/* Tour / video / documents */
.p-embed { position: relative; aspect-ratio: 16 / 9; background: var(--ink); margin-bottom: 16px; }
.p-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.p-embed__play { position: absolute; inset: 0; width: 100%; border: 0; background: radial-gradient(circle at center, #2b2925, #161513); color: var(--paper); font: 500 1.05rem var(--sans); cursor: pointer; display: grid; place-items: center; }
.p-embed__play span { padding: 14px 22px; border: 1px solid var(--paper); }
.p-embed__play:hover span { background: var(--paper); color: var(--ink); }
.p-file { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-file small { color: var(--ink-2); margin-left: 6px; }
.p-extra li { grid-template-columns: 150px minmax(0, 1fr) auto auto; }

/* Activity */
.p-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; background: var(--rule); border: 1px solid var(--rule); margin: 0 0 18px; }
.p-stats > div { background: var(--white); padding: 14px 16px; }
.p-stats > div:first-child { grid-column: span 2; }
.p-stats dt { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 6px; }
.p-stats dd { display: inline-block; margin: 0 18px 0 0; font: 400 2rem/1.1 var(--serif); }
.p-stats dd small { font: 400 .8rem var(--sans); color: var(--ink-2); }
.p-spark { display: flex; align-items: flex-end; gap: 3px; height: 64px; margin-bottom: 18px; }
.p-spark span { flex: 1; background: var(--ink); min-height: 2px; opacity: .85; }
.p-tops { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px 40px; }
.p-tops h3 { font: 600 .72rem/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); margin: 0 0 8px; }
.p-tops ol { list-style: none; margin: 0; padding: 0; }
.p-tops li { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid var(--rule); }

/* Book */
.p-book { display: grid; gap: 8px; justify-items: start; }
.p-book p { margin: 0 0 8px; color: var(--ink-2); }
.p-form--wide { max-width: 760px; }

/* The site's estimate form, inside the portal */
.p-form .estimate { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 18px; }
.p-form .estimate .field { display: grid; gap: 6px; }
.p-form .estimate .field--wide { grid-column: 1 / -1; }
.p-form .estimate label, .p-form .estimate legend { font-size: .9rem; color: var(--ink-2); }
.p-form .estimate .opt { color: #8a857c; }
.p-form .estimate input[type=text], .p-form .estimate input[type=email], .p-form .estimate input[type=tel], .p-form .estimate input[type=date], .p-form .estimate textarea { font: inherit; color: var(--ink); background: var(--white); border: 1px solid #bdb8ae; min-height: 46px; padding: 10px 12px; width: 100%; }
.p-form .estimate fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.p-form .estimate .check { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--rule); background: var(--white); cursor: pointer; color: var(--ink); }
.p-form .estimate .check input { accent-color: var(--ink); }
.p-form .estimate .hp { position: absolute !important; left: -9999px; }
.p-form .estimate .btn { appearance: none; display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--ink); background: var(--ink); color: var(--paper); font: 500 1rem var(--sans); min-height: 48px; padding: 0 24px; cursor: pointer; }
.p-form .estimate .btn svg { width: 16px; height: 16px; }
.p-form .estimate .fineprint { color: var(--ink-2); font-size: .88rem; }
.p-form .form-done, .p-form .form-error { padding: 14px 16px; background: #eaf2ec; border: 1px solid #c3dbc9; }
.p-form .form-error { background: #f8ecea; border-color: #e4c2bd; }

@media (max-width: 800px) {
	.p-stats > div:first-child { grid-column: auto; }
	.p-linkrow--share { grid-template-columns: 1fr auto; }
	.p-linkrow--share input { grid-column: 1 / -1; }
	.p-form .estimate { grid-template-columns: 1fr; }
	.p-sizes--2 { grid-template-columns: 1fr; }
}

/* ---------- 0.6.1: dashboard ---------- */
::selection { background: var(--ink); color: var(--paper); }
html { scrollbar-color: #b9b5ac var(--paper); }
.p-ico { width: 18px; height: 18px; flex: none; }
.p-btn { gap: 8px; }
.d-h { font: 600 .74rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); margin: 0 0 14px; }

.d-top { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px 32px; padding-bottom: clamp(24px, 4vw, 40px); }
.d-top h1 { font-size: clamp(2.3rem, 4.6vw, 3.6rem); }
.d-summary { margin: 12px 0 0; color: var(--ink-2); font-size: 1.05rem; font-variant-numeric: tabular-nums; }

/* New deliveries: the one place on the page that asks for attention */
.d-new { margin-bottom: clamp(32px, 5vw, 52px); }
.d-new__item { display: grid; grid-template-columns: minmax(0, 360px) 1fr; gap: clamp(18px, 3vw, 36px); align-items: center; background: var(--ink); color: var(--paper); }
.d-new__item + .d-new__item { margin-top: 12px; }
.d-new__img { display: block; aspect-ratio: 3 / 2; background: #2b2925; overflow: hidden; }
.d-new__img img { width: 100%; height: 100%; object-fit: cover; }
.d-new__body { padding: 20px clamp(18px, 3vw, 32px) 20px 0; }
.d-new__body h3 { font: 400 clamp(1.6rem, 2.8vw, 2.2rem)/1.05 var(--serif); margin: 0; }
.d-new__body h3 a { text-decoration: none; }
.d-new__body h3 a:hover { text-decoration: underline; }
.d-new__body p { color: #cfcac0; margin: 8px 0 18px; }
.d-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.d-new .p-btn { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.d-new .p-btn:hover { background: #fff; }
.d-new .p-btn--line { background: transparent; color: var(--paper); border-color: #6d685f; }
.d-new .p-btn--line:hover { background: #2b2925; color: var(--paper); }

/* Listings + side column */
.d-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: clamp(28px, 4vw, 56px); align-items: start; }
.d-list__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; margin-bottom: 4px; }
.d-list__head .d-h { margin: 0; }
.d-filter { display: flex; flex-wrap: wrap; gap: 10px; }
.d-search { display: flex; align-items: center; gap: 8px; border: 1px solid var(--rule); background: var(--white); padding: 0 12px; min-height: 42px; }
.d-search input { border: 0; background: none; font: inherit; color: var(--ink); min-width: 0; width: 200px; outline: none; }
.d-search:focus-within { border-color: var(--ink); }
.d-seg { display: flex; border: 1px solid var(--rule); }
.d-seg button { border: 0; background: var(--white); font: 500 .88rem var(--sans); padding: 0 14px; min-height: 42px; cursor: pointer; color: var(--ink-2); }
.d-seg button + button { box-shadow: -1px 0 0 var(--rule); }
.d-seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

.d-rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.d-row { display: grid; grid-template-columns: 148px minmax(0, 1fr) auto; gap: 20px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--rule); }
.d-row[hidden] { display: none; }
.d-row__img { display: block; aspect-ratio: 3 / 2; background: var(--stone); overflow: hidden; }
.d-row__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.16,1,.3,1); }
.d-row:hover .d-row__img img { transform: scale(1.04); }
.d-row h3 { font: 400 1.55rem/1.1 var(--serif); margin: 0; }
.d-row h3 a { text-decoration: none; }
.d-row h3 a:hover { text-decoration: underline; }
.d-row__city { margin: 2px 0 8px; color: var(--ink-2); }
.d-row__meta { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0; font-size: .86rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.d-dot { display: inline-flex; align-items: center; gap: 6px; }
.d-dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #b9b5ac; }
.d-dot.is-live { color: var(--ok); }
.d-dot.is-live::before { background: var(--ok); }
.d-row__actions { display: flex; gap: 4px; }
.d-act { display: grid; justify-items: center; gap: 4px; min-width: 64px; min-height: 56px; padding: 8px 6px; border: 1px solid transparent; background: none; color: var(--ink); font: 500 .76rem var(--sans); text-decoration: none; cursor: pointer; }
.d-act:hover { border-color: var(--rule); background: var(--white); }
.d-act .p-ico { width: 20px; height: 20px; }

.d-side { display: grid; gap: 36px; position: sticky; top: 24px; }
.d-feed { list-style: none; margin: 0; padding: 0; }
.d-feed li { display: grid; grid-template-columns: 20px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.d-feed li:first-child { padding-top: 0; }
.d-feed .p-ico { color: var(--ink-2); margin-top: 2px; }
.d-feed p { margin: 0; }
.d-feed__meta { font-size: .84rem; color: var(--ink-2); margin-top: 2px !important; }
.d-feed__meta a { color: inherit; }
.d-quiet { color: var(--ink-2); font-size: .92rem; margin: 0 0 8px; }
.d-me__name { font-weight: 600; margin: 0 0 2px; }
.d-help { font-size: .92rem; color: var(--ink-2); }
.d-help p { margin: 0 0 4px; }

@media (max-width: 960px) {
	.d-grid { grid-template-columns: 1fr; }
	.d-side { position: static; }
}
@media (max-width: 640px) {
	.d-new__item { grid-template-columns: 1fr; }
	.d-new__body { padding: 0 18px 20px; }
	.d-row { grid-template-columns: 104px minmax(0, 1fr); gap: 14px; align-items: start; }
	.d-row h3 { font-size: 1.3rem; }
	.d-row__actions { grid-column: 1 / -1; justify-content: space-between; border-top: 1px solid var(--rule); padding-top: 8px; }
	.d-act { flex: 1; }
	.d-search input { width: 100%; }
	.d-filter, .d-search { width: 100%; }
}

/* ---------- 0.6.3: visual dashboard ---------- */
.d-hero { position: relative; margin: 0 0 clamp(32px, 5vw, 56px); min-height: clamp(420px, 62vh, 640px); display: grid; grid-template-rows: auto 1fr auto; color: #fff; overflow: hidden; background: var(--ink); }
.d-hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; animation: d-settle 1.4s cubic-bezier(.16,1,.3,1) both; }
@keyframes d-settle { from { transform: scale(1.04); } to { transform: none; } }
.d-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,9,8,.66) 0, rgba(10,9,8,.3) 26%, rgba(10,9,8,0) 48%, rgba(10,9,8,.74) 100%); pointer-events: none; }
.d-hero > div { position: relative; z-index: 1; }
.d-hero__top { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 16px 32px; padding: clamp(22px, 3.4vw, 40px); }
.d-hero__top h1 { font-size: clamp(2.3rem, 4.8vw, 3.8rem); text-shadow: 0 1px 18px rgba(0,0,0,.25); }
.d-hero .d-summary { color: #fff; text-shadow: 0 1px 10px rgba(0,0,0,.45); }
.d-hero__book { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.d-hero__book:hover { background: #fff; color: var(--ink); }
.d-hero__listing { grid-row: 3; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 32px; padding: clamp(22px, 3.4vw, 40px); }
.d-hero__state { margin: 0 0 6px; font-size: .95rem; color: #fff; text-shadow: 0 1px 10px rgba(0,0,0,.45); }
.d-hero__listing h2 { font-size: clamp(1.9rem, 3.6vw, 3rem); }
.d-hero__listing h2 a { text-decoration: none; }
.d-hero__listing h2 a:hover { text-decoration: underline; }
.d-hero .p-btn { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.d-hero .p-btn--line { background: rgba(10,9,8,.28); color: #fff; border-color: rgba(255,255,255,.7); backdrop-filter: blur(6px); }
.d-hero .p-btn--line:hover { background: #fff; color: var(--ink); }
.d-hero--plain { min-height: 0; background: none; color: var(--ink); margin-inline: 0; }
.d-hero--plain::after { display: none; }
.d-hero--plain .d-hero__top { padding: 0 0 8px; }
.d-hero--plain .d-hero__top h1 { text-shadow: none; }
.d-hero--plain .d-summary { color: var(--ink-2); }
.d-hero--plain .d-hero__book { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.d-tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 32px 24px; }
.d-tile[hidden] { display: none; }
.d-tile__img { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--stone); }
.d-tile__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s cubic-bezier(.16,1,.3,1); }
.d-tile:hover .d-tile__img img { transform: scale(1.05); }
.d-tile__none { position: absolute; inset: 0; display: grid; place-items: center; color: var(--ink-2); font-size: .9rem; }
.d-tile__tags { position: absolute; top: 12px; left: 12px; display: flex; gap: 6px; }
.d-tag { font: 600 .7rem/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; padding: 6px 9px; background: rgba(247,247,245,.94); color: var(--ink-2); }
.d-tag.is-live { color: var(--ok); }
.d-tag.is-new { background: var(--ink); color: var(--paper); }
.d-tile__body { padding-top: 14px; }
.d-tile__body h3 { font: 400 1.6rem/1.1 var(--serif); margin: 0 0 6px; }
.d-tile__body h3 a { text-decoration: none; }
.d-tile__body h3 a:hover { text-decoration: underline; }
.d-tile__actions { display: flex; gap: 4px; margin-top: 10px; border-top: 1px solid var(--rule); padding-top: 6px; }
.d-tile__actions .d-act { flex: 1; }

.d-me__card { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.d-me__photo { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; background: var(--stone); }
.d-me__logo { max-height: 48px; max-width: 200px; width: auto; margin: 4px 0 12px; }

.p-imgs { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 6px 0 18px; }
.p-img { display: grid; gap: 8px; justify-items: start; padding: 16px; background: var(--white); border: 1px solid var(--rule); }
.p-img__label { font-size: .9rem; color: var(--ink-2); }
.p-img__preview { width: 100%; height: 120px; display: grid; place-items: center; background: var(--stone); overflow: hidden; color: var(--ink-2); font-size: .9rem; }
.p-img__preview img { max-width: 100%; max-height: 100%; object-fit: contain; }
.p-img--headshot .p-img__preview img { width: 120px; height: 120px; object-fit: cover; border-radius: 50%; }
.p-img__pick { cursor: pointer; min-height: 40px; }
.p-check--small { margin: 0; font-size: .9rem; }
.p-check--small input { width: 18px; height: 18px; }
@media (max-width: 640px) {
	.d-hero { min-height: 520px; }
	.d-hero__listing .d-actions { width: 100%; }
	.d-hero__listing .p-btn { flex: 1 1 auto; }
	.p-imgs { grid-template-columns: 1fr; }
}

/* Listing details (agents edit their own description, price, status, rooms) */
.p-note--ok { background: #e6efe8; border-color: #bcd3c2; color: var(--ok); margin-bottom: 18px; }
.p-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0; margin: 0 0 24px; border-top: 1px solid var(--rule); border-left: 1px solid var(--rule); }
.p-facts div { padding: 12px 14px; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); background: var(--white); }
.p-facts dt { font-size: .82rem; color: var(--ink-2); }
.p-facts dd { margin: 4px 0 0; font-size: 1.05rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.p-facts .is-empty dd { font-weight: 400; color: #8d887f; }
.p-desc__text { max-width: 68ch; color: var(--ink); }
.p-desc__text p { margin: 0 0 1em; }
.p-edit { margin-top: 4px; }
.p-edit__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px 14px; align-items: start; margin-bottom: 18px; }
.p-field { display: grid; gap: 6px; align-content: start; min-width: 0; }
.p-field > span { font-size: .85rem; font-weight: 600; color: var(--ink-2); }
.p-field small { color: var(--ink-2); font-size: .8rem; }
.p-field input, .p-field select, .p-field textarea { font: inherit; font-size: 1rem; min-height: 46px; padding: 0 12px; border: 1px solid #cfcac1; background: var(--white); color: var(--ink); width: 100%; border-radius: 0; }
.p-field textarea { padding: 12px; line-height: 1.6; min-height: 240px; resize: vertical; }
.p-field input:focus, .p-field select:focus, .p-field textarea:focus { outline: 2px solid var(--ink); outline-offset: -1px; border-color: var(--ink); }
.p-field--listing_status, .p-field--display_price { grid-column: span 2; }
.p-field--desc { grid-column: 1 / -1; }
.p-money { position: relative; display: block; }
.p-money b { position: absolute; left: 12px; top: 50%; translate: 0 -50%; font-weight: 400; color: var(--ink-2); pointer-events: none; }
.p-money input { padding-left: 26px; }
.p-edit__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
@media (max-width: 760px) {
	.p-edit__grid { grid-template-columns: 1fr 1fr; }
	.p-field--listing_status, .p-field--display_price, .p-field--property_type, .p-field--garage, .p-field--mls_id { grid-column: 1 / -1; }
	.p-edit__actions .p-btn { flex: 1 1 auto; }
}
.p-facts[hidden], .p-desc[hidden], .p-edit[hidden], .p-btn[hidden] { display: none; }

/* Current website design, links to the studio */
.p-design { display: grid; grid-template-columns: minmax(160px, 260px) minmax(0, 1fr); gap: 20px; align-items: center; padding: 14px; margin-bottom: 8px; background: var(--white); border: 1px solid var(--rule); text-decoration: none; color: var(--ink); max-width: 760px; transition: border-color .2s; }
.p-design:hover { border-color: var(--ink); }
.p-design:hover .p-btn--line { background: var(--ink); color: var(--paper); }
.p-design__img { display: block; aspect-ratio: 16 / 10; background: var(--stone); overflow: hidden; }
.p-design__img img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.p-design__text { display: grid; gap: 6px; justify-items: start; }
.p-design__text strong { font-family: var(--serif); font-weight: 400; font-size: 1.7rem; line-height: 1.05; }
.p-design__char { color: var(--ink-2); font-size: .92rem; max-width: 46ch; }
.p-design__text .p-btn { margin-top: 6px; }
.p-design__note { margin: 0 0 22px; }
@media (max-width: 560px) { .p-design { grid-template-columns: 1fr; } }

/* Edit listing page + features list */
.p-editpage h1 { margin: 0 0 6px; }
.p-editpage .p-lede { margin-bottom: 24px; }
.p-field--features { grid-column: 1 / -1; }
.p-field--features textarea { min-height: 180px; }
.p-features { margin: 0 0 20px; }
.p-features h3 { font-size: .85rem; font-weight: 600; color: var(--ink-2); margin: 0 0 8px; }
.p-features ul { margin: 0; padding: 0; list-style: none; columns: 2 220px; column-gap: 24px; }
.p-features li { break-inside: avoid; padding: 6px 0; border-bottom: 1px solid var(--rule); }
.d-act--edit { background: var(--ink); color: var(--white); }
.d-act--edit:hover { background: #000; border-color: #000; color: var(--white); }
.p-btn .p-ico { width: 18px; height: 18px; }

/* Agent publish switch */
.p-pub { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.p-pub .p-badge { margin: 0; }
.p-pub__btn { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border: 1px solid var(--ink); color: var(--ink); background: transparent; font-size: .85rem; font-weight: 600; text-decoration: none; }
.p-pub__btn:hover { background: var(--ink); color: var(--paper); }
.p-pub__btn.is-go { background: var(--ink); color: var(--paper); }
.p-pub__btn.is-go:hover { background: #000; }
