/* Narrow product-hardening additions over the unchanged CityPlanner report shell. */
:root {
  /* Same existing ink hue, lifted only enough for small-text AA contrast. */
  --muted2: rgba(11, 18, 32, .65);
}
.cta,
.btn.primary {
  /* Preserve the purple/cyan identity with AA-safe white-text endpoints. */
  background: linear-gradient(135deg, #6d28d9, #0e7490);
}
:where(a, button, input, textarea, summary):focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 72%, white);
  outline-offset: 3px;
}

.property-breadcrumb {
  margin: 0 0 10px;
  color: var(--muted2);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.4;
  overflow: hidden;
}
.property-breadcrumb ol {
  display: flex;
  min-width: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  white-space: nowrap;
}
.property-breadcrumb li {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.property-breadcrumb li + li::before {
  content: "/";
  padding: 0 7px;
  color: color-mix(in srgb, var(--muted2) 65%, transparent);
}
.property-breadcrumb [aria-current="page"] { color: var(--text); }

.setback-pathway-note {
  margin-top: 12px;
  padding-left: 12px;
  border-left: 3px solid color-mix(in srgb, var(--accent) 55%, transparent);
}

/* Keep intrinsic dimensions for layout stability while retaining the exact
   responsive proportions of the Stage 27C image components. */
.overlay-map-thumbnail,
.market-chart img { height: auto; }

#chat-project-panel {
  flex: 0 0 auto;
  border-bottom: 1px solid var(--border);
  background: #fff;
}
#chat-project-panel[hidden] { display: none; }
#chat-project-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 48px;
  padding: 8px 18px;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
#chat-project-toggle {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 900;
}
#chat-project-toggle::after {
  content: "⌄";
  flex: 0 0 auto;
  margin-left: 10px;
  color: var(--muted2);
  transition: transform .16s ease;
}
#chat-project-toggle[aria-expanded="true"]::after { transform: rotate(180deg); }
#chat-project-content {
  max-height: min(140px, 20vh);
  overflow: auto;
  padding: 0 18px 12px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
  overscroll-behavior: contain;
}
#chat-project-content[hidden] { display: none; }
#chat-project-content h3 {
  margin: 8px 0 4px;
  color: var(--text);
  font-size: 11px;
}
#chat-project-content ul { margin: 0; padding-left: 18px; }
#chat-project-content li { margin: 2px 0; }
#chat-project-content p { margin: 3px 0 0; }

#cityplanner-chat-shell.open { display: flex; flex-direction: column; }
#chat-messages { flex: 1 1 50%; min-height: 0; }
#chat-form { flex: 0 0 auto; max-height: 180px; overflow: auto; }
#chat-input { max-height: 120px; }
#chat-activity { flex: 0 0 auto; }
.chat-activity-copy { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-activity-history {
  max-height: 88px;
  overflow: auto;
  overscroll-behavior: contain;
}

@media (max-width: 760px) {
  .property-breadcrumb { margin-bottom: 8px; }
  #chat-project-content { max-height: min(150px, 24vh); }
  #chat-form { max-height: 160px; }
  #chat-input { max-height: 96px; }
}

@supports (padding: max(0px)) {
  #cityplanner-chat-shell {
    right: max(8px, env(safe-area-inset-right));
    bottom: max(8px, env(safe-area-inset-bottom));
  }
}

@media (prefers-reduced-motion: reduce) {
  #chat-project-toggle::after { transition: none; }
  html:focus-within { scroll-behavior: auto; }
}

@media print {
  .property-breadcrumb { display: none; }
  .setback-pathway-note { border-left-color: #777; }
}
