/* One continuous space: anatomy, conversation and request share a viewport. */
.consult-scene {
  --scene-accent: #9be4d7;
  --scene-muted: #b1c7ca;
  --scene-line: rgb(188 222 218 / 19%);
  position: relative;
  height: 760px;
  isolation: isolate;
  overflow: hidden;
  overflow-anchor: none;
  border: 1px solid var(--scene-line);
  border-radius: 8px;
  background: #09232e;
  color: #f1f7f4;
  color-scheme: dark;
}
.consult-scene::before {
  position: absolute; inset: 0; z-index: -1; content: "";
  background: radial-gradient(ellipse at 38% 37%, rgb(62 116 121 / 20%), transparent 63%);
  pointer-events: none;
}
.consult-scene [hidden] { display: none !important; }
.consult-scene button, .consult-scene select, .consult-scene input { font: inherit; }
.consult-scene button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.consult-scene button:focus-visible, .consult-scene select:focus-visible, .consult-scene input:focus-visible,
.consult-scene canvas:focus-visible { outline: 2px solid #d2fff3; outline-offset: 4px; }
.consult-scene h3:focus { outline: none; }
.consult-topline {
  position: absolute; z-index: 5; top: 0; left: 0; right: 0;
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
  min-height: 72px; padding: 0 34px; border-bottom: 1px solid var(--scene-line);
}
.consult-signature { display: flex; align-items: center; gap: 10px; color: var(--scene-muted); font-size: .72rem; font-weight: 600; }
.consult-signature > span { width: 6px; height: 6px; border-radius: 50%; background: var(--scene-accent); }
.consult-progress { display: flex; align-items: center; gap: 12px; font-size: .67rem; }
.consult-progress > span { display: flex; align-items: center; gap: 7px; color: #9ab4bb; transition: color 180ms ease; }
.consult-progress b { font-weight: 600; font-variant-numeric: tabular-nums; }
.consult-progress > span[aria-current] { color: #ddfff6; }
.consult-progress > span[data-complete] { color: var(--scene-accent); }
.consult-progress i { width: 26px; height: 1px; background: var(--scene-line); }
.consult-world.bahia-arch { position: absolute; inset: 0; min-height: 0; background: none; }
.consult-world.bahia-arch::before, .consult-world.bahia-arch::after { content: none; }
.consult-world .bs-arch-canvas { cursor: grab; outline-offset: -5px; }
.consult-world .bs-arch-views { top: 86px; left: 0; width: 100%; justify-content: center; border: 0; background: transparent; transform: translateX(0); pointer-events: none; transition: transform 500ms cubic-bezier(.22,1,.36,1); }
.consult-world .bs-arch-views button { pointer-events: auto; font: 600 .7rem/1.2 var(--font-sans); }
.consult-world .bs-arch-readout { bottom: 226px; border: 0; background: transparent; font-size: .72rem; }
.consult-scene:not([data-phase="initial"]) .bs-arch-views { transform: translateX(-23%); }
.consult-scene:not([data-phase="initial"]) .bs-arch-readout { display: none; }
.consult-anatomy-space { position: absolute; top: 114px; bottom: 226px; left: 7%; width: 86%; pointer-events: none; }
.consult-scene:not([data-phase="initial"]) .consult-anatomy-space { top: 140px; bottom: 270px; left: 0; width: 55%; }
.consult-view-tools { position: absolute; z-index: 4; top: 144px; left: 34px; display: flex; flex-direction: column; gap: 4px; }
.consult-view-tools button {
  display: flex; justify-content: center; align-items: center; min-width: 40px; min-height: 40px;
  padding: 6px; border: 1px solid var(--scene-line); border-radius: 4px;
  background: rgb(9 35 46 / 80%); color: #d0e5e1; font-size: 1.15rem;
}
.consult-view-tools [data-arch-reset] span { display: none; }
.consult-view-tools .icon { width: 15px; height: 15px; }
.consult-scene[data-graphics="diagram"] .consult-view-tools { display: none; }
.consult-scene #consult-model-help { white-space: pre-line; }
.consult-intro { position: absolute; left: 20px; right: 20px; bottom: 89px; text-align: center; pointer-events: none; }
.consult-eyebrow { margin: 0 0 12px; color: var(--scene-accent); font-size: .65rem; font-weight: 650; letter-spacing: .13em; text-transform: uppercase; }
.consult-intro h3 { margin: 0 0 12px; font-size: clamp(1.7rem, 2.8vw, 2.6rem); font-weight: 550; line-height: 1.15; letter-spacing: -.045em; }
.consult-intro > p:not(.consult-eyebrow) { margin: 0 0 14px; color: var(--scene-muted); font-size: .8rem; line-height: 1.65; }
.consult-intro button { pointer-events: auto; }
.consult-text-action { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 8px 0; min-height: 40px; border: 0; background: transparent; color: var(--scene-accent); font-size: .73rem !important; line-height: 1.3; text-decoration-thickness: 1px; text-underline-offset: 5px; }
.consult-selection-tools { position: absolute; z-index: 6; bottom: 46px; left: 50%; display: flex; gap: 26px; transform: translateX(-50%); white-space: nowrap; }
.consult-scene:not([data-phase="initial"]) .consult-selection-tools { left: 5%; transform: none; bottom: 67px; gap: 22px; }
.consult-selection-tools [aria-pressed="true"] { text-decoration: underline; color: #f1fff9; }
.consult-selection-tools [aria-pressed="true"]::before { width: 5px; height: 5px; border-radius: 50%; background: currentColor; content: ""; }
.consult-model-context { position: absolute; left: 5%; bottom: 124px; width: 43%; display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 17px; pointer-events: none; }
.consult-context-eyebrow { grid-column: 1 / -1; color: var(--scene-muted); margin-bottom: 5px; font-size: .62rem; letter-spacing: .13em; text-transform: uppercase; }
.consult-model-context strong { color: #d8f7ed; font-size: clamp(1.8rem, 3vw, 3rem); font-weight: 450; letter-spacing: -.065em; line-height: 1.2; }
.consult-model-context [data-context-label] { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; max-width: 24ch; font-size: .73rem; color: #c4d9d8; line-height: 1.6; }
.consult-model-context .consult-concern-note { grid-column: 1 / -1; min-height: 18px; margin-top: 5px; color: var(--scene-accent); font-size: .7rem; }
.consult-selection { position: absolute; z-index: 9; left: 5%; bottom: 113px; width: min(365px, 90%); padding: 22px; border: 1px solid rgb(177 213 208 / 34%); border-radius: 6px; background: #15333e; box-shadow: 0 14px 35px rgb(0 14 21 / 20%); }
.consult-selection-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 15px; }
.consult-selection-heading strong { font-size: .85rem; font-weight: 600; }
.consult-selection-heading button { min-width: 40px; min-height: 40px; padding: 0; border: 0; background: none; color: #e5f5f0; font-size: 1.3rem; }
.consult-selection label { display: block; margin-bottom: 9px; font-size: .72rem; color: var(--scene-muted); }
.consult-selection select { width: 100%; min-height: 44px; padding: 9px; border: 1px solid #688a92; border-radius: 4px; background: #09232e; color: #f2faf7; font-size: 1rem; }
.consult-selection p { margin: 12px 0 4px; font-size: .72rem; line-height: 1.6; color: var(--scene-muted); }
.consult-selected-teeth { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.consult-selected-teeth button { min-height: 36px; padding: 6px 10px; border: 1px solid var(--scene-line); border-radius: 4px; background: #244650; color: #ddf6ef; font-size: .75rem; }
.consult-conversation { position: absolute; z-index: 5; top: 116px; right: 4.5%; bottom: 70px; width: 42%; display: flex; flex-direction: column; }
.consult-conversation-nav { display: flex; align-items: center; justify-content: space-between; min-height: 40px; margin-bottom: 24px; gap: 15px; }
.consult-conversation-nav > span { color: var(--scene-muted); font-size: .68rem; font-variant-numeric: tabular-nums; }
.consult-content { min-height: 0; padding: 4px 6px 10px; margin: -4px -6px 0; overflow-y: auto; overscroll-behavior-y: contain; scrollbar-width: thin; scrollbar-color: #557b82 transparent; }
.consult-conversation-actions { flex: 0 0 auto; padding-top: 16px; }
.consult-scene[data-phase="summary"] .consult-content { flex: 1 1 auto; }
.consult-content h3 { margin: 0 0 14px; max-width: 19ch; font-size: clamp(1.7rem, 2.6vw, 2.7rem); font-weight: 500; line-height: 1.17; letter-spacing: -.047em; text-wrap: balance; }
.consult-question-hint { max-width: 43ch; margin: 0 0 25px; color: var(--scene-muted); font-size: .78rem; line-height: 1.6; }
.consult-options { display: grid; gap: 7px; }
.consult-options[data-question-id="concern"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.consult-option { display: flex; justify-content: space-between; align-items: center; min-height: 51px; gap: 10px; padding: 13px 15px; text-align: left; border: 1px solid rgb(188 222 218 / 20%); border-radius: 4px; background: rgb(179 220 214 / 3%); color: #edf7f3; font-size: .79rem !important; line-height: 1.4; transition: background-color 140ms ease, border-color 140ms ease, transform 140ms ease, opacity 140ms ease; }
.consult-option-label { display: grid; gap: 4px; }
.consult-option small { color: var(--scene-muted); font-size: .69rem; }
.consult-option-mark { width: 16px; flex: 0 0 16px; color: #acd4cc; font-size: .8rem; }
.consult-option[aria-pressed="true"], .consult-option.is-confirmed { color: #f1fff9; border-color: #9be4d7; background: rgb(155 228 215 / 13%); }
.consult-option:active { transform: scale(.985); }
.consult-options[data-answering] .consult-option:not(.is-confirmed) { opacity: .4; }
.consult-answer-note { margin: 14px 0 0; font-size: .66rem; line-height: 1.6; color: #a8c1c4; }
.consult-summary { margin: 0 0 20px; }
.consult-summary-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--scene-line); }
.consult-summary-row dt { color: var(--scene-muted); font-size: .67rem; }
.consult-summary-row dd { grid-column: 1; margin: 0; font-size: .84rem; line-height: 1.4; }
.consult-summary-row button { grid-column: 2; grid-row: 1 / 3; color: var(--scene-accent); font-size: .65rem !important; min-height: 36px; }
.consult-consent { display: flex; align-items: start; gap: 10px; margin: 0 0 17px; color: #c3d5d5; font-size: .69rem; line-height: 1.6; cursor: pointer; }
.consult-consent input { width: 17px; height: 17px; margin: 2px 0 0; flex: 0 0 17px; accent-color: #9be4d7; }
.consult-send { display: flex; align-items: center; justify-content: space-between; gap: 18px; width: 100%; min-height: 52px; padding: 12px 18px; border: 1px solid #9be4d7; border-radius: 4px; color: #092b33; background: #9be4d7; font-weight: 700 !important; font-size: .85rem !important; transition: background-color 150ms ease, transform 150ms ease; }
.consult-send:active { transform: scale(.988); }
.consult-send:disabled { cursor: not-allowed; color: #c6dcda; background: #254c54; border-color: #567d83; }
.consult-send small { display: block; font-weight: 500; font-size: .64rem; text-align: left; margin-top: 3px; }
.consult-summary-actions { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 5px 16px; margin-top: 9px; }
.consult-copy-feedback { margin: 4px 0 0; color: var(--scene-accent); font-size: .7rem; line-height: 1.5; }
.consult-copy-feedback:empty { display: none; }
.consult-footline { position: absolute; z-index: 4; bottom: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; min-height: 43px; gap: 20px; padding: 10px 34px; border-top: 1px solid var(--scene-line); color: #abc4c7; font-size: .6rem; line-height: 1.5; }
.consult-foot-mark { letter-spacing: .16em; white-space: nowrap; font-size: .55rem; }
.consult-notes { display: flex; align-items: start; justify-content: space-between; gap: 30px; padding-top: 18px; color: var(--ink-soft); font-size: .7rem; line-height: 1.6; }
.consult-notes p { margin: 0; max-width: 61ch; }
.consult-notes p:last-child { text-align: right; }
.consult-notes a { color: inherit; text-underline-offset: 3px; }
.consult-nojs { position: absolute; z-index: 10; inset: 0; display: grid; place-content: center; padding: 30px; background: #09232e; }
.consult-nojs a { color: var(--scene-accent); }
.consult-scene[data-input="keyboard"] * { transition: none !important; }
@media (hover: hover) and (pointer: fine) {
  .consult-text-action:hover { color: #ebfff9; text-decoration: underline; }
  .consult-option:hover { border-color: #80b6b0; background: rgb(155 228 215 / 9%); }
  .consult-view-tools button:hover { color: #fff; border-color: #9be4d7; }
  .consult-send:not(:disabled):hover { background: #c1f1e5; }
}
@media (max-width: 1100px) and (min-width: 761px) {
  .consult-topline { padding-inline: 22px; }
  .consult-progress { gap: 9px; }
  .consult-progress i { width: 14px; }
  .consult-conversation { right: 3%; width: 44%; }
  .consult-option { padding: 11px; font-size: .73rem !important; }
  .consult-selection-tools { gap: 16px; }
  .consult-scene:not([data-phase="initial"]) .consult-selection-tools { left: 4%; gap: 16px; }
}
@media (max-width: 760px) {
  .explorer-section { overflow: visible; }
  .consult-scene { height: clamp(710px, calc(100svh - 76px), 850px); width: calc(100% + 24px); margin-inline: -12px; border-radius: 6px; }
  .consult-topline { min-height: 54px; padding: 0 17px; gap: 12px; }
  .consult-signature { font-size: .66rem; gap: 7px; }
  .consult-progress { gap: 9px; }
  .consult-progress > span > span { display: none; }
  .consult-progress > span { font-size: .65rem; }
  .consult-progress i { width: 16px; }
  .consult-anatomy-space { top: 105px; bottom: 235px; left: 0; width: 100%; }
  .consult-scene:not([data-phase="initial"]) .consult-anatomy-space { top: 90px; bottom: auto; height: 164px; left: 14%; width: 72%; }
  .consult-world .bs-arch-views, .consult-scene:not([data-phase="initial"]) .bs-arch-views { top: 64px; left: 0; transform: none; }
  .consult-world .bs-arch-views button { min-height: 31px; padding: 6px 10px; font-size: .6rem; }
  .consult-world .bs-arch-readout { bottom: 238px; font-size: .64rem; }
  .consult-scene:not([data-phase="initial"]) .bs-arch-readout { display: none; }
  .consult-view-tools { left: 13px; top: 129px; gap: 4px; }
  .consult-view-tools button { min-width: 36px; min-height: 36px; font-size: 1rem; }
  .consult-intro { bottom: 111px; }
  .consult-intro h3 { font-size: 1.75rem; }
  .consult-intro > p:not(.consult-eyebrow) { font-size: .76rem; }
  .consult-selection-tools, .consult-scene:not([data-phase="initial"]) .consult-selection-tools { bottom: 63px; left: 50%; transform: translateX(-50%); gap: 22px; }
  .consult-scene:not([data-phase="initial"]) .consult-selection-tools { top: 279px; bottom: auto; width: calc(100% - 36px); justify-content: space-between; }
  .consult-selection-tools .consult-text-action { font-size: .68rem !important; }
  .consult-model-context { left: 18px; right: 18px; top: 249px; bottom: auto; width: auto; display: flex; align-items: center; gap: 9px; }
  .consult-context-eyebrow { display: none; }
  .consult-model-context strong { font-size: 1.2rem; letter-spacing: -.04em; white-space: nowrap; }
  .consult-model-context [data-context-label] { max-width: none; font-size: .64rem; line-height: 1.3; }
  .consult-model-context .consult-concern-note { display: none; }
  .consult-selection { left: 18px; top: 109px; bottom: auto; width: calc(100% - 36px); max-height: 330px; padding: 14px 18px; overflow-y: auto; }
  .consult-conversation { top: 326px; bottom: 49px; left: 18px; right: 18px; width: auto; }
  .consult-conversation-nav { min-height: 28px; margin-bottom: 12px; }
  .consult-conversation-nav .consult-text-action { min-height: 28px; padding: 0; font-size: .68rem !important; }
  .consult-conversation-nav > span { font-size: .64rem; }
  .consult-content h3 { max-width: 24ch; margin-bottom: 10px; font-size: 1.64rem; line-height: 1.18; }
  .consult-question-hint { margin-bottom: 16px; font-size: .73rem; }
  .consult-options { gap: 6px; }
  .consult-option { min-height: 44px; padding: 10px 11px; font-size: .73rem !important; }
  .consult-answer-note { margin-top: 11px; font-size: .62rem; }
  .consult-summary-row { padding: 8px 0; }
  .consult-summary-row dd { font-size: .76rem; }
  .consult-scene[data-phase="summary"] .consult-content h3 { font-size: 1.45rem; }
  .consult-scene[data-phase="summary"] .consult-question-hint { display: none; }
  .consult-conversation-actions { padding-top: 10px; }
  .consult-conversation-actions .consult-consent { margin-bottom: 10px; font-size: .64rem; }
  .consult-conversation-actions .consult-summary-actions { margin-top: 3px; }
  .consult-consent { font-size: .66rem; }
  .consult-footline { padding: 8px 17px; min-height: 41px; font-size: .57rem; }
  .consult-foot-mark { display: none; }
  .consult-notes { flex-direction: column; gap: 8px; font-size: .62rem; padding-top: 13px; }
  .consult-notes p:last-child { text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
  .consult-scene *, .consult-scene *::before, .consult-scene *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media (forced-colors: active) {
  .consult-option, .consult-send, .consult-selection { border: 1px solid ButtonText; }
  .consult-option[aria-pressed="true"] { outline: 2px solid Highlight; }
}
