@import url("../v2-layout.css?v=20261012-secondary1");

:root {
  --v2-surface-canvas: oklch(0.968 0.0025 245);
  --surface-raised: oklch(0.992 0.0018 245);
  --surface-soft: oklch(0.975 0.003 245);
  --surface-strong: oklch(0.945 0.004 245);
  --surface-blue: oklch(0.955 0.012 242);
  --text-strong: oklch(0.22 0.012 250);
  --text-body: oklch(0.38 0.014 250);
  --text-muted: oklch(0.46 0.016 250);
  --text-faint: oklch(0.61 0.014 250);
  --accent: oklch(0.46 0.065 242);
  --accent-strong: oklch(0.4 0.09 242);
  --border-input: oklch(0.78 0.012 245);
  --border-soft: oklch(0.89 0.006 245);
  --danger: oklch(0.54 0.16 28);
  --success: oklch(0.52 0.11 155);
  --focus-ring: oklch(0.64 0.12 250 / 0.35);
  --interview-content-width: 920px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  font-family: Inter, "Noto Sans SC", "PingFang SC", system-ui, sans-serif;
  color: var(--text-body);
  background: var(--v2-surface-canvas);
}

* { box-sizing: border-box; }
html, body { min-width: 320px; min-height: 100%; margin: 0; }
body { background: var(--v2-surface-canvas); color: var(--text-body); font: 14px/1.62 Inter, "Noto Sans SC", "PingFang SC", system-ui, sans-serif; }
button, input, textarea { font: inherit; }
button, a, label { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, .conversation-scroll:focus-visible {
  outline: 3px solid var(--focus-ring); outline-offset: 2px;
}
.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.page-shell { min-height: 100dvh; display: flex; flex-direction: column; }
.site-header { position: sticky; top: 0; z-index: 20; height: 64px; flex: 0 0 64px; background: var(--v2-surface-canvas); }
.site-header.is-scrolled { box-shadow: inset 0 -1px var(--border-soft); }
.site-header__inner { width: min(var(--v2-layout-shell), calc(100% - var(--v2-layout-gutter))); height: 100%; margin: 0 auto; display: flex; align-items: center; gap: 32px; }
.brand { display: inline-flex; align-items: center; gap: 8px; color: var(--text-strong); font-size: 18px; font-weight: 650; text-decoration: none; }
.brand__mark { width: 20px; height: 20px; }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.quiet-action svg, .back-link svg, .dialog-close svg { width: 100%; height: 100%; }
.save-state { display: inline-flex; align-items: center; gap: 7px; color: var(--text-muted); font-size: 13px; }
.save-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--success); }
.quiet-action, .history-action, .back-link {
  border: 0; background: transparent; color: var(--text-muted); cursor: pointer; text-decoration: none;
  transition: color 180ms ease, background-color 180ms ease;
}
.quiet-action { min-height: 38px; display: inline-flex; align-items: center; gap: 6px; padding: 0 8px; border-radius: var(--radius-sm); font-size: 13px; }
.quiet-action svg { width: 16px; height: 16px; }
.quiet-action:hover, .back-link:hover, .history-action:hover { color: var(--text-strong); }
.quiet-action:hover { background: oklch(0.92 0.004 245); }

.workspace {
  width: min(var(--v2-layout-workspace), calc(100% - var(--v2-layout-gutter))); height: calc(100dvh - 64px); min-height: 0; margin: 0 auto;
  display: flex; flex-direction: column; padding: 4px 0 16px;
}
.task-context {
  width: min(1040px, 100%);
  margin-inline: auto;
  flex: 0 0 auto;
  display: grid;
  grid-template-rows: 34px auto;
  row-gap: 14px;
}
.back-link { width: max-content; min-height: 34px; display: inline-flex; align-items: center; gap: 5px; font-size: 13px; }
.back-link.is-placeholder { visibility: hidden; pointer-events: none; }
.back-link svg { width: 16px; height: 16px; }
.title-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.eyebrow, .question-kicker, .dialog-eyebrow, .sheet-header p {
  margin: 0 0 4px; color: var(--text-muted); font-size: 12px; font-weight: 500; letter-spacing: 0.03em;
}
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 0; color: var(--text-strong); font-size: 27px; line-height: 1.3; font-weight: 620; letter-spacing: -0.018em; }
.history-action { min-height: 36px; padding: 0 2px 0 0; display: inline-flex; align-items: center; gap: 5px; font-size: 13px; }
.history-action[hidden] { display: none; }
.history-action svg { width: 16px; height: 16px; }
.stage-current, .capability-states, .capability-states span { display: flex; align-items: center; }
.stage-current { gap: 8px; color: var(--text-strong); font-size: 14px; font-weight: 580; }
.agent-spark { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px oklch(0.89 0.03 250); }
.stage-status { color: var(--accent-strong); font-size: 12px; font-weight: 520; }
.capability-states { flex-wrap: wrap; justify-content: flex-end; gap: 14px; color: var(--text-muted); font-size: 12px; }
.capability-states span { gap: 6px; }
.state-check, .state-pending { width: 6px; height: 6px; border-radius: 50%; }
.state-check { background: var(--success); }
.state-pending { border: 1px solid var(--text-faint); background: transparent; }

.conversation-region {
  width: min(1040px, 100%); min-height: 0; flex: 1 1 auto; margin: 20px auto 0; border-radius: var(--radius-md); background: var(--surface-raised);
  display: grid; grid-template-rows: auto minmax(180px, 1fr) auto; overflow: hidden;
}
.conversation-header {
  position: relative; z-index: 2; min-height: 62px; padding: 15px 24px; background: var(--surface-raised);
  display: flex; align-items: center; justify-content: space-between; gap: 20px; transition: box-shadow 160ms ease;
}
.conversation-header.has-content-above { box-shadow: 0 7px 14px -12px oklch(0.22 0.014 250 / .126); }
.conversation-scroll {
  min-height: 0; overflow: auto; overscroll-behavior: contain; scroll-behavior: smooth;
  scrollbar-width: thin; scrollbar-color: oklch(0.81 0.006 250) transparent;
}
.conversation-inner { width: min(var(--interview-content-width), calc(100% - 48px)); margin: 0 auto; padding: 18px 0 30px; }
.conversation-region:has(.answer-dock.is-profile-node) .conversation-inner,
.conversation-region:has(.client-answer-dock) .conversation-inner { width: min(800px, calc(100% - 48px)); }
.message + .message { margin-top: 28px; }
.speaker-row { min-height: 28px; display: flex; align-items: center; gap: 8px; color: var(--text-muted); font-size: 12px; }
.speaker-name { color: var(--text-strong); font-size: 12.5px; line-height: 1.4; font-weight: 590; letter-spacing: -0.004em; }
.speaker-row time, .user-meta time { color: var(--text-faint); font-size: 9.5px; }
.agent-avatar {
  width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%;
  background: var(--surface-blue); color: var(--accent);
}
.agent-avatar.is-active { background: oklch(0.925 0.025 242); color: var(--accent-strong); }
.agent-avatar svg { width: 15px; height: 15px; }
.agent-copy { width: 100%; max-width: none; padding: 8px 0 0; color: oklch(0.285 0.012 250); font-size: 13.5px; line-height: 1.72; font-weight: 400; }
.agent-copy p { margin-bottom: 8px; }
.agent-copy p:last-child { margin-bottom: 0; }
.agent-working { width: fit-content; margin: 0; display: flex; align-items: center; gap: 8px; color: var(--text-faint); font-size: 10.5px; line-height: 1.45; }
.working-dot { position: relative; width: 6px; height: 6px; flex: 0 0 auto; border-radius: 50%; background: var(--accent); }
.working-dot::after { position: absolute; inset: -3px; border-radius: inherit; background: color-mix(in oklch, var(--accent) 20%, transparent); content: ""; animation: working-breathe 2.4s ease-in-out infinite; }
@keyframes working-breathe { 0%, 100% { opacity: .24; transform: scale(.8); } 50% { opacity: .72; transform: scale(1.06); } }
.user-message { width: fit-content; max-width: min(520px, 68%); margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.user-meta { display: flex; align-items: center; justify-content: flex-end; gap: 8px; color: var(--text-muted); font-size: 12px; }
.user-meta span { color: var(--text-strong); font-size: 12.5px; line-height: 1.4; font-weight: 590; letter-spacing: -0.004em; }
.user-bubble {
  width: auto; padding: 10px 13px; border-radius: 10px 10px 3px 10px;
  background: var(--surface-soft); color: oklch(0.285 0.012 250); font-size: 13.5px; line-height: 1.72; font-weight: 400;
}
.case-context-card {
  margin: 0 0 28px; padding: 18px 20px 17px; border: 1px solid var(--border-soft); border-radius: var(--radius-md);
  background: var(--surface-soft); color: var(--text-body);
}
.case-context-card__title { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.case-context-card__title h2 { margin: 0; color: var(--text-strong); font-size: 16px; line-height: 1.45; font-weight: 610; letter-spacing: -0.01em; }
.case-context-card__title > span { padding: 3px 7px; border-radius: 999px; background: var(--surface-raised); color: var(--text-muted); font-size: 10px; line-height: 1.4; }
.case-context-card > p { margin: 9px 0 0; color: var(--text-body); font-size: 13.5px; line-height: 1.7; }
.case-context-card dl { margin: 13px 0 0; display: flex; flex-wrap: wrap; gap: 8px 26px; }
.case-context-card dl > div { display: inline-flex; align-items: center; gap: 5px; min-width: 0; }
.case-context-card dt { color: var(--text-muted); font-size: 12px; font-weight: 560; }
.case-context-card dt::after { content: "："; }
.case-context-card dd { margin: 0; display: inline-flex; align-items: center; gap: 4px; color: var(--text-body); font-size: 12px; }
.case-context-card dd svg { width: 14px; height: 14px; flex: 0 0 auto; color: var(--text-muted); }

.answer-stack { width: min(var(--interview-content-width), calc(100% - 48px)); margin: 0 auto 16px; display: flex; flex-direction: column; align-items: center; }
.completion-rail {
  position: relative; z-index: 1; width: calc(100% - 24px); min-height: 48px; margin: 0 auto -10px; padding: 8px 10px 18px 14px;
  border: 1px solid var(--border-soft); border-radius: 13px 13px 9px 9px; background: var(--surface-soft);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.completion-rail[hidden] { display: none; }
.completion-rail:focus { outline: none; }
.completion-rail__copy {
  min-height: 32px; display: inline-flex; align-items: center;
  color: var(--text-muted); font-size: 12px; line-height: 1;
}
.completion-rail__action {
  height: 32px; min-height: 32px; padding: 0 13px; border: 1px solid var(--text-strong); border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center; line-height: 1;
  background: var(--text-strong); color: var(--surface-raised); cursor: pointer; font-size: 12px; font-weight: 560;
  transition: background-color 160ms ease, border-color 160ms ease, transform 100ms ease;
}
.completion-rail__action:hover:not(:disabled) { border-color: oklch(0.28 0.014 250); background: oklch(0.28 0.014 250); }
.completion-rail__action:active:not(:disabled) { transform: translateY(1px); }
.completion-rail__action:disabled { border-color: var(--border-input); background: var(--surface-strong); color: var(--text-faint); cursor: wait; }
.completion-rail__action:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
.answer-dock {
  position: relative; z-index: 2; width: 100%; margin: 0; padding: 15px 14px 12px;
  border: 1px solid oklch(0.935 0.003 245); border-radius: 15px; background: var(--surface-raised);
  box-shadow: 0 5px 18px oklch(0.22 0.014 250 / .06), 0 1px 3px oklch(0.22 0.014 250 / .03);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.answer-dock:focus-within { border-color: oklch(0.86 0.007 245); box-shadow: 0 7px 22px oklch(0.22 0.014 250 / .075), 0 1px 3px oklch(0.22 0.014 250 / .04); }
.answer-dock.is-text-composer { padding: 13px 14px 10px; }
.conversation-input { width: 100%; min-height: 58px; max-height: 148px; padding: 0 2px; resize: none; overflow-y: auto; border: 0; background: transparent; color: var(--text-strong); line-height: 1.62; outline: 0; }
.conversation-input::placeholder { color: oklch(0.74 0.006 245); font-weight: 400; opacity: 1; }
.conversation-input:disabled { color: var(--text-faint); cursor: default; }
.answer-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.answer-heading h2 { margin-bottom: 0; color: var(--text-strong); font-size: 15px; line-height: 1.45; font-weight: 590; }
.choice-list { margin-top: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.choice-list--single { grid-template-columns: 1fr; }
.choice-row {
  min-height: 60px; display: flex; align-items: center; gap: 10px; padding: 10px 11px 10px 12px;
  border: 1px solid var(--border-soft); border-radius: var(--radius-md); cursor: pointer;
  transition: border-color 180ms ease, background-color 180ms ease;
}
.choice-row:hover { border-color: oklch(0.72 0.035 250); background: oklch(0.975 0.004 248); }
.choice-row:has(input:checked) { border-color: oklch(0.69 0.07 250); background: var(--surface-blue); }
.choice-row input { position: absolute; opacity: 0; pointer-events: none; }
.choice-row:has(input:focus-visible) { outline: 3px solid var(--focus-ring); outline-offset: 1px; }
.choice-copy { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.choice-copy strong { color: var(--text-strong); font-size: 13px; font-weight: 550; }
.choice-copy small { overflow: hidden; color: var(--text-muted); font-size: 11px; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
.choice-check { width: 16px; height: 16px; flex: 0 0 16px; color: var(--accent-strong); opacity: 0; transform: scale(.75); transition: opacity 160ms ease, transform 160ms cubic-bezier(.22, 1, .36, 1); }
.choice-row:has(input:checked) .choice-check { opacity: 1; transform: scale(1); }
.other-field, .supplement-field { margin-top: 9px; padding: 0 11px; border: 1px solid oklch(0.925 0.004 245); border-radius: 10px; background: oklch(0.982 0.002 245); }
.other-field { min-height: 60px; padding-inline: 12px; display: flex; align-items: center; }
.other-field input, .supplement-field input {
  width: 100%; height: 42px; padding: 0; border: 0; border-radius: 0;
  background: transparent; color: var(--text-strong); font-size: 13px; outline: 0;
}
.other-field input { height: 54px; }
.other-field:focus-within, .supplement-field:focus-within { border-color: oklch(0.78 0.025 245); background: oklch(0.988 0.002 245); }
.other-field input::placeholder { color: oklch(0.74 0.006 245); }
.supplement-field input::placeholder { color: oklch(0.68 0.008 245); }
.answer-toolbar { min-height: 34px; margin-top: 9px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.choice-hint { color: var(--text-faint); font-size: 11px; }
.composer-icon-button { width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%; display: grid; place-items: center; background: transparent; color: var(--text-muted); cursor: pointer; transition: background-color 150ms ease, color 150ms ease, transform 100ms ease; }
.composer-icon-button svg { width: 18px; height: 18px; }
.composer-icon-button:hover:not(:disabled) { background: var(--surface-strong); color: var(--text-strong); }
.composer-icon-button:disabled { color: var(--text-faint); opacity: .45; cursor: default; }
.composer-icon-button:active:not(:disabled) { transform: scale(.94); }
.composer-icon-button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.message-composer__attachments { display: flex; flex-wrap: wrap; gap: 7px; padding-bottom: 3px; }
.composer-attachment { min-width: 0; max-width: min(280px, 100%); min-height: 34px; padding: 5px 7px 5px 9px; border-radius: 8px; background: var(--surface-soft); display: grid; grid-template-columns: 16px minmax(0, 1fr) 24px; align-items: center; gap: 7px; }
.composer-attachment > svg { width: 16px; height: 16px; color: var(--text-muted); }
.composer-attachment__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-muted); font-size: 11px; }
.composer-attachment__remove { width: 24px; height: 24px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--text-faint); display: grid; place-items: center; cursor: pointer; }
.composer-attachment__remove:hover { background: var(--surface-strong); color: var(--text-strong); }
.composer-attachment__remove svg { width: 14px; height: 14px; }
.message-attachments { margin-top: 9px; display: grid; gap: 6px; }
.message-attachment { min-width: 0; padding: 8px 10px; border-radius: 8px; background: color-mix(in oklch, var(--surface-raised) 58%, transparent); display: grid; grid-template-columns: 18px minmax(0, 1fr); align-items: center; gap: 8px; }
.message-attachment svg { width: 17px; height: 17px; color: var(--text-muted); }
.message-attachment span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-muted); font-size: 11px; }
.answer-dock.is-waiting { cursor: progress; }
.answer-dock.is-profile-node { width: min(800px, 100%); max-height: min(470px, 58dvh); padding: 0; overflow: auto; border-color: oklch(0.91 0.004 245); box-shadow: 0 5px 18px oklch(0.22 0.014 250 / .045); }
.profile-node { padding: 16px 18px 6px; }
.profile-node__heading { margin-bottom: 4px; }
.profile-node__heading strong { color: var(--text-strong); font-size: 14px; font-weight: 590; }
.profile-field-row { min-height: 60px; display: grid; grid-template-columns: 88px minmax(220px, 460px) max-content; align-items: center; justify-content: start; column-gap: 12px; padding: 8px 0; }
.profile-field-row--without-control { grid-template-columns: 88px minmax(220px, 460px); padding-right: 0; }
.profile-field-row + .profile-field-row { margin-top: 2px; }
.profile-field-copy { min-width: 0; }
.profile-field-copy strong { color: var(--text-strong); font-size: 12.5px; font-weight: 550; }
.profile-field-row > input, .profile-field-group input { width: 100%; height: 32px; padding: 4px 2px 2px; border: 0; border-bottom: 1px solid var(--border-input); border-radius: 0; background: transparent; color: var(--text-strong); font-size: 12.5px; outline: 0; transition: border-color 150ms ease; }
.profile-field-row > input:focus, .profile-field-group input:focus { border-bottom-color: var(--accent-strong); }
.profile-field-row > input::placeholder, .profile-field-group input::placeholder { color: oklch(0.71 0.008 245); opacity: 1; }
.profile-field-group { display: grid; grid-template-columns: 1.25fr 1fr .75fr; gap: 12px; }
.profile-permission-switch { justify-self: start; min-height: 34px; margin-left: 8px; display: inline-flex; align-items: center; gap: 8px; color: var(--text-muted); cursor: pointer; font-size: 11px; font-weight: 400; }
.profile-permission-switch span { font-weight: 400; }
.profile-permission-switch input { position: absolute; opacity: 0; pointer-events: none; }
.profile-permission-switch i { position: relative; width: 34px; height: 20px; flex: 0 0 auto; border-radius: 999px; background: oklch(0.84 0.006 245); transition: background-color 160ms ease; }
.profile-permission-switch i::after { position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: var(--surface-raised); box-shadow: 0 1px 3px oklch(0.2 0.01 250 / .18); content: ""; transition: transform 180ms cubic-bezier(.22, 1, .36, 1); }
.profile-permission-switch input:checked + i { background: var(--text-strong); }
.profile-permission-switch input:checked + i::after { transform: translateX(14px); }
.profile-permission-switch input:focus-visible + i { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
.profile-node__actions { position: sticky; bottom: 0; min-height: 58px; display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 9px 18px; background: var(--surface-raised); }
.profile-node__actions .primary-button { width: auto; min-height: 38px; }
.profile-skip { min-height: 36px; padding: 0 8px; border: 0; border-radius: 8px; background: transparent; color: var(--text-muted); cursor: pointer; font-size: 12px; }
.profile-skip:hover { background: var(--surface-soft); color: var(--text-strong); }
.composer-add-button { min-height: 34px; padding: 0 8px 0 6px; border: 0; border-radius: 9px; background: transparent; color: var(--text-muted); display: inline-flex; align-items: center; gap: 5px; cursor: pointer; font-size: 12px; transition: background-color 150ms ease, color 150ms ease; }
.composer-add-button svg { width: 18px; height: 18px; }
.composer-add-button:hover, .composer-add-button[aria-expanded="true"] { background: var(--surface-soft); color: var(--text-strong); }
.composer-send-button { width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%; background: var(--text-strong); color: var(--surface-raised); display: grid; place-items: center; cursor: pointer; transition: background-color 150ms ease, color 150ms ease, transform 100ms ease; }
.composer-send-button svg { width: 18px; height: 18px; }
.composer-send-button:hover:not(:disabled) { background: oklch(0.28 0.014 250); }
.composer-send-button:active:not(:disabled) { transform: scale(.94); }
.composer-send-button:disabled { background: var(--surface-strong); color: var(--text-faint); cursor: default; }
.composer-send-button:focus-visible, .composer-add-button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.primary-button, .secondary-button {
  min-height: 40px; border-radius: 10px; padding: 0 18px; cursor: pointer; font-size: 13px; font-weight: 560;
  transition: background-color 180ms ease, color 180ms ease, transform 120ms ease;
}
.primary-button { border: 1px solid var(--text-strong); background: var(--text-strong); color: var(--surface-raised); }
.primary-button:hover { border-color: oklch(0.2 0.012 255); background: oklch(0.2 0.012 255); }
.primary-button:active, .secondary-button:active { transform: translateY(1px); }
.primary-button:disabled { border-color: oklch(0.81 0.006 250); background: oklch(0.81 0.006 250); color: oklch(0.97 0.003 245); cursor: not-allowed; }
.secondary-button { border: 1px solid var(--border-input); background: transparent; color: var(--text-body); }
.secondary-button:hover { background: var(--surface-soft); }
.form-error { margin: 10px 0 0; color: var(--danger); font-size: 12px; }
.interview-summary { padding: 3px 2px 2px; }
.interview-summary h2 { margin: 0; color: var(--text-strong); font-size: 15px; font-weight: 590; }
.interview-summary dl { margin: 15px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.interview-summary dt { color: var(--text-muted); font-size: 11px; }
.interview-summary dd { margin: 4px 0 0; color: var(--text-body); font-size: 12.5px; line-height: 1.6; }
.summary-actions { justify-content: flex-end; }
.summary-actions a { display: inline-flex; align-items: center; text-decoration: none; }
.system-event { width: fit-content; margin: 22px auto 0; display: flex; align-items: center; gap: 7px; color: var(--text-muted); font-size: 12px; }
.system-event::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--success); }

.exit-dialog {
  width: min(420px, calc(100% - 32px)); padding: 28px; border: 0; border-radius: 18px;
  background: var(--surface-raised); color: var(--text-body); box-shadow: 0 24px 70px oklch(0.18 0.02 255 / 0.2);
}
.exit-dialog::backdrop { background: oklch(0.22 0.015 255 / 0.26); }
.dialog-close { width: 36px; height: 36px; display: grid; place-items: center; padding: 9px; border: 0; border-radius: 50%; background: transparent; color: var(--text-muted); cursor: pointer; }
.exit-dialog > .dialog-close { position: absolute; top: 16px; right: 16px; }
.dialog-close:hover { background: var(--surface-soft); color: var(--text-strong); }
.exit-dialog h2, .sheet-header h2 { margin-bottom: 8px; color: var(--text-strong); font-size: 21px; font-weight: 610; }
.exit-dialog > p:not(.dialog-eyebrow) { margin-bottom: 0; color: var(--text-muted); font-size: 14px; line-height: 1.7; }
.dialog-actions { margin-top: 24px; display: flex; justify-content: flex-end; gap: 10px; }

.review-sheet { position: fixed; inset: 0; z-index: 40; visibility: hidden; pointer-events: none; }
.review-sheet.is-open { visibility: visible; pointer-events: auto; }
.sheet-backdrop { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: oklch(0.22 0.015 255 / 0.18); opacity: 0; transition: opacity 220ms cubic-bezier(.22, 1, .36, 1); }
.sheet-panel {
  position: absolute; top: 0; right: 0; width: min(420px, 92vw); height: 100%; padding: 30px 30px 24px;
  background: var(--surface-raised); box-shadow: -18px 0 54px oklch(0.2 0.02 255 / 0.12);
  transform: translateX(100%); transition: transform 260ms cubic-bezier(.22, 1, .36, 1);
}
.review-sheet.is-open .sheet-backdrop { opacity: 1; }
.review-sheet.is-open .sheet-panel { transform: translateX(0); }
.sheet-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.sheet-header h2 { margin-bottom: 0; }
.sheet-intro { max-width: 280px; margin: 7px 0 0; color: var(--text-muted); font-size: 12px; line-height: 1.6; }
.review-capabilities { margin-top: 30px; }
.review-capability + .review-capability { margin-top: 32px; }
.review-capability__header { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.review-capability__header h3 { margin: 0; color: var(--text-strong); font-size: 15px; font-weight: 590; }
.review-status { flex: 0 0 auto; font-size: 11px; font-weight: 500; }
.review-status.is-current { color: var(--accent-strong); }
.review-status.is-complete { color: var(--success); }
.review-status.is-pending { color: var(--text-faint); }
.review-list { margin: 16px 0 0; }
.review-list div + div { margin-top: 18px; }
.review-list dt { margin-bottom: 6px; color: var(--text-muted); font-size: 12px; }
.review-list dd { margin: 0; color: var(--text-body); font-size: 14px; line-height: 1.75; }
.review-list--compact div + div { margin-top: 14px; }
.review-empty { margin: 12px 0 0; color: var(--text-faint); font-size: 13px; }
.sheet-note { margin: 32px 0 0; padding: 14px; border-radius: var(--radius-md); background: var(--surface-soft); color: var(--text-muted); font-size: 12px; line-height: 1.65; }
.case-complete-actions { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.case-complete-actions > span { color: var(--text-muted); font-size: 13px; line-height: 1.6; }
.case-complete-actions .primary-button { flex: 0 0 auto; text-decoration: none; }

@media (max-width: 760px) {
  .site-header { height: auto; min-height: 64px; }
  .site-header__inner { width: calc(100% - var(--v2-layout-gutter-mobile)); min-height: 64px; gap: 16px; }
  .save-state { display: none; }
  .quiet-action span { display: none; }
  .workspace { width: calc(100% - var(--v2-layout-gutter-mobile)); height: calc(100dvh - 64px); padding: 8px 0 20px; }
  .task-context { row-gap: 10px; }
  .title-row { align-items: flex-start; }
  h1 { font-size: 24px; }
  .capability-states { justify-content: flex-start; }
  .conversation-region { margin-top: 16px; grid-template-rows: auto minmax(180px, 1fr) auto; }
  .conversation-header { min-height: auto; padding: 14px 18px; align-items: flex-start; flex-direction: column; gap: 8px; }
  .case-context-card { padding: 16px; }
  .case-context-card dl { align-items: flex-start; flex-direction: column; gap: 6px; }
  .conversation-inner,
  .conversation-region:has(.answer-dock.is-profile-node) .conversation-inner,
  .conversation-region:has(.client-answer-dock) .conversation-inner { width: calc(100% - 20px); padding-top: 10px; }
  .user-message { max-width: 84%; }
  .answer-stack { width: calc(100% - 20px); margin-bottom: 10px; }
  .completion-rail { width: calc(100% - 16px); padding-inline: 12px 9px; }
  .completion-rail__copy { font-size: 11.5px; }
  .answer-dock { width: 100%; padding: 14px; }
  .answer-dock.is-profile-node { max-height: 56dvh; padding: 0; }
  .profile-node { padding: 14px 14px 4px; }
  .profile-field-row { grid-template-columns: 1fr; gap: 7px; padding: 11px 0; }
  .profile-field-row--without-control { padding-right: 0; }
  .profile-field-group { grid-template-columns: 1fr; gap: 6px; }
  .profile-permission-switch { justify-self: start; margin-left: 0; }
  .profile-node__actions { padding-inline: 14px; }
  .profile-node__actions .primary-button { width: auto; }
  .choice-list { grid-template-columns: 1fr; max-height: 190px; overflow: auto; }
  .choice-list--single { max-height: none; }
  .primary-button { width: 100%; }
  .case-complete-actions { align-items: stretch; flex-direction: column; }
  .interview-summary dl { grid-template-columns: 1fr; gap: 12px; }
  .summary-actions { align-items: stretch; flex-direction: column; }
  .summary-actions .secondary-button { justify-content: center; }
}

@media (max-height: 780px) and (min-width: 761px) {
  .workspace { padding-top: 4px; padding-bottom: 16px; }
  .conversation-region { margin-top: 12px; grid-template-rows: auto minmax(125px, 1fr) auto; }
  .conversation-header { min-height: 56px; padding-block: 12px; }
  .conversation-inner { padding-top: 8px; }
  .message + .message { margin-top: 16px; }
  .answer-stack { margin-bottom: 12px; }
  .answer-dock { padding-top: 13px; padding-bottom: 10px; }
  .choice-row, .other-field { min-height: 50px; }
  .choice-row { padding-block: 7px; }
  .other-field input { height: 48px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; }
  .working-dot::after { animation: none; opacity: .45; transform: none; }
}

/* Real interview answers may contain long URLs and several evidence sections. */
.review-list dd, .agent-copy, .user-bubble { overflow-wrap: anywhere; white-space: pre-wrap; }
.sheet-panel { overflow-y: auto; overscroll-behavior: contain; }
