@import url('/brand-tokens.css');

/* Search Lab V4.3. Canonical brand roles above are never re-declared here. */
:root {
  color-scheme: light;
  --journey-control: #69758f;
  --journey-focus: #215fb0;
  --journey-surface: color-mix(in srgb, hsl(var(--background)) 70%, white);
  font: 400 16px/1.6 var(--app-font-sans);
  color: hsl(var(--foreground));
  background: hsl(var(--background));
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
.dark {
  color-scheme: dark;
  --journey-control: #a3abc0;
  --journey-focus: #d5e1ff;
  --journey-surface: color-mix(in srgb, hsl(var(--background)) 78%, hsl(var(--card)));
}
.dark :is(.brand img, .form-page > .agent-note > img) { filter: brightness(0) invert(1); }
* { box-sizing: border-box; min-width: 0; }
html { scroll-padding-top: 24px; }
body { margin: 0; }
body:has(.dialog-backdrop) { overflow: hidden; }
button, input, textarea, select { font: inherit; color: inherit; }
button, a, summary { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button { cursor: pointer; line-height: 1.45; white-space: normal; }
button:disabled { cursor: not-allowed; opacity: .52; }
input, textarea, select { accent-color: hsl(var(--primary)); }
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3, h4 { font-family: var(--app-font-serif); font-weight: 500; line-height: 1.22; letter-spacing: -.035em; text-wrap: balance; }
h1 { font-size: clamp(2rem, 3.7vw, 3rem); letter-spacing: -.05em; }
h2 { font-size: clamp(1.45rem, 2.5vw, 1.95rem); }
h3 { font-size: 1.18rem; }
h4 { font-size: 1.05rem; }
strong { font-weight: 600; }
a { color: inherit; text-underline-offset: 4px; }
img { display: block; max-width: 100%; height: auto; }
svg { flex: none; }
fieldset { margin: 0; padding: 0; border: 0; }
legend { margin-bottom: 14px; font-weight: 600; }
hr { margin: 0; border: 0; border-top: 1px solid hsl(var(--border)); }
ul, ol { padding-left: 22px; }
li + li { margin-top: 5px; }
::selection { background: hsl(var(--state-progress-bg)); color: hsl(var(--state-progress-fg)); }
:is(a, button, input, textarea, select, summary, [tabindex]):focus-visible { outline: 3px solid var(--journey-focus); outline-offset: 4px; }
.icon { width: 20px; height: 20px; vertical-align: middle; stroke-width: 1.7; flex: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: -100px; left: 16px; z-index: 100; padding: 12px 18px; border-radius: 6px; background: hsl(var(--background)); box-shadow: var(--shadow-lg); }
.skip-link:focus { top: 12px; }
.loading { min-height: 70vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; padding: 30px; text-align: center; }

/* Quiet chrome leaves the move itself in the foreground. */
.app-shell { min-height: 100dvh; display: flex; flex-direction: column; }
.app-header { width: 100%; max-width: 1320px; margin-inline: auto; padding: 22px 42px; display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.brand { display: inline-flex; align-items: center; gap: 10px; padding: 0; min-height: 44px; border: 0; background: none; text-decoration: none; font: 600 1.6rem/1 var(--app-font-serif); letter-spacing: -.055em; color: hsl(var(--foreground)); }
.brand img { width: 33px; height: 33px; object-fit: contain; }
.brand small { display: block; font: 400 .7rem/1.3 var(--app-font-sans); letter-spacing: .07em; margin-top: 5px; }
.main-nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 7px 22px; margin-left: auto; }
.main-nav button, .main-nav a { display: inline-flex; align-items: center; justify-content: center; gap: 7px; position: relative; padding: 12px 0; min-height: 44px; border: 0; background: none; color: hsl(var(--muted-foreground)); font-size: .875rem; text-decoration: none; }
.main-nav :is(.active, [aria-current='page']) { color: hsl(var(--foreground)); }
.main-nav :is(.active, [aria-current='page'])::after { content: ''; position: absolute; bottom: 3px; left: 0; right: 0; height: 2px; background: hsl(var(--foreground)); }
.header-actions { display: flex; align-items: center; gap: 6px; }
.header-actions .button { padding-inline: 11px; }
.icon-button, .avatar-button { display: inline-flex; align-items: center; justify-content: center; flex: none; min-width: 44px; min-height: 44px; padding: 10px; border: 1px solid transparent; border-radius: 7px; color: inherit; background: transparent; }
.icon-button:hover { background: hsl(var(--card)); border-color: hsl(var(--border)); }
.avatar-button { width: 38px; height: 38px; min-width: 44px; min-height: 44px; padding: 6px; border-radius: 50%; border-color: hsl(var(--border)); font-size: .75rem; font-weight: 500; letter-spacing: .02em; }
.text-link { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; max-width: 100%; padding: 8px 0; border: 0; background: none; text-align: left; color: inherit; font: inherit; line-height: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.text-link:hover { text-decoration-thickness: 2px; }
.text-link .icon { width: 16px; height: 16px; }
.nav-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding-inline: 4px; border-radius: 50%; background: hsl(var(--card)); color: hsl(var(--foreground)); font-size: .6875rem; }
.main-nav > span.active { display: inline-flex; align-items: center; min-height: 44px; position: relative; font-size: .875rem; }
.review-ribbon { display: flex; align-items: center; justify-content: space-between; gap: 6px 20px; padding: 3px max(24px, calc((100vw - 1236px) / 2)); background: hsl(var(--card)); color: hsl(var(--muted-foreground)); font-size: .75rem; line-height: 1.5; }
.review-ribbon > .row { gap: 8px; }
.review-ribbon .badge { font-size: .6875rem; padding: 3px 7px; }
.review-ribbon .button { font-size: .75rem; padding: 8px; }
.review-ribbon .text-link { font-size: .75rem; text-decoration: none; }
.review-ribbon > span > .status-dot { margin-right: 7px; width: 6px; height: 6px; }
.review-controls { position: relative; z-index: 25; padding: 0; border: 0; flex: none; }
.review-controls > summary { font-size: .75rem; padding: 10px 2px; min-height: 44px; }
.review-menu { position: absolute; top: calc(100% + 6px); right: 0; width: 350px; max-width: calc(100vw - 32px); padding: 21px; border: 1px solid hsl(var(--border)); border-radius: 12px; background: hsl(var(--background)); color: hsl(var(--foreground)); box-shadow: var(--shadow-lg); display: flex; flex-direction: column; gap: 16px; }
.review-menu .button { justify-content: flex-start; }
.review-menu .check { font-size: .8125rem; }
.main { width: 100%; max-width: 1320px; margin: 0 auto; padding: 44px 42px 76px; flex: 1; overflow-wrap: anywhere; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 20px; margin-bottom: 32px; }
.page-heading > div:first-child { max-width: 780px; }
.page-heading h1 { margin-top: 10px; }
.page-heading .lede { margin-top: 14px; max-width: 660px; }
.form-page > .page-heading { display: block; }
.form-page > .page-heading h1 { margin-top: 10px; }
.page-heading > .price { font-size: 1.85rem; }
.page-heading .factline { margin-top: 11px; }
.eyebrow { color: hsl(var(--muted-foreground)); text-transform: uppercase; font-size: .6875rem; letter-spacing: .14em; font-weight: 600; }
.lede { font-size: 1rem; color: hsl(var(--muted-foreground)); line-height: 1.7; max-width: 650px; }
.muted { color: hsl(var(--muted-foreground)); }
.small { font-size: .8125rem; line-height: 1.6; }
.source-note, .provenance { color: hsl(var(--muted-foreground)); font-size: .75rem; line-height: 1.6; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 22px; }
.section-heading .eyebrow + h2 { margin-top: 8px; }
.section-heading h2 { font-size: 1.45rem; }
.section-heading > p { max-width: 400px; }
.stack { display: flex; flex-direction: column; gap: 24px; }
.row, .actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.actions { gap: 9px; }
.split { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.split > div { min-width: 0; }
.grid-2, .grid-3 { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.panel { background: hsl(var(--card)); padding: 26px; border: 1px solid transparent; border-radius: 12px; }
.panel > h2 + p, .panel > h3 + p { margin-top: 10px; }
.panel > .section-heading { margin-bottom: 18px; }
.panel > .eyebrow + h2 { margin-top: 9px; }
.panel > p + p { margin-top: 11px; }
.panel > .policy-summary + .button { margin-top: 21px; }
.panel > .notice { margin-top: 21px; }
.main > .notice + .notice { margin-top: 12px; }
.main > .notice + .page-heading { margin-top: 26px; }
.main > .notice + .plan-layout { margin-top: 28px; }
.main > .brief-chips { margin-bottom: 26px; }
.main > .home-grid + .priority-strip { margin-top: 28px; }
.main > p + .priority-strip { margin-top: 26px; }
.main > .home-grid + p { margin-top: 22px; }
.panel > .panel { padding: 18px 0; background: transparent; border-top: 1px solid hsl(var(--border)); border-radius: 0; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; max-width: 100%; padding: 10px 15px; border: 1px solid hsl(var(--border)); border-radius: 7px; background: transparent; color: hsl(var(--foreground)); font-size: .875rem; font-weight: 500; text-decoration: none; text-align: center; }
.button.primary { color: hsl(var(--primary-foreground)); background: hsl(var(--primary)); border-color: hsl(var(--primary)); }
.button.quiet { color: hsl(var(--muted-foreground)); background: transparent; border-color: transparent; }
.button.danger { color: hsl(var(--state-blocked-fg)); background: hsl(var(--state-blocked-bg)); border-color: transparent; }
.button[aria-pressed='true'] { background: hsl(var(--state-progress-bg)); color: hsl(var(--state-progress-fg)); border-color: hsl(var(--state-progress-fg)); }
.button .icon { width: 18px; height: 18px; }
.button:where(:not(:disabled)):hover { border-color: hsl(var(--foreground)); background: hsl(var(--card)); }
.button.primary:where(:not(:disabled)):hover { background: color-mix(in srgb, hsl(var(--primary)) 86%, hsl(var(--background))); color: hsl(var(--primary-foreground)); }
.button.danger:where(:not(:disabled)):hover { background: hsl(var(--state-blocked-bg)); border-color: hsl(var(--state-blocked-fg)); }
.badge { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; padding: 4px 8px; border-radius: 4px; font-size: .75rem; line-height: 1.5; font-weight: 500; color: hsl(var(--state-neutral-fg)); background: hsl(var(--state-neutral-bg)); }
.badge.success { color: hsl(var(--state-success-fg)); background: hsl(var(--state-success-bg)); }
.badge.warn { color: hsl(var(--state-warn-fg)); background: hsl(var(--state-warn-bg)); }
.badge.progress { color: hsl(var(--state-progress-fg)); background: hsl(var(--state-progress-bg)); }
.badge.blocked { color: hsl(var(--state-blocked-fg)); background: hsl(var(--state-blocked-bg)); }
.status-dot { width: 7px; height: 7px; display: inline-block; flex: none; border-radius: 50%; background: currentColor; }
.notice { padding: 16px 18px; border-left: 3px solid hsl(var(--state-progress-fg)); border-radius: 0 7px 7px 0; background: hsl(var(--state-progress-bg)); color: hsl(var(--state-progress-fg)); font-size: .875rem; line-height: 1.65; }
.notice.warn, .notice.warning { color: hsl(var(--state-warn-fg)); background: hsl(var(--state-warn-bg)); border-left-color: hsl(var(--state-warn-fg)); }
.notice.blocked, .notice.error { color: hsl(var(--state-blocked-fg)); background: hsl(var(--state-blocked-bg)); border-left-color: hsl(var(--state-blocked-fg)); }
.notice.success { color: hsl(var(--state-success-fg)); background: hsl(var(--state-success-bg)); border-left-color: hsl(var(--state-success-fg)); }
.notice p + p { margin-top: 7px; }
.notice .muted { color: inherit; }
.notice .button { color: inherit; border-color: currentColor; }
.empty-state { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; padding: 40px 30px; border: 1px dashed var(--journey-control); border-radius: 12px; }
.empty-state > .icon { width: 30px; height: 30px; color: hsl(var(--muted-foreground)); }
.empty-state p { max-width: 580px; color: hsl(var(--muted-foreground)); }
.empty-state.compact { padding: 20px 23px; }
.footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 28px; width: calc(100% - 84px); max-width: 1236px; margin: auto; padding: 23px 0; border-top: 1px solid hsl(var(--border)); font-size: .75rem; color: hsl(var(--muted-foreground)); }

/* The opening invitation is conversational, with authentic Scottish photography. */
.welcome { display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr); gap: 58px; align-items: stretch; }
.welcome-copy { padding: 15px 0 10px; }
.welcome h1 { margin: 18px 0 22px; font-size: clamp(2.9rem, 4.7vw, 4.2rem); line-height: 1.06; letter-spacing: -.06em; max-width: 560px; }
.welcome .lede { max-width: 460px; font-size: 1.0625rem; }
.composer { display: flex; flex-direction: column; gap: 10px; margin-top: 29px; padding: 21px; border: 1px solid var(--journey-control); border-radius: 14px; background: var(--journey-surface); box-shadow: 0 10px 32px rgba(13,31,74,.055); }
.composer label { font-size: .8125rem; font-weight: 600; }
.composer textarea { display: block; width: 100%; min-height: 106px; border: 0; padding: 7px 0; background: transparent; font-size: 1rem; line-height: 1.65; resize: vertical; }
.composer textarea::placeholder { color: hsl(var(--muted-foreground)); opacity: 1; }
.composer:focus-within { box-shadow: 0 0 0 1px var(--journey-focus), 0 10px 32px rgba(13,31,74,.055); }
.composer textarea:focus-visible { outline-offset: 2px; border-radius: 3px; }
.composer-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.composer-footer .small { max-width: 190px; font-size: .75rem; color: hsl(var(--muted-foreground)); }
.sample-prompts { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 17px; }
.sample-prompts .button { padding: 9px 12px; font-size: .75rem; border-radius: 24px; }
.trust-line { display: flex; align-items: flex-start; gap: 8px; margin-top: 23px; color: hsl(var(--muted-foreground)); font-size: .75rem; }
.trust-line .icon { width: 16px; height: 16px; margin-top: 2px; }
.welcome-photo { position: relative; min-height: 580px; max-height: 780px; width: 100%; padding: 0; border: 0; border-radius: 14px; overflow: hidden; text-align: left; background: hsl(var(--sidebar)); color: hsl(var(--sidebar-foreground)); }
.welcome-photo > img, .welcome-photo > picture > img { width: 100%; height: 100%; position: absolute; inset: 0; object-fit: cover; object-position: 58% center; }
.photo-label { display: inline-block; position: absolute; top: 21px; left: 21px; padding: 6px 9px; border-radius: 4px; background: #f4f1ec; color: #0d1f4a; font-size: .6875rem; font-weight: 500; max-width: calc(100% - 42px); }
.welcome-photo-caption { display: flex; flex-direction: column; gap: 7px; position: absolute; bottom: 0; left: 0; right: 0; padding: 25px 27px; background: hsl(var(--sidebar)); color: hsl(var(--sidebar-foreground)); }
.welcome-photo-caption strong { font: 500 1.35rem/1.35 var(--app-font-serif); letter-spacing: -.035em; }
.welcome-photo-caption .small, .welcome-photo-caption .source-note { color: hsl(var(--sidebar-foreground)); font-size: .75rem; }
.welcome-photo-caption > span { display: flex; flex-direction: column; gap: 6px; }
.welcome-photo-caption > span > small, .welcome-photo-caption > span > span { font-size: .75rem; }
.welcome-photo-caption .button { align-self: flex-start; background: hsl(var(--sidebar-foreground)); color: hsl(var(--sidebar)); border-color: hsl(var(--sidebar-foreground)); margin-top: 9px; }
.welcome-photo-caption .button:hover { background: hsl(var(--sidebar-foreground) / .9); }
.intro-steps { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 34px; margin-top: 58px; padding-top: 29px; border-top: 1px solid hsl(var(--border)); }
.intro-step { display: flex; align-items: flex-start; gap: 13px; }
.intro-step > .icon { margin-top: 3px; color: hsl(var(--muted-foreground)); }
.intro-step h3 { font-size: 1rem; margin-bottom: 6px; }
.intro-step p { font-size: .8125rem; color: hsl(var(--muted-foreground)); }
.welcome-copy .intro-steps { grid-template-columns: 1fr; gap: 11px; margin-top: 27px; padding-top: 23px; }
.welcome-copy .intro-step { align-items: baseline; gap: 13px; }
.welcome-copy .intro-step > span { font-size: .6875rem; color: hsl(var(--muted-foreground)); font-variant-numeric: tabular-nums; }
.welcome-copy .intro-step > strong { font-size: .8125rem; font-weight: 400; }
.sample-prompts > span { width: 100%; font-size: .75rem; }
.welcome-preview { margin-top: 50px; padding-top: 31px; border-top: 1px solid hsl(var(--border)); }
.welcome-preview h2 { margin-top: 9px; margin-bottom: 12px; }
.welcome-preview > div { max-width: 670px; }
.welcome-preview > .button { flex: none; }

/* A continuing plan with a restrained concierge rail. */
.plan-layout, .stakeholder-layout { display: grid; grid-template-columns: minmax(0, 1fr) 325px; gap: 36px; align-items: start; }
.plan-main, .stakeholder-main { display: flex; flex-direction: column; gap: 36px; }
.plan-aside, .stakeholder-aside { display: flex; flex-direction: column; gap: 22px; }
.plan-aside > .panel, .stakeholder-aside > .panel { padding: 23px; }
.plan-aside h2, .stakeholder-aside h2 { font-size: 1.25rem; }
.plan-aside .section-heading, .stakeholder-aside .section-heading { margin-bottom: 17px; }
.agent-card { background: hsl(var(--sidebar)); color: hsl(var(--sidebar-foreground)); padding: 24px; border-radius: 12px; position: relative; overflow: hidden; }
.agent-card::before { content: ''; height: 2px; position: absolute; inset: 0 0 auto; background: var(--signal-gradient); }
.agent-card .eyebrow, .agent-card .muted, .agent-card .small { color: hsl(var(--sidebar-foreground)); }
.agent-card h2 { font-size: 1.4rem; margin: 14px 0 10px; }
.agent-card p { font-size: .875rem; line-height: 1.7; }
.agent-card .button { color: hsl(var(--sidebar-foreground)); border-color: hsl(var(--sidebar-foreground) / .4); }
.agent-card .button.primary { color: hsl(var(--sidebar)); background: hsl(var(--sidebar-foreground)); border-color: hsl(var(--sidebar-foreground)); }
.agent-card .button:hover { background: hsl(var(--sidebar-accent)); }
.agent-card .button.primary:hover { color: hsl(var(--sidebar)); background: hsl(var(--sidebar-foreground) / .9); }
.agent-card .actions { margin-top: 20px; }
.agent-avatar { width: 38px; height: 38px; display: grid; place-items: center; flex: none; border-radius: 10px; background: hsl(var(--sidebar-accent)); border: 1px solid hsl(var(--sidebar-foreground) / .2); }
.agent-avatar .icon { width: 19px; height: 19px; }
.agent-line { display: flex; align-items: center; gap: 12px; }
.agent-line strong { display: block; font-size: .875rem; }
.agent-note { display: flex; gap: 10px; padding-top: 17px; margin-top: 18px; border-top: 1px solid hsl(var(--sidebar-foreground) / .2); font-size: .75rem; }
.agent-note .icon { width: 16px; height: 16px; margin-top: 2px; }
.main > .agent-card { display: grid; grid-template-columns: 42px minmax(0,1fr) auto; align-items: center; gap: 20px; padding: 26px 28px; margin-bottom: 35px; }
.main > .agent-card .agent-line { display: block; }
.main > .agent-card h2 { margin: 8px 0 9px; font-size: 1.55rem; }
.main > .agent-card p:not(.eyebrow) { max-width: 760px; }
.main > .agent-card .agent-avatar { width: 42px; height: 42px; border: 0; background: none; align-self: start; margin-top: 4px; }
.main > .agent-card .agent-avatar img { filter: brightness(0) invert(1); }
.main > .agent-card > .button { font-size: .8125rem; }
.form-page > .agent-note { margin: 0 0 25px; padding: 20px 22px; border: 1px solid hsl(var(--border)); background: hsl(var(--card)); border-radius: 8px; font-size: .875rem; }
.form-page > .agent-note img { width: 26px; height: 26px; flex: none; }
.form-page > .agent-note p { margin-top: 6px; line-height: 1.7; }
.form-page > .notice { margin-bottom: 25px; }
.plan-aside > .agent-note { border-color: hsl(var(--border)); margin-top: 0; padding-top: 0; border: 0; }
.plan-aside > .agent-note strong { font-weight: 500; font-size: .8125rem; }
.plan-aside > .agent-note p { margin-top: 6px; }
.plan-main > section > .grid-2 + .actions { margin-top: 23px; }
.priority-strip { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 21px 24px; background: hsl(var(--card)); border-radius: 10px; }
.priority-strip > .icon { color: hsl(var(--muted-foreground)); }
.priority-strip h2 { font-size: 1.2rem; margin-bottom: 5px; }
.priority-strip p { font-size: .875rem; color: hsl(var(--muted-foreground)); }
.priority-strip > div > span { display: block; font-size: .8125rem; color: hsl(var(--muted-foreground)); margin-top: 4px; }
.priority-strip > .button { flex: none; }
.brief-chips { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border-radius: 5px; background: hsl(var(--card)); color: hsl(var(--muted-foreground)); font-size: .75rem; line-height: 1.5; }
.decision-card { padding: 21px 0; border-top: 1px solid hsl(var(--border)); }
.decision-card:first-child { padding-top: 0; border-top: 0; }
.decision-card p { margin-top: 8px; }
.decision-card .actions { margin-top: 14px; }
.policy-summary { display: grid; gap: 14px; font-size: .8125rem; }
.policy-summary > div { display: flex; align-items: flex-start; gap: 10px; }
.policy-summary .icon { width: 17px; height: 17px; margin-top: 2px; color: hsl(var(--muted-foreground)); }
.policy-summary dt { color: hsl(var(--muted-foreground)); }
.policy-summary dd { margin: 0; }

/* Properties retain visual confidence without becoming a wall of containers. */
.home-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 34px 24px; }
.property-card { display: flex; flex-direction: column; gap: 14px; padding-bottom: 24px; border-bottom: 1px solid hsl(var(--border)); }
.property-card.is-selected { border-bottom-color: hsl(var(--state-progress-fg)); }
.property-visual { position: relative; overflow: hidden; border-radius: 9px; }
.photo-button, button.property-photo { position: relative; display: block; padding: 0; border: 0; width: 100%; border-radius: 9px; overflow: hidden; background: hsl(var(--card)); }
img.property-photo, .property-photo > img, .photo-button > img { width: 100%; aspect-ratio: 1.55; object-fit: cover; border-radius: 9px; }
.property-card > .property-photo { border-radius: 9px; }
.save-button { position: absolute; z-index: 1; top: 12px; right: 12px; display: grid; place-items: center; width: 44px; height: 44px; min-height: 44px; padding: 0; border: 0; border-radius: 50%; background: #f4f1ec; color: #0d1f4a; box-shadow: var(--shadow-sm); }
.save-button[aria-pressed='true'] .icon { fill: currentColor; }
.property-meta { display: flex; flex-direction: column; flex: 1; gap: 10px; }
.property-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.property-heading h3, .property-meta h3 { font-size: 1.22rem; }
.property-heading h2 { font-size: 1.35rem; }
.property-heading .text-link { padding: 0; min-height: 44px; text-decoration: none; }
.property-heading .text-link:hover { text-decoration: underline; }
.property-heading .small { color: hsl(var(--muted-foreground)); margin-top: 3px; }
.price { font: 500 1.2rem/1.4 var(--app-font-serif); letter-spacing: -.035em; }
.price small, .price > span { display: block; color: hsl(var(--muted-foreground)); font: 400 .6875rem/1.5 var(--app-font-sans); letter-spacing: 0; margin-bottom: 2px; }
.factline { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px; font-size: .8125rem; color: hsl(var(--muted-foreground)); }
.factline > span { display: inline-flex; align-items: center; gap: 6px; }
.factline .icon { width: 16px; height: 16px; }
.fit-note { display: flex; align-items: flex-start; gap: 9px; background: hsl(var(--card)); border-radius: 6px; padding: 12px 14px; font-size: .8125rem; line-height: 1.6; }
.fit-note strong { font-size: .75rem; }
.fit-note > .icon { width: 17px; height: 17px; margin-top: 2px; }
.fit-note p + p { margin-top: 5px; }
.property-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-top: auto; }
.property-actions .button { padding: 9px 11px; font-size: .8125rem; }
.property-actions > .button { flex: 1 1 135px; }
.listing-status { display: flex; align-items: baseline; gap: 7px; color: hsl(var(--muted-foreground)); }
.listing-status strong { color: hsl(var(--foreground)); font-weight: 500; }
.selected-state { padding: 9px 11px; border-radius: 5px; background: hsl(var(--state-progress-bg)); color: hsl(var(--state-progress-fg)); font-size: .75rem; line-height: 1.6; }
.card-details { padding-top: 0; }
.card-details > summary { padding-block: 11px; font-size: .8125rem; }
.card-details > summary:hover { text-decoration: underline; text-underline-offset: 4px; }
.card-details > .stack { gap: 12px; margin-top: 3px; padding-bottom: 9px; }
.card-details .fit-note { margin: 0; padding: 11px 12px; }
.catalogue-group { margin-block: 31px; }
.catalogue-group > .section-heading { align-items: flex-start; flex-wrap: wrap; gap: 9px 20px; margin-bottom: 21px; }
.catalogue-group > .section-heading h2 { font-size: 1.35rem; }
.catalogue-group > .section-heading p { max-width: 700px; margin-top: 6px; font-size: .8125rem; color: hsl(var(--muted-foreground)); }
.catalogue-group > .section-heading > .badge { flex: none; }
.mini-home { display: flex; align-items: center; gap: 12px; }
.mini-home img { width: 72px; height: 60px; object-fit: cover; border-radius: 6px; flex: none; }
.mini-home h3, .mini-home strong { font-size: .9375rem; font-weight: 500; line-height: 1.4; }
.mini-home .small { display: block; font-size: .75rem; margin-top: 3px; }
.mini-home .button { margin-left: auto; padding-inline: 10px; }
.need-row { display: flex; flex-direction: column; gap: 8px; padding: 15px 0; border-bottom: 1px solid hsl(var(--border)); }
.need-row:last-child { border-bottom: 0; padding-bottom: 0; }
.need-row:first-child { padding-top: 0; }
.need-row > .row, .need-row > .split { justify-content: space-between; align-items: flex-start; }
.need-row strong { font-size: .875rem; }
.need-row p { font-size: .8125rem; }
.need-row .source-note { font-size: .6875rem; }
.need-row .badge + h3 { margin-top: 10px; }
.need-row h3 + p { margin-top: 7px; }
.need-row p + .provenance { margin-top: 8px; }
.detail-layout h2 + .need-row { margin-top: 24px; }
.need-row form { margin-top: 8px; }
.gallery { display: grid; grid-template-columns: 1.7fr 1fr; grid-template-rows: repeat(2, minmax(0,1fr)); gap: 10px; height: 395px; overflow: hidden; border-radius: 11px; }
.gallery > .gallery-main { grid-row: 1 / 3; }
.gallery > :first-child { grid-row: 1 / 3; }
.gallery > button { padding: 0; border: 0; background: hsl(var(--card)); overflow: hidden; position: relative; }
.gallery img { width: 100%; height: 100%; object-fit: cover; }
.gallery > .gallery-small { grid-row: 1 / 3; display: grid; grid-template-rows: repeat(2,minmax(0,1fr)); gap: 10px; min-height: 0; }
.gallery-small > .photo-button { height: 100%; min-height: 0; border-radius: 0; }
.gallery-small > .photo-button:only-child { grid-column: 1 / -1; grid-row: 1 / -1; }
.gallery-small img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; }
.gallery > .gallery-main { border-radius: 0; }
.gallery-credit { display: flex; justify-content: space-between; gap: 10px; margin-top: 10px; color: hsl(var(--muted-foreground)); font-size: .6875rem; }
.detail-layout { display: grid; grid-template-columns: minmax(0,1fr) 345px; gap: 48px; align-items: start; margin-top: 34px; }
.detail-layout h2 { font-size: 1.45rem; }
.detail-layout > .stack > section { padding-top: 25px; border-top: 1px solid hsl(var(--border)); }
.detail-layout > aside { position: sticky; top: 25px; }
.detail-layout > aside { display: flex; flex-direction: column; gap: 23px; }
.detail-layout > .property-decision-aside { grid-column: 2; grid-row: 1; }
.detail-layout > .property-detail-main { grid-column: 1; grid-row: 1; }
.detail-layout .decision-card { display: flex; flex-direction: column; align-items: stretch; gap: 16px; padding: 25px; }
.detail-layout .decision-card h2, .detail-layout .decision-card p, .detail-layout .decision-card .button { margin: 0; }
.detail-layout .provenance { font-size: .8125rem; }
.detail-layout .provenance .text-link { margin-top: 10px; }
.feature-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 12px; margin: 21px 0; }
.feature-list > li { display: flex; align-items: flex-start; gap: 10px; margin: 0; font-size: .875rem; }
.feature-list .icon { width: 17px; height: 17px; margin-top: 3px; color: hsl(var(--muted-foreground)); }
.detail-layout .grid-2 h3 { margin-bottom: 9px; }
.detail-layout .grid-2 p { font-size: .875rem; }
.table-scroll { overflow-x: auto; border: 1px solid hsl(var(--border)); border-radius: 9px; overscroll-behavior-x: contain; }
.compare-table { width: 100%; border-collapse: collapse; font-size: .875rem; text-align: left; }
.compare-table th, .compare-table td { padding: 19px; vertical-align: top; border-bottom: 1px solid hsl(var(--border)); min-width: 210px; }
.compare-table th { font-weight: 500; background: hsl(var(--card)); }
.compare-table th:first-child { min-width: 150px; max-width: 200px; }
.compare-table tr:last-child > * { border-bottom: 0; }
.compare-table img { width: 100%; aspect-ratio: 1.65; object-fit: cover; border-radius: 6px; margin-bottom: 12px; }
.compare-table .need-row { font-size: .8125rem; }
.compare-table h2 { font-size: 1.15rem; }
.compare-table td p + p { margin-top: 15px; }
.table-scroll + .source-note { margin-top: 18px; }
.compare-mobile { display: none; }
.compare-mobile + .source-note { margin-top: 19px; }

/* Scheduling makes agreement, travel and pending decisions visible. */
.slot-option { display: flex; flex-direction: column; gap: 18px; width: 100%; padding: 24px; border: 1px solid var(--journey-control); border-radius: 11px; background: var(--journey-surface); text-align: left; }
.slot-option.selected, .slot-option[aria-pressed='true'] { border: 2px solid hsl(var(--foreground)); padding: 23px; background: hsl(var(--card)); }
.slot-option h3 { font-size: 1.25rem; }
.slot-option .actions { padding-top: 2px; }
.slot-option .mini-home img { width: 60px; height: 50px; }
.slot-option + .slot-option { margin-top: 19px; }
.slot-option > .section-heading { margin-bottom: 0; }
.slot-option .eyebrow + h3 { margin-top: 7px; }
.itinerary { display: flex; flex-direction: column; gap: 0; margin: 0; padding: 0; list-style: none; }
.itinerary > li { margin-top: 0; }
.itinerary-stop { display: grid; grid-template-columns: 155px minmax(0,1fr); gap: 16px; position: relative; padding: 15px 0; align-items: start; }
.itinerary-stop > time, .itinerary-stop > .time { font-size: .875rem; font-weight: 500; padding-top: 3px; }
.itinerary-stop > div { border-left: 2px solid hsl(var(--border)); padding-left: 19px; }
.itinerary-stop > .itinerary-time { border-left: 0; padding: 2px 0 0; }
.itinerary-time strong { display: block; font-size: .8125rem; line-height: 1.6; font-weight: 500; }
.itinerary-time span { display: block; font-size: .6875rem; margin-top: 4px; }
.itinerary-stop .mini-home p { font-size: .75rem; margin-top: 4px; }
.itinerary-stop h3 { font-size: 1.1rem; }
.itinerary-stop .badge { margin-top: 7px; }
.travel-leg { display: flex; align-items: center; gap: 8px; margin: 0 0 0 172px; padding: 8px 0 8px 19px; color: hsl(var(--muted-foreground)); font-size: .75rem; border-left: 2px dotted hsl(var(--border)); }
.travel-leg .icon { width: 15px; height: 15px; }
.week-grid { display: grid; grid-template-columns: repeat(7, minmax(0,1fr)); gap: 7px; }
.day-column { display: flex; flex-direction: column; gap: 7px; min-height: 125px; padding: 11px 7px; border: 1px solid hsl(var(--border)); border-radius: 6px; background: var(--journey-surface); }
.day-column > strong, .day-column > span:first-child { font-size: .6875rem; text-align: center; font-weight: 500; }
.day-column > .small { font-size: .6875rem; text-align: center; }
.time-block { display: block; padding: 7px 4px; border-radius: 4px; background: hsl(var(--state-progress-bg)); color: hsl(var(--state-progress-fg)); font-size: .625rem; line-height: 1.45; text-align: center; overflow-wrap: anywhere; }
.time-block.success { background: hsl(var(--state-success-bg)); color: hsl(var(--state-success-fg)); }
.time-block.warn { background: hsl(var(--state-warn-bg)); color: hsl(var(--state-warn-fg)); }
.booking-card, .appointment-card { display: flex; flex-direction: column; gap: 17px; padding: 24px 0; border-bottom: 1px solid hsl(var(--border)); }
.booking-card:first-child, .appointment-card:first-child { padding-top: 0; }
.booking-card:last-child, .appointment-card:last-child { padding-bottom: 0; border-bottom: 0; }
.booking-card .mini-home img { width: 100px; height: 80px; }
.booking-card h3 { font-size: 1.18rem; }
.booking-card .actions { gap: 7px; }
.booking-card .source-note { margin-top: -5px; }
.booking-card.panel { padding: 24px; border: 1px solid transparent; }
.booking-card.panel:first-child, .booking-card.panel:last-child { padding: 24px; }
.booking-card.panel + .booking-card.panel { margin-top: 19px; }
.plan-main > .booking-card.panel + .booking-card.panel { margin-top: 0; }
.booking-card.panel .section-heading { margin-bottom: 0; align-items: flex-start; }
.booking-card.panel .mini-home p:not(.eyebrow) { font-size: .8125rem; margin-top: 5px; }
.booking-card.panel .mini-home .eyebrow { font-size: .625rem; margin-bottom: 4px; }
.share-receipt { padding: 20px; background: hsl(var(--background)); border: 1px solid hsl(var(--border)); border-radius: 8px; }
.share-receipt h3 { font-size: 1rem; }
.share-receipt p { margin-top: 10px; font-size: .875rem; }
.share-receipt p.small { font-size: .75rem; }
.appointment-list { display: flex; flex-direction: column; }
.appointment-time { font-size: .875rem; font-weight: 600; }
.appointment-meta { display: flex; flex-wrap: wrap; gap: 5px 16px; color: hsl(var(--muted-foreground)); font-size: .8125rem; }
.appointment-card > .row { justify-content: space-between; }

/* Form structure is shared across buyer permissions and seller policy. */
.form-page { max-width: 850px; margin-inline: auto; }
.field { display: flex; flex-direction: column; gap: 8px; font-size: .8125rem; font-weight: 500; }
.field input, .field select, .field textarea { display: block; width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid var(--journey-control); border-radius: 6px; background: hsl(var(--background)); font-size: 1rem; font-weight: 400; line-height: 1.5; }
.field textarea { min-height: 105px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: hsl(var(--muted-foreground)); opacity: 1; }
.field input[type='checkbox'], .field input[type='radio'] { width: 19px; height: 19px; min-height: 19px; flex: none; }
.field-hint { color: hsl(var(--muted-foreground)); font-size: .75rem; font-weight: 400; }
.field-error { color: hsl(var(--state-blocked-fg)); background: hsl(var(--state-blocked-bg)); padding: 6px 9px; border-radius: 4px; font-size: .8125rem; }
.form-error { grid-column: 1 / -1; width: 100%; padding: 15px 17px; border: 1px solid hsl(var(--state-blocked-fg)); border-left-width: 3px; border-radius: 0 7px 7px 0; color: hsl(var(--state-blocked-fg)); background: hsl(var(--state-blocked-bg)); font-size: .875rem; line-height: 1.6; overflow-wrap: anywhere; }
.form-error:empty { display: none; }
.form-error > p + p, .form-error > p + .actions { margin-top: 9px; }
.form-error a { color: inherit; }
form > .form-error:first-child { margin-bottom: 4px; }
.field [aria-invalid='true'] { border: 2px solid hsl(var(--state-blocked-fg)); }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; }
.form-grid > .full, .form-grid > .actions, .form-grid > .notice { grid-column: 1 / -1; }
.window-fields { grid-template-columns: 1.4fr 1fr 1fr; gap: 15px; margin-top: 21px; }
.window-fields + .window-fields { padding-top: 19px; border-top: 1px solid hsl(var(--border)); }
.window-fields + .field { margin-top: 23px; max-width: 320px; }
.check { display: flex; align-items: flex-start; gap: 11px; min-height: 44px; padding: 9px 0; font-size: .875rem; font-weight: 400; cursor: pointer; }
.check input { flex: none; width: 19px; height: 19px; margin: 3px 0 0; }
.check .small, .check small { display: block; margin-top: 3px; color: hsl(var(--muted-foreground)); font-size: .75rem; }
.check strong { display: block; font-size: .875rem; }
.check + .check { border-top: 1px solid hsl(var(--border)); }
.inline-form { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 12px; }
.inline-form .field { flex: 1 1 190px; }
.inline-form .button { flex: 0 1 auto; }
.inline-form > .form-error, .ownership-form > .form-error { flex-basis: 100%; }
.ownership-form { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 10px; }
.ownership-form .field { flex: 1; min-width: 160px; }
.ownership-form .button { padding-inline: 11px; }
.seller-window { display: block; }
.seller-window legend { font-size: .8125rem; margin-bottom: 12px; }
.seller-window > .form-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
.seller-window > .form-grid > .field:first-child { grid-column: 1 / -1; }
details { border-top: 1px solid hsl(var(--border)); padding-top: 12px; }
summary { cursor: pointer; min-height: 44px; padding: 10px 0; font-size: .875rem; font-weight: 500; }
details > p, details > form, details > .stack { margin-top: 13px; }
.details-panel { padding: 16px 0; }
.tabs { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; padding: 4px; border: 1px solid hsl(var(--border)); border-radius: 8px; }
.tabs > button { min-height: 44px; padding: 10px 15px; border: 0; border-radius: 5px; background: transparent; color: hsl(var(--muted-foreground)); font-size: .875rem; }
.tabs > :is(.active, [aria-selected='true'], [aria-pressed='true']) { background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); }

/* Staff see exceptions and attributed work; sellers see the effect at home. */
.property-tabs { display: flex; gap: 11px; margin-bottom: 28px; flex-wrap: wrap; }
.property-tab { display: flex; align-items: center; gap: 12px; padding: 12px 15px; min-height: 65px; background: transparent; border: 1px solid hsl(var(--border)); border-radius: 8px; text-align: left; flex: 1 1 230px; }
.property-tab img { width: 50px; height: 43px; object-fit: cover; border-radius: 4px; }
.property-tab strong { font-size: .875rem; font-weight: 500; }
.property-tab .small { display: block; margin-top: 2px; font-size: .6875rem; }
.property-tab.active, .property-tab[aria-pressed='true'] { border-color: hsl(var(--foreground)); box-shadow: inset 0 0 0 1px hsl(var(--foreground)); background: hsl(var(--card)); }
.seller-home-card { overflow: hidden; border-radius: 11px; background: hsl(var(--card)); }
.seller-home-card > img { width: 100%; height: 215px; object-fit: cover; }
.seller-home-card > div { padding: 0; }
.seller-home-card .source-note { margin-top: 17px; }
.seller-home-card h2 { font-size: 1.35rem; margin: 6px 0 10px; }
.availability-preview { padding: 18px 0; border-top: 1px solid hsl(var(--border)); border-bottom: 1px solid hsl(var(--border)); }
.availability-preview .row { justify-content: space-between; gap: 9px; }
.availability-preview .row + .row { margin-top: 10px; }
.availability-preview > .time-block { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px; padding: 9px 10px; font-size: .75rem; text-align: left; }
.availability-preview > .time-block + .time-block { margin-top: 8px; }
.appointment-time > strong, .appointment-time > span { display: block; }
.appointment-time > span { margin-top: 2px; font-weight: 400; }
.appointment-meta > div > strong, .appointment-meta > div > span { display: block; }
.panel > form.stack { margin-top: 22px; }
.panel > .eyebrow + h3 { margin-top: 9px; }
.panel > p + .button, .panel > .button + p, .panel > .policy-summary, .panel > .policy-summary + p, .panel > p + .actions { margin-top: 18px; }
.stats-row { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); padding: 23px 0; border-top: 1px solid hsl(var(--border)); border-bottom: 1px solid hsl(var(--border)); margin-bottom: 30px; }
.stat { padding: 0 24px; border-left: 1px solid hsl(var(--border)); }
.stat:first-child { padding-left: 0; border-left: 0; }
.stat strong { display: block; font: 500 2rem/1.2 var(--app-font-serif); letter-spacing: -.045em; }
.stat span, .stat .small { display: block; color: hsl(var(--muted-foreground)); font-size: .75rem; margin-top: 7px; }
.work-list { display: flex; flex-direction: column; }
.work-item { padding: 23px 0; border-bottom: 1px solid hsl(var(--border)); }
.work-item:first-child { padding-top: 0; }
.work-item:last-child { padding-bottom: 0; border-bottom: 0; }
.work-item-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 13px; }
.work-item-heading h3 { font-size: 1.12rem; }
.work-item-heading p { margin-top: 5px; }
.work-item-body { display: flex; flex-direction: column; gap: 15px; margin-top: 15px; }
.case-details.details-panel { padding: 0; margin-top: 15px; }
.case-details > summary { padding-block: 13px; font-size: .8125rem; }
.case-details > summary:hover { text-decoration: underline; text-underline-offset: 4px; }
.case-details[open] > summary { margin-bottom: 3px; }
.case-details > .work-item-body { margin-top: 0; padding-bottom: 5px; }
.case-details > .stack { gap: 17px; margin-top: 0; }
.case-details > .ownership-form { margin-top: 17px; }
.branch-commitments { display: flex; flex-direction: column; gap: 0; }
.branch-commitments > .section-heading { margin-bottom: 5px; }
.branch-commitments > p { margin-block: 9px 15px; font-size: .8125rem; }
.commitment-row { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 15px 0; border-top: 1px solid hsl(var(--border)); font-size: .8125rem; line-height: 1.6; }
.commitment-row > strong { font-weight: 500; }
.commitment-row p, .commitment-row time, .commitment-row > span { font-size: .75rem; color: hsl(var(--muted-foreground)); }
.commitment-row time { font-variant-numeric: tabular-nums; }
.commitment-row > div > p + p { margin-top: 4px; }
.branch-commitments > .source-note { padding-top: 13px; margin-top: 0; border-top: 1px solid hsl(var(--border)); font-size: .75rem; }
.buyer-shell .work-item { display: flex; align-items: flex-start; gap: 13px; }
.buyer-shell .work-item > .status-dot { margin-top: 9px; color: hsl(var(--state-warn-fg)); }
.buyer-shell .work-item > div { flex: 1; }
.buyer-shell .work-item strong { font-size: .875rem; }
.buyer-shell .work-item p { font-size: .8125rem; color: hsl(var(--muted-foreground)); margin-top: 6px; }
.buyer-shell .work-item + .small { margin-top: 20px; }
.workflow-summary { display: flex; align-items: flex-start; gap: 13px; padding: 19px 0; border-bottom: 1px solid hsl(var(--border)); }
.workflow-summary:last-child { border-bottom: 0; padding-bottom: 0; }
.workflow-summary > .icon { width: 19px; height: 19px; margin-top: 2px; color: hsl(var(--muted-foreground)); }
.workflow-summary strong { font-size: .875rem; }
.workflow-summary p { font-size: .8125rem; color: hsl(var(--muted-foreground)); margin-top: 4px; }
.avatar-stack { display: flex; align-items: center; }
.avatar-stack > span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: hsl(var(--card)); border: 2px solid hsl(var(--background)); font-size: .625rem; font-weight: 600; }
.avatar-stack > span + span { margin-left: -7px; }
.service-mark { display: inline-flex; align-items: center; gap: 8px; font-size: .75rem; color: hsl(var(--muted-foreground)); }
.service-mark img { width: 21px; height: 21px; object-fit: contain; }
.timeline, .activity-list { list-style: none; margin: 0; padding: 0; }
.timeline li, .activity-entry { position: relative; padding: 0 0 23px 21px; border-left: 1px solid hsl(var(--border)); }
.timeline li::before, .activity-entry::before { content: ''; position: absolute; left: -4px; top: 8px; width: 7px; height: 7px; border-radius: 50%; background: hsl(var(--muted-foreground)); }
.timeline li:last-child, .activity-entry:last-child { padding-bottom: 0; }
.timeline li + li { margin-top: 0; }
.timeline strong, .activity-entry strong { display: block; font-size: .8125rem; font-weight: 500; }
.timeline p, .activity-entry p { color: hsl(var(--muted-foreground)); font-size: .75rem; margin-top: 5px; }
.timeline time, .activity-entry time { display: block; font-size: .6875rem; color: hsl(var(--muted-foreground)); margin-top: 6px; }
.activity-list > li:not(.activity-entry) { padding: 15px 0; border-bottom: 1px solid hsl(var(--border)); }
.activity-list > li:not(.activity-entry):first-child { padding-top: 0; }
.activity-list > li:not(.activity-entry):last-child { padding-bottom: 0; border: 0; }
.activity-list > li strong { font-size: .8125rem; }
.activity-list > li p { font-size: .75rem; color: hsl(var(--muted-foreground)); margin-top: 4px; }
.activity-entry > .status-dot { display: none; }
.agent-card .activity-list, .agent-card .timeline { margin-top: 23px; }
.agent-card :is(.activity-entry p, .timeline p, .timeline time, .activity-entry time, .source-note) { color: hsl(var(--sidebar-foreground)); }
.agent-card .activity-entry, .agent-card .timeline li, .agent-card .availability-preview { border-color: hsl(var(--sidebar-foreground) / .3); }
.agent-card .activity-entry::before, .agent-card .timeline li::before { background: hsl(var(--sidebar-foreground)); }
.activity-list.timeline > li { padding: 0 0 24px 22px; border-bottom: 0; border-left: 1px solid hsl(var(--border)); }
.activity-list.timeline > li:first-child { padding-top: 0; }
.activity-list.timeline > li:last-child { padding-bottom: 0; border-bottom: 0; border-left: 1px solid hsl(var(--border)); }
.activity-list.timeline > li > .status-dot { display: none; }
.activity-list.timeline .small { display: block; font-size: .6875rem; margin-top: 7px; }

/* Dialogs remain usable on a short phone screen and at zoom. */
.dialog-backdrop { position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(6,16,39,.62); overflow-y: auto; }
.dialog { display: flex; flex-direction: column; width: min(650px,100%); max-height: calc(100dvh - 48px); border: 1px solid hsl(var(--border)); border-radius: 14px; background: hsl(var(--background)); color: hsl(var(--foreground)); box-shadow: var(--shadow-lg); overflow: hidden; }
.dialog.wide { width: min(920px,100%); }
.dialog.dialog-wide { width: min(920px,100%); }
.dialog-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 24px 28px 20px; border-bottom: 1px solid hsl(var(--border)); flex: none; }
.dialog-header h2 { font-size: 1.5rem; }
.dialog-header p { margin-top: 7px; color: hsl(var(--muted-foreground)); font-size: .875rem; }
.dialog-header > .button { width: 44px; padding: 10px; flex: none; margin: -6px -10px 0 0; }
.dialog-body { min-height: 0; padding: 26px 28px; overflow-y: auto; overscroll-behavior: contain; }
.dialog-body > form { display: flex; flex-direction: column; gap: 22px; }
.dialog-body > * + * { margin-top: 22px; }
.dialog-body > form > .actions { margin-top: 0; }
.dialog-header > .icon-button { margin: -7px -9px 0 0; }
.dialog-body > img { max-height: 65dvh; width: 100%; object-fit: contain; }
.dialog-footer { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 10px; padding: 18px 28px; border-top: 1px solid hsl(var(--border)); flex: none; background: hsl(var(--background)); }
.dialog-footer .small { margin-right: auto; max-width: 330px; color: hsl(var(--muted-foreground)); }
.review-panel { display: flex; flex-direction: column; gap: 23px; }
.review-panel > section + section { padding-top: 21px; border-top: 1px solid hsl(var(--border)); }
.review-panel h3 { margin-bottom: 10px; }
.scenario-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.scenario-button { position: relative; display: flex; flex-direction: column; gap: 8px; width: 100%; padding: 19px 44px 19px 19px; border: 1px solid hsl(var(--border)); border-radius: 8px; background: var(--journey-surface); color: hsl(var(--foreground)); text-align: left; }
.scenario-button strong { font: 500 1.05rem/1.4 var(--app-font-serif); letter-spacing: -.025em; }
.scenario-button span { font-size: .8125rem; color: hsl(var(--muted-foreground)); line-height: 1.6; }
.scenario-button .icon { position: absolute; right: 17px; top: 20px; width: 17px; height: 17px; }
.scenario-button:hover { border-color: hsl(var(--foreground)); background: hsl(var(--card)); }
.photo-modal { margin: 0; }
.photo-modal img { width: 100%; height: min(58dvh,600px); object-fit: contain; border-radius: 5px; background: hsl(var(--card)); }
.photo-modal figcaption { font-size: .75rem; color: hsl(var(--muted-foreground)); margin-top: 11px; }
.receipt-list { display: grid; grid-template-columns: 160px minmax(0,1fr); gap: 17px 24px; margin: 24px 0; padding: 22px 0; border-top: 1px solid hsl(var(--border)); border-bottom: 1px solid hsl(var(--border)); font-size: .875rem; }
.receipt-list dt { color: hsl(var(--muted-foreground)); }
.receipt-list dd { margin: 0; }
.receipt-list dd p + p { margin-top: 8px; }
.calendar-preview, .message-preview { display: flex; flex-direction: column; align-items: flex-start; gap: 17px; padding: 23px; border-radius: 9px; background: hsl(var(--card)); }
.calendar-preview > .icon { width: 28px; height: 28px; }
.calendar-preview p, .message-preview p { font-size: .875rem; }
.calendar-preview .week-grid { grid-template-columns: repeat(3,minmax(0,1fr)); width: 100%; }
.calendar-preview .time-block { font-size: .75rem; }
.calendar-preview .day-column { gap: 12px; padding: 13px 9px; }
.toast { position: fixed; bottom: 22px; left: 50%; z-index: 95; transform: translateX(-50%); display: flex; align-items: center; gap: 12px; width: max-content; max-width: min(620px,calc(100vw - 32px)); padding: 14px 18px; border: 1px solid hsl(var(--border)); border-radius: 9px; background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); box-shadow: var(--shadow-lg); font-size: .875rem; overflow-wrap: anywhere; }
.toast:empty { display: none; }
.toast .icon-button { margin: -6px -9px -6px 0; }
.toast .icon-button:hover { background: hsl(var(--primary-foreground) / .12); border-color: hsl(var(--primary-foreground) / .3); }
.toast.error { color: hsl(var(--state-blocked-fg)); background: hsl(var(--state-blocked-bg)); border-color: hsl(var(--state-blocked-fg)); }

/* Photo focus uses an inset double boundary that remains visible on every image. */
:is(.welcome-photo, .photo-button, .gallery > button, button.property-photo):focus-visible { outline: 3px solid #f4f1ec; outline-offset: -8px; }
:is(.welcome-photo, .photo-button, .gallery > button, button.property-photo):focus-visible::after { content: ''; position: absolute; inset: 2px; border: 3px solid #0d1f4a; border-radius: inherit; z-index: 2; pointer-events: none; }

/* V4.1: decisions first, with detail available when it helps. */
.brief-understanding { display: flex; flex-direction: column; gap: 16px; }
.brief-understanding > .brief-chips, .brief-understanding > .feature-list { margin: 0; }
.brief-understanding .feature-list small { display: block; margin-top: 3px; font-size: .75rem; }
.brief-understanding > p { max-width: 690px; }
.brief-understanding > .notice { margin-top: 0; }
.criteria-details { padding-top: 0; }
.criteria-details > summary { padding-block: 16px; text-underline-offset: 4px; }
.criteria-details > summary:hover { text-decoration: underline; }
.criteria-details[open] > summary { margin-bottom: 12px; }
.criteria-details > .stack { margin-top: 0; }
.availability-summary { padding-block: 18px; border-top: 1px solid hsl(var(--border)); }
.availability-summary > strong { font-size: .875rem; }
.availability-summary > p { font-size: .875rem; margin-top: 7px; }
.availability-summary > p.small { font-size: .8125rem; }
.availability-summary > .button { margin-top: 12px; }
.sharing-summary { display: flex; flex-direction: column; align-items: flex-start; gap: 11px; }
.sharing-summary > p { margin: 0; }
.main > .notice + .inventory-filters, .main > p.small + .inventory-filters { margin-top: 23px; }
.inventory-filters { display: grid; grid-template-columns: minmax(190px, 1fr) minmax(180px, 240px) minmax(160px, 200px) auto; align-items: end; gap: 14px; padding: 20px; margin-bottom: 23px; border: 1px solid hsl(var(--border)); border-radius: 9px; background: var(--journey-surface); }
.inventory-filters .button { min-height: 46px; }
.plan-refinement { background: var(--journey-surface); border-color: hsl(var(--border)); }
.plan-refinement > .section-heading { align-items: flex-start; margin-bottom: 15px; }
.plan-refinement > form.stack { gap: 17px; margin-top: 17px; }
.plan-refinement .field textarea { min-height: 88px; }
.plan-refinement .actions { justify-content: flex-end; }
.plan-refinement > p { font-size: .875rem; color: hsl(var(--muted-foreground)); }
.refinement-response { margin-top: 17px; }
.refinement-response > strong { display: block; }
.next-action { padding: 19px 20px; border: 1px solid hsl(var(--border)); border-left: 3px solid hsl(var(--foreground)); border-radius: 0 8px 8px 0; background: var(--journey-surface); color: hsl(var(--foreground)); }
.next-action h3 { font-size: 1.12rem; }
.next-action p + p { margin-top: 8px; }
.next-action > .eyebrow + h3, .next-action h3 + p { margin-top: 8px; }
.next-action > .actions { margin-top: 15px; }
.agent-card.next-action { background: hsl(var(--sidebar)); color: hsl(var(--sidebar-foreground)); border: 0; border-radius: 12px; }
.property-placeholder { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; width: 100%; aspect-ratio: 1.55; padding: 25px; border-radius: 9px; background: hsl(var(--card)); color: hsl(var(--muted-foreground)); text-align: center; font-size: .875rem; }
.property-placeholder > .icon { width: 30px; height: 30px; }
.gallery.gallery-single { display: block; }
.gallery.gallery-single > .gallery-main, .gallery.gallery-single > button { width: 100%; height: 100%; }
.gallery > .property-placeholder { height: 100%; aspect-ratio: auto; }
.seller-home-picker { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 13px; max-width: 660px; margin-bottom: 28px; }
.seller-home-picker > .field { flex: 1 1 250px; }
.seller-home-picker > .button { min-height: 46px; }
.work-meta { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.25fr); gap: 12px 23px; padding: 15px 17px; background: var(--journey-surface); border: 1px solid hsl(var(--border)); border-radius: 7px; }
.work-meta > p { display: flex; flex-direction: column; gap: 3px; margin: 0; font-size: .8125rem; line-height: 1.55; }
.work-meta > p > span { font-size: .6875rem; }
.work-meta strong { font-weight: 500; }
.work-meta > .work-next { grid-column: 1 / -1; }
.counterproposal-card { display: flex; flex-direction: column; align-items: stretch; gap: 15px; padding: 20px; border: 1px solid hsl(var(--border)); border-left: 3px solid hsl(var(--state-progress-fg)); border-radius: 0 8px 8px 0; background: var(--journey-surface); }
.counterproposal-card h3 { font-size: 1.1rem; }
.counterproposal-card > p { font-size: .875rem; }
.counterproposal-card > .section-heading { margin-bottom: 0; }
.counterproposal-card > .button { align-self: flex-start; }
.counterproposal-card .eyebrow + h3 { margin-top: 6px; }
.counterproposal-options { gap: 17px; }
.counterproposal-options .field textarea { min-height: 88px; }
.seller-outcome { display: flex; flex-direction: column; gap: 11px; }
.prepared-summary { padding: 17px 19px; border-left: 2px solid hsl(var(--foreground)); background: var(--journey-surface); font-size: .875rem; }
.prepared-summary > p + p { margin-top: 10px; }
.queue-waiting { background: transparent; border-color: hsl(var(--border)); }
.queue-waiting .work-meta { background: hsl(var(--card)); }
.task-card .ownership-form { padding-top: 16px; border-top: 1px solid hsl(var(--border)); }
.appointment-list + .section-heading { padding-top: 25px; margin-top: 25px; border-top: 1px solid hsl(var(--border)); }

/* V4.3: direct mobile decisions without duplicating the desktop journey. */
.mobile-next-action-copy { flex: 1 1 190px; }
.mobile-next-action-copy > strong { display: block; font-size: .9375rem; font-weight: 600; line-height: 1.5; }
.mobile-next-action-copy > span { display: block; margin-top: 3px; font-size: .8125rem; line-height: 1.5; color: hsl(var(--muted-foreground)); }
.seller-home-card > .seller-quick-controls { margin-top: 21px; padding-top: 19px; border-top: 1px solid hsl(var(--border)); }
.seller-quick-controls > h3 { font-size: 1.05rem; }
.seller-quick-controls > p { margin-top: 7px; }
.quick-control-actions { align-items: stretch; margin-top: 13px; }
.quick-control-actions > .button { flex: 1 1 155px; }
.seller-preferences { border-top: 0; }
.seller-preferences > .seller-preferences-summary { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding-block: 4px; line-height: 1.65; list-style: none; }
.seller-preferences-summary::-webkit-details-marker { display: none; }
.seller-preferences-summary::after { content: ''; width: 9px; height: 9px; flex: none; margin: 10px 3px 0 0; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); }
.seller-preferences[open] > .seller-preferences-summary::after { transform: rotate(225deg); }
.seller-preferences-summary h2 { display: block; font-size: 1.3rem; }
.seller-preferences-summary .eyebrow { display: block; margin-bottom: 8px; font-family: var(--app-font-sans); }
.seller-preferences-summary .small { display: block; margin-top: 7px; color: hsl(var(--muted-foreground)); font-family: var(--app-font-sans); font-weight: 400; line-height: 1.6; letter-spacing: 0; }
.seller-preferences[open] > summary { margin-bottom: 18px; }
.agency-work-nav { display: flex; flex-wrap: wrap; align-items: stretch; gap: 8px; }
.agency-work-nav .work-filter { flex: 1 1 120px; min-height: 44px; }
.agency-filter-context { font-size: .8125rem; line-height: 1.65; color: hsl(var(--muted-foreground)); margin-top: 10px; }
.branch-commitments > details { padding-top: 0; }
.branch-commitments > details > summary { font-size: .875rem; }
.branch-commitments > details > .stack { gap: 0; }
.stat:is(a, button) { min-height: 64px; color: inherit; text-decoration: none; background: transparent; border-top: 0; border-right: 0; border-bottom: 0; text-align: left; }
.stat:is(a, button):hover span { text-decoration: underline; text-underline-offset: 4px; }

@media (min-width: 1180px) {
  .main > .home-grid, .catalogue-group > .home-grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 34px 24px; }
  :is(.main > .home-grid, .catalogue-group > .home-grid) .property-heading { flex-direction: column; gap: 7px; }
  :is(.main > .home-grid, .catalogue-group > .home-grid) .price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px; }
  :is(.main > .home-grid, .catalogue-group > .home-grid) .price > span { margin: 0; }
  :is(.main > .home-grid, .catalogue-group > .home-grid) .property-heading h3 { font-size: 1.16rem; }
}

@media (prefers-reduced-motion: no-preference) {
  .button, .property-tab, .tabs > button { transition: background-color .16s ease, border-color .16s ease, box-shadow .16s ease; }
  .photo-button img, .welcome-photo > img { transition: transform .45s ease; }
  .photo-button:hover img, button.welcome-photo:hover > img { transform: scale(1.02); }
  .dialog { animation: journey-enter .16s ease-out both; }
  @keyframes journey-enter { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }
}
@media (max-width: 1120px) {
  .app-header { gap: 22px; }
  .main-nav { gap: 17px; }
  .welcome { gap: 36px; }
  .welcome h1 { font-size: 3.4rem; }
  .welcome-photo { min-height: 565px; }
  .plan-layout, .stakeholder-layout { grid-template-columns: minmax(0,1fr) 285px; gap: 27px; }
  .plan-aside > .panel, .stakeholder-aside > .panel, .agent-card { padding: 21px; }
  .home-grid { gap: 29px 20px; }
  .property-heading { flex-direction: column; gap: 8px; }
  .property-heading .price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; }
  .property-heading .price > span, .property-heading .price > small { margin-bottom: 0; }
  .detail-layout { grid-template-columns: minmax(0,1fr) 310px; gap: 32px; }
  .main > .agent-card { grid-template-columns: 38px minmax(0,1fr); }
  .main > .agent-card > .button { grid-column: 2; justify-self: start; }
  .main > .agent-card h2 { font-size: 1.4rem; }
  .itinerary-stop { grid-template-columns: 135px minmax(0,1fr); gap: 13px; }
  .travel-leg { margin-left: 149px; }
}
@media (max-width: 940px) {
  .inventory-filters { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .inventory-filters > .field:first-child { grid-column: 1 / -1; }
  .app-header { padding: 19px 28px; flex-wrap: wrap; gap: 14px 20px; }
  .brand { font-size: 1.5rem; }
  .main-nav { gap: 17px; order: 3; width: 100%; justify-content: flex-start; margin-left: 0; }
  .main-nav button, .main-nav a { padding: 8px 0; }
  .header-actions { margin-left: auto; }
  .main { padding: 34px 28px 60px; }
  .review-ribbon { padding-inline: 28px; }
  .welcome { gap: 27px; }
  .welcome h1 { font-size: 2.9rem; }
  .welcome .lede { font-size: 1rem; }
  .composer { padding: 18px; }
  .composer-footer .small { max-width: 145px; }
  .welcome-photo-caption { padding: 22px; }
  .welcome-photo-caption strong { font-size: 1.18rem; }
  .plan-layout, .stakeholder-layout { grid-template-columns: 1fr; gap: 32px; }
  .plan-aside, .stakeholder-aside { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 23px; align-items: start; }
  .plan-aside > :only-child, .stakeholder-aside > :only-child { grid-column: 1 / -1; }
  .plan-main, .stakeholder-main { gap: 31px; }
  .property-heading { flex-direction: row; }
  .property-heading .price { display: block; text-align: right; }
  .detail-layout { grid-template-columns: minmax(0,1fr) 285px; gap: 27px; }
  .main > .agent-card { margin-bottom: 30px; padding: 23px; }
  .itinerary-stop { grid-template-columns: 160px minmax(0,1fr); gap: 16px; }
  .travel-leg { margin-left: 177px; }
  .gallery { height: 350px; }
  .footer { width: calc(100% - 56px); }
}
@media (max-width: 720px) {
  .app-shell:has(.mobile-next-action) { padding-bottom: calc(var(--mobile-next-action-height, 12rem) + 16px); }
  .app-shell:has(.mobile-next-action) :is(a, button, input, textarea, select, summary) { scroll-margin-bottom: calc(var(--mobile-next-action-height, 12rem) + 16px); }
  .main > .mobile-next-action { position: fixed; inset: auto 0 0; z-index: 60; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 0; padding: 12px max(18px, env(safe-area-inset-right)) calc(12px + env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left)); max-height: min(35dvh, 12rem); overflow-y: auto; overscroll-behavior: contain; border-top: 1px solid hsl(var(--border)); border-radius: 0; background: hsl(var(--background)); box-shadow: 0 -5px 20px hsl(var(--foreground) / .06); }
  .mobile-next-action > .mobile-next-action-copy { flex: 1 1 125px; }
  .mobile-next-action-copy > strong { font-size: .875rem; }
  .mobile-next-action-copy > span { font-size: .75rem; }
  .main > .mobile-next-action > .button { flex: 0 1 auto; min-height: 48px; width: auto; margin: 0; font-size: .875rem; padding: 10px 14px; }
  .app-shell:has(.mobile-next-action) + .toast { bottom: calc(var(--mobile-next-action-height, 12rem) + 12px); }
  body:has(.dialog-backdrop, input:focus, textarea:focus, select:focus, [contenteditable='true']:focus) .mobile-next-action { display: none; }
  body:has(.dialog-backdrop, input:focus, textarea:focus, select:focus, [contenteditable='true']:focus) .app-shell:has(.mobile-next-action) { padding-bottom: 0; }
  body:has(.dialog-backdrop, input:focus, textarea:focus, select:focus, [contenteditable='true']:focus) .app-shell + .toast { bottom: calc(12px + env(safe-area-inset-bottom)); }
  .compare-desktop { display: none; }
  .compare-mobile { display: flex; flex-direction: column; gap: 26px; }
  .compare-priority { padding: 20px; border: 1px solid hsl(var(--border)); border-radius: 10px; background: var(--journey-surface); }
  .compare-priority > h2 { font-size: 1.25rem; }
  .compare-priority-homes { display: flex; flex-direction: column; margin-top: 17px; }
  .compare-home-value { padding-block: 17px; border-top: 1px solid hsl(var(--border)); }
  .compare-home-value:first-child { padding-top: 0; border-top: 0; }
  .compare-home-value:last-child { padding-bottom: 0; }
  .compare-home-value > h3 { font: 600 .875rem/1.55 var(--app-font-sans); letter-spacing: 0; margin-bottom: 7px; }
  .compare-value { font-size: .875rem; line-height: 1.65; }
  .compare-value > p + p { margin-top: 13px; }
  .price small, .price > span { font-size: .8125rem; line-height: 1.6; }
  .price .ownership-note { font-size: .875rem; color: hsl(var(--foreground)); }
  .need-row .source-note, .gallery-credit, .itinerary-time span, .work-meta > p > span, .activity-list.timeline .small { font-size: .75rem; line-height: 1.6; }
  .quick-control-actions > .button { flex-basis: 170px; }
  .agency-work-nav .work-filter { font-size: .875rem; }
  .field :is(input, select, textarea) { scroll-margin-block: 24px; }
  .field :is(input[type='date'], input[type='time'], input[type='datetime-local']) { min-inline-size: 0; max-inline-size: 100%; padding-inline: 8px; }
  .field input::-webkit-date-and-time-value { min-width: 0; text-align: left; }
  .inventory-filters { grid-template-columns: repeat(2,minmax(0,1fr)); padding: 18px; }
  .inventory-filters > .field:first-child { grid-column: 1 / -1; }
  .inventory-filters > .button { grid-column: 1 / -1; justify-self: end; }
  .inventory-filters + .section-heading { flex-wrap: wrap; }
  .property-placeholder { aspect-ratio: 1.7; }
  .counterproposal-card > .split, .counterproposal-card > .section-heading { flex-wrap: wrap; }
  .counterproposal-card .badge { white-space: normal; }
  .welcome { grid-template-columns: 1fr; gap: 29px; }
  .welcome-copy { padding: 0; }
  .welcome h1 { font-size: clamp(2.6rem,7.5vw,3.5rem); max-width: 600px; margin: 14px 0 18px; }
  .welcome .lede { max-width: 580px; }
  .composer { margin-top: 24px; padding: 20px; }
  .composer-footer .small { max-width: none; }
  .welcome-photo { min-height: 0; height: 355px; }
  .welcome-photo > img { object-position: center 42%; }
  .welcome-photo-caption { padding: 20px 23px; }
  .welcome-photo-caption { flex-direction: row; align-items: flex-end; justify-content: space-between; gap: 18px; }
  .welcome-photo-caption .button { margin-top: 0; font-size: .8125rem; flex: none; align-self: flex-end; }
  .welcome-preview { margin-top: 32px; padding-top: 27px; flex-direction: column; align-items: flex-start; }
  .intro-steps { grid-template-columns: 1fr; gap: 22px; margin-top: 35px; padding-top: 26px; }
  .intro-step { gap: 14px; }
  .intro-step p { max-width: 540px; }
  .page-heading { align-items: flex-start; margin-bottom: 26px; }
  .page-heading .lede { margin-top: 11px; }
  .priority-strip { flex-wrap: wrap; padding: 20px; gap: 16px; }
  .priority-strip > div { flex-basis: calc(100% - 44px); }
  .priority-strip > .button { margin-left: auto; }
  .plan-aside, .stakeholder-aside { grid-template-columns: 1fr; }
  .plan-aside > .panel, .stakeholder-aside > .panel { padding: 23px; }
  .home-grid { grid-template-columns: 1fr; gap: 28px; }
  .property-card { gap: 13px; }
  img.property-photo, .property-photo > img, .photo-button > img { aspect-ratio: 1.7; }
  .property-meta h3, .property-heading h3, .property-heading h2 { font-size: 1.4rem; }
  .property-actions .button { font-size: .875rem; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { gap: 18px; }
  .detail-layout { grid-template-columns: 1fr; gap: 28px; }
  .detail-layout > aside { position: static; }
  .detail-layout > .property-decision-aside, .detail-layout > .property-detail-main { grid-column: 1; grid-row: auto; }
  .gallery { height: 330px; gap: 7px; }
  .gallery > .gallery-small { gap: 7px; }
  .gallery-credit { flex-direction: column; gap: 4px; }
  .panel { padding: 23px; }
  .stats-row { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 22px 0; }
  .stat { padding-inline: 20px; }
  .stat:nth-child(3) { padding-left: 0; border-left: 0; }
  .stat strong { font-size: 1.75rem; }
  .property-tab { flex-basis: calc(50% - 11px); }
  .slot-option { padding: 21px; }
  .slot-option.selected { padding: 20px; }
  .week-grid { gap: 5px; }
  .day-column { padding: 9px 4px; }
  .time-block { padding: 6px 3px; font-size: .75rem; }
  .day-column > strong, .day-column > span:first-child, .day-column > .small { font-size: .75rem; }
  .form-grid { gap: 17px; }
  .window-fields { grid-template-columns: 1.3fr 1fr 1fr; gap: 12px; }
  .booking-card.panel .section-heading { flex-wrap: wrap; }
  .booking-card.panel .section-heading > .badge { margin-left: 0; }
  .dialog-backdrop { padding: calc(15px + env(safe-area-inset-top)) max(15px, env(safe-area-inset-right)) calc(15px + env(safe-area-inset-bottom)) max(15px, env(safe-area-inset-left)); }
  .dialog { max-height: calc(100dvh - 30px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); }
  .dialog-header { padding: 21px 23px 18px; }
  .dialog-body { padding: 22px 23px; }
  .dialog-footer { padding: 17px 23px; }
  .footer { align-items: flex-start; }
}
@media (max-width: 480px) {
  .agency-work-nav { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .agency-work-nav .work-filter { padding-inline: 10px; }
  .quick-control-actions { display: grid; grid-template-columns: 1fr; }
  .quick-control-actions > .button { width: 100%; }
  .compare-priority { padding: 18px; }
  .inventory-filters { grid-template-columns: 1fr; gap: 13px; padding: 17px; }
  .inventory-filters > .button { width: 100%; }
  .catalogue-group { margin-block: 27px; }
  .catalogue-group > .section-heading > p { display: block; flex-basis: 100%; }
  .plan-refinement .actions > .button { flex: 1 1 140px; }
  .form-error { padding: 13px 14px; }
  .inventory-filters + .section-heading > p { display: block; flex-basis: 100%; }
  .property-placeholder { aspect-ratio: 1.45; }
  .next-action, .counterproposal-card { padding: 16px; }
  .seller-home-picker { gap: 11px; margin-bottom: 23px; }
  .seller-home-picker > .button { flex: 1; }
  .work-meta { gap: 12px 16px; padding: 13px; }
  .counterproposal-card .actions > .button { flex: 1 1 160px; }
  .app-header { padding: 15px 18px 8px; gap: 10px 12px; }
  .brand { font-size: 1.4rem; gap: 8px; }
  .brand img { width: 29px; height: 29px; }
  .brand small { font-size: .625rem; }
  .header-actions { gap: 0; }
  .header-actions .button { font-size: .75rem; padding-inline: 8px; }
  .avatar-button { width: 44px; height: 44px; }
  .main-nav { justify-content: space-between; gap: 5px 12px; }
  .main-nav button, .main-nav a { font-size: .8125rem; }
  .main-nav .icon { width: 16px; height: 16px; }
  .review-ribbon { padding: 3px 18px; gap: 6px 10px; align-items: center; }
  .review-ribbon > :first-child { flex: 1; }
  .review-ribbon .small { font-size: .75rem; }
  .ribbon-detail { display: block; font-size: .75rem; }
  .review-menu { right: 0; width: 300px; }
  .main { padding: 27px 18px 44px; }
  .page-heading { gap: 17px; }
  .page-heading h1 { font-size: 2.1rem; }
  .page-heading .actions { width: 100%; }
  .page-heading .actions > .button { flex: 1; }
  .section-heading { align-items: flex-start; gap: 12px; margin-bottom: 18px; }
  .section-heading h2 { font-size: 1.35rem; }
  .section-heading > .button { font-size: .75rem; padding-inline: 9px; }
  .section-heading > p { display: none; }
  .welcome h1 { font-size: 2.75rem; }
  .welcome .lede { font-size: 1rem; }
  .composer { padding: 17px; }
  .composer textarea { min-height: 114px; }
  .composer-footer { align-items: flex-start; }
  .composer-footer .small { max-width: 155px; }
  .composer-footer .button { margin-left: auto; }
  .sample-prompts { gap: 6px; }
  .sample-prompts .button { font-size: .75rem; padding-inline: 10px; }
  .trust-line { font-size: .75rem; margin-top: 18px; }
  .welcome-photo { height: 330px; }
  .welcome-photo-caption { padding: 20px; }
  .welcome-photo-caption { flex-direction: column; align-items: flex-start; gap: 13px; }
  .welcome-photo-caption .button { align-self: flex-start; font-size: .75rem; }
  .welcome-photo-caption strong { font-size: 1.15rem; }
  .photo-label { top: 16px; left: 16px; max-width: calc(100% - 32px); }
  .grid-2, .form-grid { grid-template-columns: 1fr; }
  .form-grid > * { grid-column: 1; }
  .window-fields { grid-template-columns: 1fr 1fr; gap: 13px 10px; }
  .window-fields > .field:first-child { grid-column: 1 / -1; }
  .window-fields > .field:not(:first-child) { grid-column: auto; }
  .panel, .plan-aside > .panel, .stakeholder-aside > .panel { padding: 20px; }
  .panel > .panel { padding-inline: 0; }
  .stack { gap: 21px; }
  .main > .agent-card { grid-template-columns: 30px minmax(0,1fr); gap: 12px; padding: 21px 19px; }
  .main > .agent-card .agent-avatar { width: 28px; height: 32px; }
  .main > .agent-card .agent-avatar img { width: 27px; }
  .main > .agent-card h2 { font-size: 1.25rem; line-height: 1.35; }
  .main > .agent-card .eyebrow { font-size: .625rem; }
  .main > .agent-card p:not(.eyebrow) { font-size: .8125rem; }
  .main > .agent-card > .button { font-size: .75rem; }
  .split { flex-wrap: wrap; gap: 12px; }
  .priority-strip { padding: 18px; }
  .priority-strip > .button { width: 100%; }
  .property-heading { gap: 10px; }
  .property-heading h3, .property-heading h2, .property-meta h3 { font-size: 1.2rem; }
  .price { font-size: 1.12rem; }
  .price small, .price > span { font-size: .8125rem; }
  .price .ownership-note { font-size: .875rem; }
  .property-actions > .button.primary { flex: 1 1 145px; }
  .property-actions > .actions { width: 100%; }
  img.property-photo, .property-photo > img, .photo-button > img { aspect-ratio: 1.45; }
  .mini-home { gap: 10px; }
  .mini-home img { width: 60px; height: 53px; }
  .mini-home h3, .mini-home strong { font-size: .875rem; }
  .mini-home .button { padding-inline: 8px; }
  .gallery { height: 330px; grid-template-columns: 1fr 1fr; grid-template-rows: 210px 113px; }
  .gallery > :first-child, .gallery > .gallery-main { grid-column: 1 / -1; grid-row: 1; }
  .gallery > .gallery-small { grid-column: 1 / -1; grid-row: 2; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr; }
  .gallery .photo-label { font-size: .625rem; top: 10px; left: 10px; }
  .gallery > :not(:first-child) .photo-label { display: none; }
  .detail-layout { margin-top: 27px; }
  .slot-option { padding: 18px; gap: 15px; }
  .slot-option.selected { padding: 17px; }
  .slot-option > .split { gap: 9px; }
  .slot-option h3 { font-size: 1.12rem; }
  .itinerary-stop { grid-template-columns: 1fr; gap: 11px; }
  .itinerary-stop > time, .itinerary-stop > .time { font-size: .8125rem; }
  .itinerary-stop > div { padding-left: 12px; }
  .itinerary-stop .mini-home img { width: 45px; height: 43px; }
  .travel-leg { margin-left: 0; padding-left: 12px; }
  .itinerary-time { display: flex; flex-wrap: wrap; gap: 4px 11px; align-items: baseline; }
  .itinerary-time span { margin-top: 0; }
  .itinerary-stop > .mini-home { padding-left: 12px; }
  .week-grid { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 6px; }
  .day-column { min-height: 105px; padding: 10px 7px; }
  .time-block { font-size: .75rem; padding: 7px 4px; }
  .booking-card .mini-home img { width: 72px; height: 65px; }
  .booking-card .actions > .button { flex: 1 1 120px; }
  .booking-card.panel, .booking-card.panel:first-child, .booking-card.panel:last-child { padding: 20px; }
  .booking-card.panel .mini-home p:not(.eyebrow) { font-size: .75rem; }
  .booking-card.panel .mini-home img { width: 61px; height: 62px; }
  .buyer-shell .work-item { flex-wrap: wrap; gap: 9px; }
  .buyer-shell .work-item > div { flex-basis: calc(100% - 20px); }
  .buyer-shell .work-item > .button { margin-left: 17px; }
  .share-receipt { padding: 17px; }
  .property-tabs { gap: 8px; margin-bottom: 23px; }
  .property-tab { flex-basis: 100%; min-height: 61px; padding: 9px 12px; }
  .seller-home-card > img { height: 200px; }
  .seller-window > .form-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 13px 10px; }
  .seller-window > .form-grid > .field:first-child { grid-column: 1 / -1; }
  .seller-window > .form-grid > .field:not(:first-child) { grid-column: auto; }
  .work-item-heading { flex-wrap: wrap; }
  .work-item-heading > .badge { order: -1; }
  .work-item-heading > div { flex-basis: 100%; }
  .ownership-form .field { min-width: 135px; }
  .tabs { gap: 3px; }
  .tabs > button { flex: 1 1 auto; padding: 9px 10px; font-size: .8125rem; }
  .empty-state { padding: 28px 20px; }
  .empty-state .actions { width: 100%; }
  .empty-state .button { flex: 1; }
  .dialog-backdrop { padding: calc(10px + env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) calc(10px + env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left)); align-items: center; }
  .dialog { max-height: calc(100dvh - 20px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); border-radius: 11px; }
  .dialog-header { padding: 20px 18px 16px; gap: 10px; }
  .dialog-header h2 { font-size: 1.35rem; }
  .dialog-body { padding: 20px 18px; }
  .dialog-footer { padding: 15px 18px; }
  .dialog-footer > .button { flex: 1; }
  .dialog-footer .small { width: 100%; max-width: none; }
  .scenario-grid { grid-template-columns: 1fr; }
  .scenario-button { padding: 17px 41px 17px 17px; }
  .scenario-button strong { font-size: 1rem; }
  .photo-modal img { height: min(52dvh,400px); }
  .receipt-list { grid-template-columns: 1fr; gap: 6px; }
  .receipt-list dd { margin-bottom: 12px; }
  .receipt-list dd:last-child { margin-bottom: 0; }
  .calendar-preview, .message-preview { padding: 19px; }
  .calendar-preview .day-column { padding: 10px 6px; }
  .calendar-preview .time-block { font-size: .75rem; }
  .footer { width: calc(100% - 36px); padding-block: 19px; font-size: .6875rem; }
  .toast { bottom: 12px; font-size: .8125rem; padding: 12px 14px; }
}
/* On a short landscape screen, keep the action in normal flow and scroll the whole dialog. */
@media (max-height: 480px) {
  .app-shell:has(.mobile-next-action) { padding-bottom: 0; }
  .app-shell:has(.mobile-next-action) :is(a, button, input, textarea, select, summary) { scroll-margin-bottom: 24px; }
  .main > .mobile-next-action { position: static; max-height: none; overflow: visible; margin-top: 26px; padding: 18px; border: 1px solid hsl(var(--border)); border-radius: 10px; box-shadow: none; }
  .app-shell:has(.mobile-next-action) + .toast { bottom: calc(12px + env(safe-area-inset-bottom)); }
  .dialog { overflow-y: auto; }
  .dialog-header { position: sticky; top: 0; z-index: 1; background: hsl(var(--background)); padding-block: 12px; }
  .dialog-body { overflow: visible; flex: none; padding-block: 16px; }
  .photo-modal img { height: min(45dvh, 260px); }
}
@media (max-width: 359px) {
  .work-meta { grid-template-columns: 1fr; }
  .main { padding-inline: 15px; }
  .app-header, .review-ribbon { padding-inline: 15px; }
  .main-nav { gap: 5px 8px; }
  .main-nav button, .main-nav a { font-size: .75rem; }
  .main-nav .icon { display: none; }
  .header-actions .button { padding-inline: 6px; }
  .welcome h1 { font-size: 2.4rem; }
  .composer-footer .small { max-width: none; width: 100%; }
  .composer-footer .button { width: 100%; }
  .property-heading { flex-direction: column; }
  .property-heading .price { display: flex; align-items: baseline; gap: 6px; }
  .stats-row { gap: 19px 0; }
  .stat { padding-inline: 15px; }
  .button { padding-inline: 12px; }
  .panel { padding: 18px; }
  .review-menu { width: 278px; }
}
@media (forced-colors: active) {
  :is(a, button, input, textarea, select, summary, [tabindex]):focus-visible { outline-color: Highlight; }
  .badge, .panel, .agent-card, .notice, .form-error, .selected-state, .time-block, .button, .property-tab, .slot-option { border: 1px solid CanvasText; }
  .status-dot { background: CanvasText; }
  .agent-card::before { background: Highlight; }
  .save-button { border: 1px solid CanvasText; }
  :is(.welcome-photo, .photo-button, .gallery > button, button.property-photo):focus-visible::after { border-color: Canvas; }
}
@media print {
  .app-header, .review-ribbon, .footer, .dialog-backdrop, .toast, .button, .main-nav, .mobile-next-action { display: none !important; }
  .app-shell:has(.mobile-next-action) { padding-bottom: 0; }
  .main { max-width: none; padding: 0; }
  .plan-layout, .stakeholder-layout, .detail-layout { display: block; }
  .plan-aside, .stakeholder-aside { margin-top: 25px; }
  .property-card, .booking-card, .appointment-card, .panel { break-inside: avoid; }
  .agent-card { color: hsl(var(--foreground)); background: none; border: 1px solid hsl(var(--border)); }
  .agent-card .muted, .agent-card .small, .agent-card .eyebrow { color: hsl(var(--muted-foreground)); }
}

/* V4.4: a clear search input and homes before optional refinement. */
.welcome h1 { font-size: clamp(2.4rem, 4vw, 3.6rem); margin-block: 12px 16px; }
.composer { margin-top: 22px; }
.composer label { font-size: .9375rem; }
.composer textarea { min-height: 110px; padding: 12px; border: 1px solid var(--journey-control); border-radius: 7px; background: hsl(var(--background)); line-height: 1.5; }
.composer-footer .small { font-size: .875rem; }
.browse-start { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 14px; }
.search-example { padding: 16px 0; margin-top: 15px; border-top: 1px solid hsl(var(--border)); }
.search-example > p + p { margin-top: 8px; font-size: .9375rem; line-height: 1.5; }
.search-example .button { margin-top: 12px; }
.more-examples > summary, .results-refine > summary, .plan-refine > summary, .search-checks > summary { cursor: pointer; min-height: 44px; padding: 12px 0; font-size: .875rem; font-weight: 500; }
.more-examples .sample-prompts { margin: 0 0 12px; }
.results-heading { margin-bottom: 12px; }
.results-heading h1 { font-size: clamp(1.8rem, 3vw, 2.5rem); }
.results-heading + .brief-chips { margin-block: 0 6px; gap: 6px; }
.results-refine { margin: 0 0 10px; border-bottom: 1px solid hsl(var(--border)); }
.results-refine-body { padding-block: 6px 12px; }
.results-refine .inventory-filters { margin: 12px 0 0; }
.search-checks { margin-top: 2px; color: hsl(var(--muted-foreground)); }
.search-checks > summary { padding-block: 9px; }
.search-checks .stack { padding: 6px 0 16px; gap: 12px; }
.search-checks li { margin-block: 6px; }
.search-checks ul { padding-left: 20px; }
.results-count { gap: 8px; margin-bottom: 14px; }
.results-count .actions { gap: 8px; }
.results-count .button { min-height: 44px; padding: 8px 12px; font-size: .875rem; }
.plan-refine { margin-top: 22px; border-top: 1px solid hsl(var(--border)); }
.plan-refine .plan-refinement { margin: 0; }
@media (max-width: 720px) {
  .welcome-copy { padding-top: 0; }
  .welcome h1 { font-size: 2.4rem; }
  .composer { margin-top: 18px; padding: 15px; }
  .composer-footer .small { max-width: none; flex: 1 1 180px; }
  .composer-footer .button { min-height: 46px; }
  .results-heading .eyebrow { display: none; }
  .results-heading h1 { font-size: 1.8rem; }
  .results-count > p { display: block; font-size: .875rem; }
  .results-count { align-items: flex-start; gap: 8px; }
  .results-count .actions { width: 100%; }
  .results-heading ~ .catalogue-group > .section-heading { margin-bottom: 12px; }
}
