/* Issue #55 | 2026-08-10 | George | Rebuild the homepage consultant as the approved conversational chat card without changing shared page UI. */
.consultant-shell {
  --consultant-line: #dbe4f5;
  --consultant-soft: #f7f9fe;
  --consultant-muted: #7180a2;
  --consultant-full-height: max(636px, min(792px, calc(100vh - 126px)));
  --consultant-stable-height: calc((var(--consultant-full-height) / 2) + (var(--consultant-full-height) / 4) + 75px);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  gap: 0;
  min-width: 0;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  isolation: isolate;
  border-color: #d7e0f1;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 20px 58px rgba(31, 56, 112, 0.12);
  height: var(--consultant-stable-height);
}

/* No issue | 2026-08-25 | George | Keep the chat card fixed at the midpoint between the previous compact and expanded heights. */
.consultant-shell[data-consultant-expanded="false"],
.consultant-shell[data-consultant-expanded="true"] {
  height: var(--consultant-stable-height);
}

.consultant-shell::before,
.consultant-shell::after {
  display: none;
}

.consultant-summary[hidden],
.consultant-matches[hidden],
.consultant-outcome-panel[hidden],
.consultant-thinking[hidden],
.consultant-quick[hidden],
.consultant-menu[hidden],
#consultantHandoff[hidden] {
  display: none;
}

/* Issue #55 | 2026-08-26 | George | Present captured context and recommendations in the hero-side output panel instead of inside the chat. */
.consultant-outcome-panel {
  display: grid;
  align-content: start;
  gap: 0.85rem;
  width: 100%;
  height: 100%;
  min-height: 0;
  max-height: calc((max(636px, min(792px, calc(100vh - 126px))) / 2) + (max(636px, min(792px, calc(100vh - 126px))) / 4) + 75px);
  padding: 1rem;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid #d7e0f1;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 44px rgba(31, 56, 112, 0.1);
  scrollbar-color: #9aa7bc transparent;
  scrollbar-width: thin;
}

.consultant-outcome-panel::-webkit-scrollbar {
  width: 8px;
}

.consultant-outcome-panel::-webkit-scrollbar-track {
  background: transparent;
}

.consultant-outcome-panel::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: #9aa7bc;
  background-clip: padding-box;
}

.consultant-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Issue #55 | 2026-08-10 | George | Match the mockup header while retaining reset, refresh, and demo handoff actions. */
.consultant-header {
  position: relative;
  z-index: 3;
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 88px;
  padding: 1rem 1.4rem;
  border-bottom: 1px solid var(--consultant-line);
  background: rgba(255, 255, 255, 0.96);
}

.consultant-brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  min-width: 0;
}

.consultant-logo {
  display: grid;
  flex: 0 0 48px;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid #cdd9f3;
  border-radius: 12px;
  color: var(--brand);
  background: linear-gradient(145deg, #f8fbff, #edf3ff);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.9);
  font-size: 1.12rem;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.consultant-brand-copy {
  min-width: 0;
}

.consultant-shell .consultant-brand-copy h2 {
  margin: 0;
  color: var(--text);
  font-size: 1rem;
  font-weight: 850;
  letter-spacing: -0.015em;
  line-height: 1.25;
}

.consultant-brand-copy p {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin: 0.22rem 0 0;
  color: #68799f;
  font-size: 0.78rem;
  line-height: 1.3;
}

.consultant-mode {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0.12rem 0.42rem;
  border-radius: 999px;
  color: #3c5d9d;
  background: #edf3ff;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.consultant-header-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.2rem;
}

.consultant-icon-button {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 10px;
  color: #456298;
  background: transparent;
  cursor: pointer;
}

.consultant-icon-button:hover,
.consultant-icon-button:focus-visible {
  border-color: #d5dff3;
  color: var(--brand);
  background: #f5f8ff;
}

.consultant-icon-button svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.consultant-icon-button svg circle {
  fill: currentColor;
  stroke: none;
}

.consultant-menu-wrap {
  position: relative;
}

.consultant-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 8;
  display: grid;
  min-width: 210px;
  padding: 0.4rem;
  border: 1px solid #d7e0f1;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 16px 34px rgba(25, 49, 102, 0.16);
}

.consultant-menu button {
  width: 100%;
  padding: 0.7rem 0.75rem;
  border: 0;
  border-radius: 8px;
  color: #263f70;
  background: transparent;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.consultant-menu button:hover,
.consultant-menu button:focus-visible {
  color: var(--brand);
  background: #f1f5ff;
}

/* Issue #55 | 2026-08-10 | George | Render the intake history as avatar-led chat bubbles with contained scrolling and timestamps. */
.consultant-conversation {
  grid-column: 1;
  grid-row: 2;
  display: grid;
  flex: 1 1 auto;
  align-content: start;
  gap: 0.95rem;
  min-height: 0;
  padding: 1.05rem 1.4rem 0.85rem;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: #9aa7bc transparent;
  scrollbar-width: thin;
}

.consultant-conversation::-webkit-scrollbar {
  width: 8px;
}

.consultant-conversation::-webkit-scrollbar-track {
  background: transparent;
}

.consultant-conversation::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: #9aa7bc;
  background-clip: padding-box;
}

.consultant-transcript {
  display: grid;
  gap: 1rem;
}

/* Issue #55 | 2026-08-26 | George | Show visible in-flight consultant work without reintroducing a workflow sidebar. */
.consultant-thinking {
  display: inline-flex;
  align-items: center;
  gap: 0.52rem;
  width: max-content;
  max-width: calc(100% - 50px);
  margin-left: calc(36px + 0.65rem);
  padding: 0.56rem 0.72rem;
  border: 1px solid #d9e3f5;
  border-radius: 10px;
  color: #35527f;
  background: #f8faff;
  box-shadow: 0 2px 7px rgba(32, 57, 111, 0.025);
  font-size: 0.74rem;
  font-weight: 760;
}

.consultant-thinking-dots {
  display: inline-flex;
  gap: 0.18rem;
  color: var(--brand);
}

.consultant-thinking-dots span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.36;
  animation: consultant-thinking-dot 900ms ease-in-out infinite;
}

.consultant-thinking-dots span:nth-child(2) {
  animation-delay: 120ms;
}

.consultant-thinking-dots span:nth-child(3) {
  animation-delay: 240ms;
}

.consultant-message {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  width: 100%;
  line-height: 1.48;
}

.consultant-message--user {
  justify-content: flex-end;
}

.consultant-avatar {
  display: grid;
  flex: 0 0 36px;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid #cedaf2;
  border-radius: 50%;
  color: var(--brand);
  background: #fff;
  font-size: 0.78rem;
  font-weight: 900;
}

.consultant-avatar--user {
  order: 2;
  border-color: transparent;
  background: #f1f5fd;
}

.consultant-avatar svg {
  width: 19px;
  height: 19px;
  fill: currentColor;
}

.consultant-message-stack {
  display: grid;
  gap: 0.3rem;
  max-width: min(80%, 470px);
}

.consultant-message--user .consultant-message-stack {
  justify-items: end;
  max-width: min(74%, 420px);
}

.consultant-bubble {
  padding: 0.78rem 0.9rem;
  border: 1px solid #d9e3f5;
  border-radius: 11px;
  color: #20365f;
  background: #f8faff;
  box-shadow: 0 2px 7px rgba(32, 57, 111, 0.025);
}

.consultant-message--user .consultant-bubble {
  border-color: #cfe0ff;
  color: #0752df;
  background: #edf5ff;
}

.consultant-bubble p {
  margin: 0;
  white-space: pre-line;
}

.consultant-message-time {
  color: #92a0bd;
  font-size: 0.7rem;
  line-height: 1.2;
}

/* Issue #55 | 2026-08-10 | George | Keep captured requirements and validated matches available as compact in-conversation cards. */
.consultant-summary,
.consultant-matches {
  display: grid;
  gap: 0.75rem;
  padding: 0.85rem 0.9rem;
  border: 1px solid var(--consultant-line);
  border-radius: 12px;
  background: #fbfcff;
}

.consultant-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.consultant-section-head h3 {
  margin: 0;
  color: var(--text);
  font-size: 0.86rem;
}

.consultant-section-head p {
  margin: 0.12rem 0 0;
  color: var(--consultant-muted);
  font-size: 0.7rem;
}

.consultant-summary-list,
.consultant-match-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
}

.consultant-outcome-panel .consultant-summary-list,
.consultant-outcome-panel .consultant-match-list {
  grid-template-columns: 1fr;
}

/* Issue #55 | 2026-08-26 | George | Keep the hero replacement recommendation-first and make captured context secondary. */
.consultant-outcome-panel .consultant-matches {
  gap: 0.9rem;
  padding: 0.95rem;
}

.consultant-outcome-panel .consultant-summary {
  gap: 0.45rem;
  max-height: 124px;
  padding: 0.58rem 0.65rem;
  overflow-x: hidden;
  overflow-y: auto;
  border-color: #e4ebf8;
  background: #f7faff;
  box-shadow: none;
  scrollbar-color: #b4bfd0 transparent;
  scrollbar-width: thin;
}

.consultant-outcome-panel .consultant-summary::-webkit-scrollbar {
  width: 6px;
}

.consultant-outcome-panel .consultant-summary::-webkit-scrollbar-track {
  background: transparent;
}

.consultant-outcome-panel .consultant-summary::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: #b4bfd0;
  background-clip: padding-box;
}

.consultant-outcome-panel .consultant-summary .consultant-section-head h3 {
  color: #405172;
  font-size: 0.72rem;
  text-transform: uppercase;
}

.consultant-outcome-panel .consultant-summary .consultant-section-head p {
  display: none;
}

.consultant-outcome-panel .consultant-summary-list {
  gap: 0.38rem;
}

.consultant-outcome-panel .consultant-summary-item {
  grid-template-columns: minmax(74px, 0.24fr) minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.42rem;
  padding: 0.42rem 0.5rem;
  border-color: #e6edf8;
}

.consultant-outcome-panel .consultant-summary-item strong {
  color: #52617f;
  font-size: 0.66rem;
}

.consultant-outcome-panel .consultant-summary-item p {
  font-size: 0.68rem;
  line-height: 1.25;
}

.consultant-outcome-panel .consultant-summary-actions {
  justify-content: flex-end;
  gap: 0.25rem;
}

.consultant-outcome-panel .consultant-summary-actions button {
  min-height: 26px;
  padding: 0.25rem 0.42rem;
  font-size: 0.64rem;
}

.consultant-summary-item,
.consultant-match {
  display: grid;
  align-content: start;
  gap: 0.4rem;
  min-width: 0;
  padding: 0.7rem 0.75rem;
  border: 1px solid #dce4f3;
  border-radius: 10px;
  background: #fff;
}

.consultant-summary-item strong,
.consultant-match strong {
  color: var(--text);
  font-size: 0.76rem;
}

.consultant-summary-item p,
.consultant-match p {
  margin: 0;
  overflow-wrap: anywhere;
  color: #5d6e92;
  font-size: 0.72rem;
  line-height: 1.4;
}

.consultant-summary-actions,
.consultant-match-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.consultant-summary-actions button,
.consultant-match-actions a,
.consultant-match-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0.42rem 0.62rem;
  border: 1px solid #d3ddf2;
  border-radius: 8px;
  color: #24406d;
  background: #fff;
  font: inherit;
  font-size: 0.7rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.consultant-summary-actions button:hover,
.consultant-match-actions a:hover,
.consultant-match-actions button:hover,
.consultant-summary-actions button:focus-visible,
.consultant-match-actions a:focus-visible,
.consultant-match-actions button:focus-visible {
  border-color: var(--brand);
  color: var(--brand);
  background: #f3f6ff;
}

.consultant-empty {
  margin: 0;
  color: var(--consultant-muted);
  font-size: 0.75rem;
}

/* Issue #55 | 2026-08-10 | George | Match the mockup suggestion rail and compact composer without claiming attachment or voice support. */
.consultant-quick {
  grid-column: 1;
  grid-row: 3;
  display: flex;
  flex: 0 0 auto;
  gap: 0.5rem;
  min-width: 0;
  padding: 0.55rem 1.4rem 0.7rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.consultant-quick::-webkit-scrollbar {
  display: none;
}

.consultant-quick button {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 0.42rem;
  min-height: 40px;
  padding: 0.52rem 0.72rem;
  border: 1px solid #d1dcf3;
  border-radius: 9px;
  color: #37517f;
  background: #fff;
  font: inherit;
  font-size: 0.7rem;
  font-weight: 650;
  white-space: nowrap;
  cursor: pointer;
}

.consultant-quick button:hover,
.consultant-quick button:focus-visible {
  border-color: #91adf6;
  color: var(--brand);
  background: #f5f8ff;
}

.consultant-quick-icon {
  display: inline-flex;
  flex: 0 0 17px;
  color: var(--brand);
}

.consultant-quick-icon svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.consultant-composer {
  grid-column: 1;
  grid-row: 4;
  display: grid;
  flex: 0 0 auto;
  gap: 0.55rem;
  padding: 0 1.4rem 0.9rem;
}

.consultant-compose-surface {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 0.4rem;
  min-height: 68px;
  padding: 0.42rem 0.5rem 0.42rem 0.85rem;
  border: 1.5px solid #9fbbff;
  border-radius: 13px;
  background: #fff;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.consultant-compose-surface:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(21, 87, 255, 0.08);
}

/* Issue #55 | 2026-08-26 | George | Make completed consultant conversations visibly inactive while reset remains available. */
.consultant-composer[data-consultant-closed="true"] .consultant-compose-surface {
  border-color: #dbe4f5;
  background: #f6f8fd;
  box-shadow: none;
}

.consultant-composer[data-consultant-closed="true"] .consultant-compose-icon,
.consultant-composer[data-consultant-closed="true"] textarea {
  color: #8997b5;
}

.consultant-composer[data-consultant-closed="true"] textarea {
  cursor: not-allowed;
}

/* Task #20260828 | 2026-08-28 | George | Keep the Email OTP prerequisite visible inside the consultant composer. */
.consultant-auth-gate {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.68rem;
  min-height: 58px;
  padding: 0.62rem 0.75rem;
  border: 1px solid #ccd8eb;
  border-radius: 10px;
  background: #f8fbff;
  color: #253654;
}

.consultant-auth-gate[hidden] {
  display: none;
}

.consultant-auth-gate-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  color: #0b63ce;
  background: #e8f1ff;
}

.consultant-auth-gate-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.consultant-auth-gate-copy {
  display: grid;
  min-width: 0;
  gap: 0.12rem;
  font-size: 0.78rem;
  line-height: 1.35;
}

.consultant-auth-gate-copy strong {
  color: #17233b;
  font-size: 0.83rem;
}

.consultant-auth-gate-copy span {
  color: #58667f;
}

.consultant-auth-gate-action {
  min-height: 36px;
  padding: 0 0.76rem;
  border: 1px solid #1557ff;
  border-radius: 8px;
  color: #fff;
  background: #1557ff;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

.consultant-auth-gate-action:hover,
.consultant-auth-gate-action:focus-visible {
  background: #0f47d5;
}

.consultant-composer[data-consultant-auth="required"] .consultant-compose-surface,
.consultant-composer[data-consultant-auth="checking"] .consultant-compose-surface {
  border-color: #d5dfef;
  background: #f7f9fc;
  box-shadow: none;
}

.consultant-composer[data-consultant-auth="required"] .consultant-compose-icon,
.consultant-composer[data-consultant-auth="required"] textarea,
.consultant-composer[data-consultant-auth="checking"] .consultant-compose-icon,
.consultant-composer[data-consultant-auth="checking"] textarea {
  color: #7b879c;
}

.consultant-composer[data-consultant-auth="required"] textarea,
.consultant-composer[data-consultant-auth="checking"] textarea {
  cursor: not-allowed;
}

.consultant-composer[data-consultant-auth="required"] .consultant-send,
.consultant-composer[data-consultant-auth="checking"] .consultant-send {
  opacity: 0.52;
  box-shadow: none;
  cursor: not-allowed;
}

.consultant-compose-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: #56719f;
}

.consultant-compose-icon svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.consultant-compose-surface textarea {
  width: 100%;
  min-height: 24px;
  max-height: 112px;
  padding: 0.3rem 0.15rem;
  overflow-y: auto;
  resize: none;
  border: 0;
  border-radius: 0;
  outline: 0;
  color: #243b69;
  background: transparent;
  box-shadow: none;
  font: inherit;
  font-size: 0.82rem;
  line-height: 1.45;
}

.consultant-compose-surface textarea:focus {
  border: 0;
  outline: 0;
  box-shadow: none;
}

.consultant-compose-surface textarea::placeholder {
  color: #8a99b8;
}

.consultant-send {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: 11px;
  color: #fff;
  background: linear-gradient(145deg, #2571ff, #0754e8);
  box-shadow: 0 7px 16px rgba(16, 88, 235, 0.27);
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

.consultant-send:hover,
.consultant-send:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 9px 20px rgba(16, 88, 235, 0.34);
}

.consultant-send:disabled {
  opacity: 0.62;
  cursor: not-allowed;
}

.consultant-send.is-busy:disabled {
  cursor: wait;
}

.consultant-send.is-busy svg {
  animation: consultant-send-pulse 800ms ease-in-out infinite alternate;
}

.consultant-send svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.consultant-note {
  margin: 0;
  color: #8997b5;
  font-size: 0.67rem;
  line-height: 1.35;
  text-align: center;
}

.consultant-note span {
  display: block;
}

.consultant-hidden {
  display: none !important;
}

@keyframes consultant-send-pulse {
  from { transform: translate(0, 0); }
  to { transform: translate(1px, -1px); }
}

@keyframes consultant-thinking-dot {
  0%, 100% { opacity: 0.34; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-2px); }
}

/* Issue #55 | 2026-08-10 | George | Keep the redesigned chat usable without altering shared hero breakpoints or neighboring content. */
@media (max-width: 1080px) {
  .consultant-outcome-panel {
    height: auto;
    max-height: min(480px, calc(100dvh - 140px));
  }

  .consultant-shell {
    --consultant-full-height: max(620px, min(760px, calc(100dvh - 32px)));
  }

  .consultant-message-stack {
    max-width: min(82%, 560px);
  }
}

@media (max-width: 620px) {
  .consultant-outcome-panel {
    max-height: min(440px, calc(100vh - 112px));
    padding: 0.82rem;
    border-radius: 16px;
  }

  .consultant-outcome-panel .consultant-summary {
    max-height: 118px;
  }

  .consultant-outcome-panel .consultant-summary-item {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .consultant-outcome-panel .consultant-summary-actions {
    justify-content: flex-start;
  }

  .consultant-shell {
    --consultant-full-height: max(560px, min(700px, calc(100vh - 24px)));
    border-radius: 18px;
  }

  /* Issue #115 | 2026-08-13 | Codex | Mobile taps must not move the chat card between pointerdown and textarea focus. */
  .consultant-shell[data-consultant-expanded="false"],
  .consultant-shell[data-consultant-expanded="true"] {
    height: var(--consultant-stable-height);
  }

  .consultant-header {
    min-height: 78px;
    padding: 0.8rem 0.85rem;
  }

  .consultant-brand {
    gap: 0.65rem;
  }

  .consultant-logo {
    flex-basis: 42px;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    font-size: 1rem;
  }

  .consultant-shell .consultant-brand-copy h2 {
    font-size: 0.9rem;
  }

  .consultant-brand-copy p {
    font-size: 0.68rem;
  }

  .consultant-mode {
    min-height: 18px;
    font-size: 0.58rem;
  }

  .consultant-icon-button {
    width: 34px;
    height: 34px;
  }

  .consultant-header-actions {
    gap: 0;
  }

  .consultant-conversation {
    padding: 0.85rem 0.85rem 0.7rem;
  }

  .consultant-avatar {
    flex-basis: 32px;
    width: 32px;
    height: 32px;
  }

  .consultant-message {
    gap: 0.48rem;
  }

  .consultant-message-stack,
  .consultant-message--user .consultant-message-stack {
    max-width: calc(100% - 42px);
  }

  .consultant-bubble {
    padding: 0.68rem 0.75rem;
    font-size: 0.78rem;
  }

  .consultant-thinking {
    max-width: calc(100% - 42px);
    margin-left: calc(32px + 0.48rem);
    font-size: 0.72rem;
  }

  .consultant-summary-list,
  .consultant-match-list {
    grid-template-columns: 1fr;
  }

  .consultant-quick {
    padding: 0.5rem 0.85rem 0.65rem;
  }

  .consultant-composer {
    padding: 0 0.85rem 0.75rem;
  }

  .consultant-auth-gate {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.56rem;
    padding: 0.58rem 0.65rem;
  }

  .consultant-auth-gate-action {
    grid-column: 1 / -1;
    width: 100%;
  }

  .consultant-compose-surface {
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 60px;
    padding: 0.36rem 0.4rem 0.36rem 0.75rem;
  }

  .consultant-compose-surface textarea {
    font-size: 16px;
  }

  .consultant-compose-icon {
    display: none;
  }

  .consultant-send {
    width: 44px;
    height: 44px;
  }

  .consultant-note span {
    display: none;
  }
}

@media (max-width: 420px) {
  .consultant-subtitle {
    display: none;
  }

  .consultant-menu {
    min-width: 184px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .consultant-send,
  .consultant-compose-surface {
    transition: none;
  }

  .consultant-send.is-busy svg {
    animation: none;
  }

  .consultant-thinking-dots span {
    animation: none;
    opacity: 0.75;
  }
}

/* Strategy #20260904 | 2026-09-04 | George | Recast the homepage consultant as an OpenAI-style chat surface while keeping the existing intake API. */
.consultant-shell {
  --consultant-stage-width: min(100%, 768px);
  --consultant-active-height: calc(100dvh - clamp(1rem, 2vh, 1.6rem));
  width: var(--consultant-stage-width);
  max-width: var(--consultant-stage-width);
  height: auto;
  min-height: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.consultant-shell:not([data-consultant-chat-state]),
.consultant-shell[data-consultant-chat-state="idle"] {
  height: auto;
}

.consultant-shell[data-consultant-chat-state="active"] {
  height: var(--consultant-active-height);
  min-height: var(--consultant-active-height);
  grid-template-rows: minmax(0, 1fr) auto auto;
  align-self: stretch;
}

.consultant-shell[data-consultant-chat-state="idle"][data-consultant-expanded="false"],
.consultant-shell[data-consultant-chat-state="idle"][data-consultant-expanded="true"],
.consultant-shell[data-consultant-chat-state="active"][data-consultant-expanded="false"],
.consultant-shell[data-consultant-chat-state="active"][data-consultant-expanded="true"] {
  height: auto;
}

.consultant-shell[data-consultant-chat-state="active"][data-consultant-expanded="false"],
.consultant-shell[data-consultant-chat-state="active"][data-consultant-expanded="true"] {
  height: var(--consultant-active-height);
}

.consultant-header {
  position: fixed;
  z-index: 45;
  top: clamp(1rem, 2.4vh, 1.65rem);
  right: clamp(1rem, 2.3vw, 2.1rem);
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.consultant-brand {
  display: none;
}

.consultant-header-actions {
  gap: 0.15rem;
  padding: 0.22rem;
  border: 1px solid #ededeb;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.08);
}

.consultant-shell:not([data-consultant-chat-state]) .consultant-header-actions,
.consultant-shell[data-consultant-chat-state="idle"] .consultant-header-actions {
  opacity: 0;
  pointer-events: none;
}

.consultant-icon-button {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #222;
}

.consultant-icon-button:hover,
.consultant-icon-button:focus-visible {
  border-color: transparent;
  color: #111;
  background: #f2f2ef;
}

/* Request #20260905-sidebar-rail | 2026-09-05 | George | Keep consultant action buttons clickable when active output stacks inside the narrowed app-rail canvas. */
@media (max-width: 1559px) {
  .consultant-shell[data-consultant-chat-state="active"] .consultant-header {
    position: static;
    justify-self: end;
    margin-block-end: 0.35rem;
  }
}

.consultant-menu {
  top: calc(100% + 10px);
  border-color: #e8e8e5;
  border-radius: 18px;
  color: #222;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.12);
}

.consultant-menu button {
  color: #30302e;
  font-weight: 590;
}

.consultant-menu button:hover,
.consultant-menu button:focus-visible {
  color: #111;
  background: #f4f4f1;
}

.consultant-conversation {
  grid-row: 1;
  width: 100%;
  max-width: var(--consultant-stage-width);
  margin-inline: auto;
  padding: clamp(4.5rem, 11vh, 7rem) 0 calc(6.8rem + env(safe-area-inset-bottom, 0px));
  background: transparent;
  scrollbar-color: #c8c8c4 transparent;
}

.consultant-shell:not([data-consultant-chat-state]) .consultant-conversation,
.consultant-shell[data-consultant-chat-state="idle"] .consultant-conversation {
  display: none;
}

.consultant-transcript {
  gap: 1.35rem;
}

.consultant-message {
  gap: 0.8rem;
  color: #171717;
  font-size: 0.95rem;
}

.consultant-avatar {
  flex-basis: 28px;
  width: 28px;
  height: 28px;
  border-color: #e7e7e4;
  color: #111;
  background: #fff;
  font-size: 0.66rem;
  font-weight: 760;
}

.consultant-avatar--assistant {
  color: #17315f;
  background: #f2f6ff;
}

.consultant-avatar--user {
  background: #f0f0ed;
}

.consultant-message-stack,
.consultant-message--user .consultant-message-stack {
  max-width: min(74%, 620px);
}

.consultant-bubble {
  border: 0;
  border-radius: 18px;
  color: #171717;
  background: transparent;
  box-shadow: none;
}

.consultant-message--assistant .consultant-bubble {
  padding: 0.1rem 0;
}

.consultant-message--user .consultant-bubble {
  padding: 0.68rem 0.88rem;
  color: #111;
  background: #ededeb;
}

.consultant-message-time {
  color: #a1a19c;
  font-size: 0.66rem;
}

.consultant-thinking {
  width: fit-content;
  max-width: var(--consultant-stage-width);
  margin-left: 0;
  padding: 0;
  border: 0;
  color: #8b8b86;
  background: transparent;
  box-shadow: none;
  font-size: 0.92rem;
  font-weight: 430;
}

.consultant-thinking-dots {
  display: none;
}

.consultant-quick {
  grid-row: 2;
  width: 100%;
  max-width: var(--consultant-stage-width);
  margin-inline: auto;
  padding: 0 0 0.72rem;
}

.consultant-quick button {
  min-height: 36px;
  border-color: #e4e4e1;
  border-radius: 999px;
  color: #343432;
  background: #fff;
  font-size: 0.78rem;
  font-weight: 520;
}

.consultant-quick button:hover,
.consultant-quick button:focus-visible {
  border-color: #d4d4d0;
  color: #111;
  background: #f5f5f2;
}

.consultant-quick-icon {
  color: #555;
}

.consultant-composer {
  grid-row: 3;
  width: 100%;
  max-width: var(--consultant-stage-width);
  margin-inline: auto;
  padding: 0 0 calc(1.35rem + env(safe-area-inset-bottom, 0px));
}

.consultant-shell[data-consultant-chat-state="active"] .consultant-composer {
  position: sticky;
  z-index: 20;
  bottom: 0;
  background: #f9f9f7;
}

.consultant-compose-surface {
  grid-template-columns: auto minmax(0, 1fr) auto auto auto;
  gap: 0.52rem;
  min-height: 58px;
  padding: 0.42rem 0.5rem 0.42rem 0.72rem;
  border: 1px solid #dfdfdc;
  border-radius: 30px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.10);
}

.consultant-compose-surface:focus-within {
  border-color: #cfcfcb;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.12);
}

.consultant-shell:not([data-consultant-chat-state]) .consultant-compose-surface,
.consultant-shell[data-consultant-chat-state="idle"] .consultant-compose-surface {
  grid-template-rows: minmax(48px, 1fr) auto;
  min-height: 128px;
  align-items: end;
  padding: 1rem 0.62rem 0.58rem 0.88rem;
  border-radius: 27px;
}

.consultant-shell:not([data-consultant-chat-state]) .consultant-compose-surface textarea,
.consultant-shell[data-consultant-chat-state="idle"] .consultant-compose-surface textarea {
  grid-column: 1 / -1;
  grid-row: 1;
  align-self: start;
  min-height: 44px;
  padding: 0.1rem 0.15rem;
  font-size: 1rem;
}

.consultant-shell:not([data-consultant-chat-state]) .consultant-compose-surface > .consultant-compose-icon:first-child,
.consultant-shell[data-consultant-chat-state="idle"] .consultant-compose-surface > .consultant-compose-icon:first-child {
  grid-column: 1;
  grid-row: 2;
}

.consultant-shell:not([data-consultant-chat-state]) .consultant-runtime,
.consultant-shell[data-consultant-chat-state="idle"] .consultant-runtime {
  grid-column: 3;
  grid-row: 2;
}

.consultant-shell:not([data-consultant-chat-state]) .consultant-runtime + .consultant-compose-icon,
.consultant-shell[data-consultant-chat-state="idle"] .consultant-runtime + .consultant-compose-icon {
  grid-column: 4;
  grid-row: 2;
}

.consultant-shell:not([data-consultant-chat-state]) .consultant-send,
.consultant-shell[data-consultant-chat-state="idle"] .consultant-send {
  grid-column: 5;
  grid-row: 2;
}

.consultant-compose-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #1d1d1b;
}

.consultant-compose-icon svg {
  width: 20px;
  height: 20px;
}

.consultant-compose-surface textarea {
  padding: 0.25rem 0.15rem;
  color: #1f1f1d;
  font-size: 1rem;
  line-height: 1.4;
}

.consultant-compose-surface textarea::placeholder {
  color: #8d8d88;
}

.consultant-runtime {
  display: inline-flex;
  align-items: center;
  gap: 0.34rem;
  min-width: max-content;
  color: #3a3a38;
  font-size: 0.88rem;
  line-height: 1;
}

.consultant-mode {
  min-height: 0;
  padding: 0;
  border-radius: 0;
  color: inherit;
  background: transparent;
  font-size: inherit;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.consultant-send {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: #fff;
  background: #111;
  box-shadow: none;
}

.consultant-send:hover,
.consultant-send:focus-visible {
  transform: none;
  background: #242424;
  box-shadow: none;
}

.consultant-send:disabled {
  opacity: 0.36;
}

.consultant-send.is-busy:disabled {
  opacity: 1;
  background: #111;
  cursor: wait;
}

.consultant-send.is-busy svg {
  animation: none;
}

.consultant-send svg {
  width: 20px;
  height: 20px;
  stroke-width: 2;
}

.consultant-auth-gate {
  min-height: 52px;
  border-color: #e1e1de;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.08);
}

.consultant-auth-gate-icon {
  color: #17315f;
  background: #eef3ff;
}

.consultant-auth-gate-action {
  border-color: #111;
  border-radius: 999px;
  background: #111;
}

.consultant-auth-gate-action:hover,
.consultant-auth-gate-action:focus-visible {
  background: #272727;
}

.consultant-composer[data-consultant-auth="required"] .consultant-compose-surface,
.consultant-composer[data-consultant-auth="checking"] .consultant-compose-surface {
  border-color: #dfdfdc;
  background: #fff;
}

.consultant-composer[data-consultant-auth="required"] .consultant-compose-icon,
.consultant-composer[data-consultant-auth="required"] textarea,
.consultant-composer[data-consultant-auth="checking"] .consultant-compose-icon,
.consultant-composer[data-consultant-auth="checking"] textarea {
  color: #8d8d88;
}

.consultant-composer[data-consultant-auth="required"] .consultant-send,
.consultant-composer[data-consultant-auth="checking"] .consultant-send {
  opacity: 0.36;
}

.consultant-composer[data-consultant-closed="true"] .consultant-compose-surface {
  border-color: #e4e4e1;
  background: #f4f4f1;
}

.consultant-note {
  margin-top: 0.78rem;
  color: #8b8b86;
  font-size: 0.72rem;
}

.consultant-outcome-panel {
  gap: 0.75rem;
  max-height: min(56vh, 520px);
  border-color: #e9e9e5;
  border-radius: 22px;
  color: #222;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.10);
}

.consultant-outcome-panel .consultant-matches,
.consultant-outcome-panel .consultant-summary {
  border-color: #ededeb;
  border-radius: 14px;
  background: #fff;
}

@media (max-width: 860px) {
  .consultant-header {
    display: none;
  }

  .consultant-shell,
  .consultant-shell[data-consultant-chat-state="active"] {
    --consultant-stage-width: min(100%, 720px);
  }

  .consultant-shell[data-consultant-chat-state="active"] {
    height: calc(100dvh - 1rem);
    min-height: calc(100dvh - 1rem);
  }
}

@media (max-width: 620px) {
  .consultant-shell {
    border-radius: 0;
  }

  .consultant-shell[data-consultant-chat-state="active"] {
    height: calc(100dvh - 1rem);
    min-height: calc(100dvh - 1rem);
  }

  .consultant-conversation {
    padding: 3.75rem 0 calc(6rem + env(safe-area-inset-bottom, 0px));
  }

  .consultant-message-stack,
  .consultant-message--user .consultant-message-stack {
    max-width: calc(100% - 42px);
  }

  .consultant-compose-surface,
  .consultant-shell:not([data-consultant-chat-state]) .consultant-compose-surface,
  .consultant-shell[data-consultant-chat-state="idle"] .consultant-compose-surface {
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 60px;
    padding: 0.42rem 0.42rem 0.42rem 0.78rem;
    border-radius: 26px;
  }

  .consultant-shell:not([data-consultant-chat-state]) .consultant-compose-surface,
  .consultant-shell[data-consultant-chat-state="idle"] .consultant-compose-surface {
    min-height: 104px;
  }

  .consultant-compose-surface textarea,
  .consultant-shell:not([data-consultant-chat-state]) .consultant-compose-surface textarea,
  .consultant-shell[data-consultant-chat-state="idle"] .consultant-compose-surface textarea {
    grid-column: 1;
    grid-row: 1;
    align-self: center;
    min-height: 26px;
    font-size: 16px;
  }

  .consultant-runtime,
  .consultant-compose-icon {
    display: none;
  }

  .consultant-shell:not([data-consultant-chat-state]) .consultant-send,
  .consultant-shell[data-consultant-chat-state="idle"] .consultant-send,
  .consultant-send {
    grid-column: 2;
    grid-row: 1;
    width: 40px;
    height: 40px;
  }

  .consultant-auth-gate {
    grid-template-columns: minmax(0, 1fr);
  }

  .consultant-auth-gate-icon {
    display: none;
  }
}

/* Task #20260906-consultant-otp | 2026-09-06 | George | Present a consultation-only OTP dialog with stable mobile, focus, and reduced-motion behavior. */
.consultant-verification-dialog {
  position: fixed;
  z-index: 120;
  inset: 0;
  display: grid;
  place-items: center;
  padding: max(1rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) max(1rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
  overflow-y: auto;
  background: rgba(18, 24, 36, 0.58);
}

.consultant-verification-dialog[hidden],
.consultant-verification-email-form[hidden],
.consultant-verification-code-form[hidden] {
  display: none;
}

.consultant-verification-card {
  width: min(100%, 440px);
  max-height: 100%;
  padding: clamp(1.15rem, 3vw, 1.75rem);
  overflow-y: auto;
  border: 1px solid #e4e4e1;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 28px 72px rgba(0, 0, 0, 0.24);
}

.consultant-verification-card:focus {
  outline: 0;
}

.consultant-verification-heading .home-eyebrow {
  margin-bottom: 0.4rem;
}

.consultant-verification-heading h3 {
  margin: 0;
  color: #171717;
  font-size: clamp(1.3rem, 4vw, 1.65rem);
}

.consultant-verification-heading p:last-child,
.consultant-verification-help,
.consultant-verification-timing {
  margin: 0.55rem 0 0;
  color: #5e5e59;
  font-size: 0.86rem;
  line-height: 1.45;
}

.consultant-verification-status,
.consultant-verification-error {
  min-height: 1.25rem;
  margin: 0.85rem 0 0;
  font-size: 0.86rem;
  line-height: 1.4;
}

.consultant-verification-status {
  color: #405172;
}

.consultant-verification-error {
  color: #a21d28;
}

.consultant-verification-status:empty,
.consultant-verification-error:empty {
  display: none;
}

.consultant-verification-card form {
  display: grid;
  gap: 0.55rem;
  margin-top: 1rem;
}

.consultant-verification-card form[hidden] {
  display: none;
}

.consultant-verification-card label {
  color: #242421;
  font-size: 0.88rem;
  font-weight: 680;
}

.consultant-verification-card input {
  width: 100%;
  min-height: 48px;
  padding: 0.65rem 0.75rem;
  border: 1px solid #cfcfca;
  border-radius: 10px;
  color: #171717;
  background: #fff;
  font: inherit;
  font-size: 16px;
}

.consultant-verification-card input:focus-visible,
.consultant-verification-card button:focus-visible {
  outline: 3px solid rgba(30, 86, 192, 0.35);
  outline-offset: 2px;
}

.consultant-verification-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.65rem;
  margin-top: 0.65rem;
}

.consultant-verification-primary,
.consultant-verification-secondary,
.consultant-verification-resend {
  min-height: 42px;
  border-radius: 999px;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 680;
  cursor: pointer;
}

.consultant-verification-primary {
  padding: 0 1rem;
  border: 1px solid #111;
  color: #fff;
  background: #111;
}

.consultant-verification-secondary,
.consultant-verification-resend {
  padding: 0 0.8rem;
  border: 1px solid #d4d4cf;
  color: #30302d;
  background: #fff;
}

.consultant-verification-resend {
  justify-self: start;
  margin-top: 0.25rem;
}

.consultant-verification-card button:disabled {
  opacity: 0.52;
  cursor: wait;
}

@media (max-width: 620px) {
  .consultant-verification-dialog {
    place-items: end center;
    padding: 0.5rem 0.5rem max(0.5rem, env(safe-area-inset-bottom));
  }

  .consultant-verification-card {
    width: 100%;
    max-height: calc(100dvh - 1rem);
    border-radius: 20px;
  }

  .consultant-verification-actions {
    justify-content: stretch;
  }

  .consultant-verification-actions button {
    flex: 1 1 140px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .consultant-verification-dialog,
  .consultant-verification-card {
    scroll-behavior: auto;
  }
}

/* Request #OTP-FULLSCREEN-MODAL-20260908 | 2026-09-08 | George | Turn only a successfully verified consultation into an accessible top-level full-screen chat while preserving the compact homepage entry surface. */
/* Task #CONSULTANT-FULLSCREEN-20260908 | 2026-09-08 | George | Lock the document scroller while the viewport-sized conversation is active. */
html:has(body[data-consultant-modal-open="true"]),
body[data-consultant-modal-open="true"] {
  overflow: hidden;
  overscroll-behavior: none;
}

.consultant-shell[data-consultant-modal="true"] {
  --consultant-stage-width: min(100%, 900px);
  position: fixed;
  z-index: 130;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100dvh !important;
  min-height: 100dvh !important;
  margin: 0;
  overflow: hidden;
  overscroll-behavior: contain;
  border: 0;
  border-radius: 0;
  background: #f9f9f7;
  box-shadow: none;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr) auto auto;
}

.consultant-shell[data-consultant-modal="true"] .consultant-header {
  position: static;
  z-index: auto;
  grid-row: 1;
  display: flex;
  width: 100%;
  min-height: 64px;
  padding: 0.75rem max(1rem, calc((100vw - var(--consultant-stage-width)) / 2));
  border-bottom: 1px solid #e7e7e3;
  background: #f9f9f7;
}

.consultant-shell[data-consultant-modal="true"] .consultant-brand {
  display: flex;
}

.consultant-shell[data-consultant-modal="true"] .consultant-header-actions {
  opacity: 1;
  pointer-events: auto;
}

.consultant-shell[data-consultant-modal="true"] .consultant-conversation {
  grid-row: 2;
  display: block;
  width: 100%;
  max-width: var(--consultant-stage-width);
  min-height: 0;
  padding: clamp(1.25rem, 3vh, 2rem) 0;
}

.consultant-shell[data-consultant-modal="true"] .consultant-quick {
  grid-row: 3;
}

.consultant-shell[data-consultant-modal="true"] .consultant-composer {
  position: static;
  z-index: auto;
  grid-row: 4;
  background: #f9f9f7;
}

/* Task #CONSULTANT-FULLSCREEN-20260908 | 2026-09-09 | George | Preserve the current wide input and labeled blue Send action after the shell leaves its homepage CSS scope. */
.consultant-shell[data-consultant-modal="true"] .consultant-conversation { box-sizing: border-box; padding-inline: 12px; overflow-x: hidden; }
.consultant-shell[data-consultant-modal="true"] .consultant-message-stack { min-width: 0; max-width: calc(100% - 42px); }
.consultant-shell[data-consultant-modal="true"] .consultant-bubble { min-width: 0; overflow-wrap: anywhere; }
.consultant-shell[data-consultant-modal="true"] .consultant-compose-surface {
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: minmax(48px, auto) auto;
  gap: 10px;
  padding: 14px;
  border: 1px solid #c7d2e4;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 4px 16px rgb(24 42 76 / 4%);
}
.consultant-shell[data-consultant-modal="true"] #consultantInput { grid-column: 1 / -1; grid-row: 1; width: 100%; min-width: 0; min-height: 48px; max-height: 112px; padding: 0; color: #203149; font-size: 16px; line-height: 1.5; }
.consultant-shell[data-consultant-modal="true"] .consultant-runtime { grid-column: 1; grid-row: 2; display: inline-flex; align-self: center; font-size: 12px; color: #536074; }
.consultant-shell[data-consultant-modal="true"] .consultant-send { display: inline-flex; grid-column: 2; grid-row: 2; align-items: center; justify-content: center; gap: 8px; width: auto; min-width: 94px; height: 44px; padding: 0 14px; border-radius: 10px; background: #1557ff; font-size: 14px; font-weight: 650; }
.consultant-shell[data-consultant-modal="true"] .consultant-send:hover { background: #1046cf; }
.consultant-shell[data-consultant-modal="true"] .consultant-send svg { width: 18px; height: 18px; }

/* Task #CONSULTANT-FULLSCREEN-20260908 | 2026-09-08 | George | Keep recommendations available in a bounded disclosure without crowding the full-screen transcript or composer. */
.consultant-modal-brief[hidden] { display: none; }
.consultant-shell[data-consultant-modal="true"] .consultant-modal-brief {
  grid-row: 3;
  width: min(100%, 900px);
  max-height: 30dvh;
  margin-inline: auto;
  overflow: auto;
  overscroll-behavior: contain;
}
.consultant-modal-brief > summary { min-height: 44px; padding: 10px 12px; color: #1e3b72; font-size: 14px; cursor: pointer; }
.consultant-modal-brief > summary:focus-visible { outline: 3px solid #2458ed; outline-offset: -3px; }
/* Task #CONSULTANT-FULLSCREEN-20260908 | 2026-09-09 | George | Keep the disclosure control visible while a visitor scrolls its bounded contents. */
.consultant-modal-brief[open] > summary { position: sticky; top: 0; z-index: 1; background: #f9f9f7; }
.consultant-brief-scroll-hint { display: none; }
.consultant-modal-brief .consultant-outcome-panel { height: auto; max-height: none; box-shadow: none; }
.consultant-shell[data-consultant-modal="true"] .consultant-input-label,
.consultant-shell[data-consultant-modal="true"] .consultant-entry-note { display: none; }

/* Task #CONSULTANT-FULLSCREEN-20260908 | 2026-09-08 | George | Keep controls reachable when landscape or a resized browser leaves little vertical space. */
@media (max-height: 500px) {
  .consultant-shell[data-consultant-modal="true"] .consultant-header { min-height: 48px; padding-block: 4px; }
  .consultant-shell[data-consultant-modal="true"] .consultant-composer { max-height: 48dvh; overflow-y: auto; padding-bottom: 8px; overscroll-behavior: contain; }
  .consultant-shell[data-consultant-modal="true"] .consultant-modal-brief { max-height: min(120px, calc(100dvh - 220px)); }
  .consultant-modal-brief[open] .consultant-brief-scroll-hint { display: inline; font-size: 11px; }
  .consultant-shell[data-consultant-modal="true"] .consultant-conversation { padding-block: 6px; }
}

@media (max-width: 620px) {
  .consultant-shell[data-consultant-modal="true"] .consultant-header {
    display: flex;
    min-height: 58px;
    padding: 0.65rem max(0.75rem, env(safe-area-inset-right)) 0.65rem max(0.75rem, env(safe-area-inset-left));
  }

  .consultant-shell[data-consultant-modal="true"] .consultant-conversation {
    /* Task #CONSULTANT-FULLSCREEN-20260908 | 2026-09-09 | George | Retain readable gutters when the chat fills a narrow viewport. */
    padding: 1rem 0.75rem;
  }

  .consultant-shell[data-consultant-modal="true"] .consultant-composer {
    padding: 0 0.75rem calc(0.85rem + env(safe-area-inset-bottom, 0px));
  }
}

/* Task #CONSULTANT-FULLSCREEN-20260908 | 2026-09-09 | George | Use a compact, non-overlapping input row in short landscape windows while preserving access to the request button. */
@media (max-height: 500px) {
  .consultant-shell[data-consultant-modal="true"] .consultant-compose-surface { grid-template-rows: auto; gap: 8px; padding: 8px 12px; min-height: 60px; }
  .consultant-shell[data-consultant-modal="true"] #consultantInput { grid-column: 1; grid-row: 1; min-height: 40px; max-height: 56px; }
  .consultant-shell[data-consultant-modal="true"] .consultant-send { grid-column: 2; grid-row: 1; }
  .consultant-shell[data-consultant-modal="true"] .consultant-runtime { display: none; }
}
