:root {
  color-scheme: dark;
  --ink: #ededed;
  --ink-soft: #d0d0d0;
  --muted: #ababab;
  --paper: #212121;
  --paper-deep: #191919;
  --panel: #212121;
  --panel-tint: #262626;
  --navy: #131313;
  --navy-soft: #303030;
  --blue: #e5e5e5;
  --blue-deep: #fff;
  --blue-pale: #333;
  --line: #393939;
  --line-strong: #585858;
  --green: #79d5ac;
  --green-pale: #203b30;
  --amber: #edbc70;
  --amber-pale: #413523;
  --danger: #ff9d96;
  --shadow: none;
}
html {
  scroll-behavior: auto;
}
body {
  background: #212121;
  color: var(--ink);
  font-size: 14px;
}
button,
input,
select,
textarea {
  font: inherit;
}
a {
  color: inherit;
}
button {
  box-shadow: none !important;
  background: #ededed;
  color: #202020;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 9px 15px;
  font-weight: 500;
}
button:hover {
  background: #fff;
  color: #000 !important;
  transform: none;
}
button.quiet,
.child-toggle,
.edit-trigger,
.inline-delete {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line-strong);
}
button.quiet:hover,
.child-toggle:hover,
.edit-trigger:hover {
  background: #fff;
  color: #000 !important;
}
.topbar-actions a:hover {
  background: #fff;
  color: #000;
}
button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
input,
textarea,
select,
.platform-form input,
.platform-form select,
.platform-form textarea,
.chat-filters input,
.chat-filters select {
  background: #212121;
  color: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  box-shadow: none;
  padding: 10px 12px;
  min-width: 0;
}
textarea {
  font: inherit;
  max-width: 100%;
  width: 100%;
}
input::placeholder,
textarea::placeholder {
  color: #aaa;
}
input:focus-visible,
button:focus-visible,
a:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid #dfdfdf;
  outline-offset: 3px;
}
::selection {
  background: #595959;
  color: white;
}
::-webkit-scrollbar-thumb {
  background: #626262;
  border-color: #212121;
}
::-webkit-scrollbar-track {
  background: #212121;
}
[hidden] {
  display: none !important;
}
.dashboard .topbar {
  position: fixed;
  left: 252px;
  right: 0;
  top: 0;
  height: 78px;
  background: #212121;
  border-bottom: 1px solid var(--line);
  z-index: 5;
}
.topbar-inner {
  max-width: none;
  height: 100%;
  padding: 0 32px;
  margin: 0;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.topbar .brand,
.intro,
.workflow-nav h2 {
  display: none;
}
.workspace-title {
  font-size: 23px;
  line-height: 1.3;
  font-weight: 600;
  margin: 0;
  letter-spacing: 0;
}
.topbar-actions {
  display: flex;
  gap: 10px;
}
.topbar-actions a {
  font-size: 13px;
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--ink);
  padding: 8px 12px;
  border-radius: 8px;
}
.dashboard main {
  max-width: none;
  margin: 0;
  padding: 110px 32px 50px 284px;
}
.workbench {
  display: block;
}
.workflow-nav {
  position: fixed;
  inset: 0 auto 0 0;
  width: 252px;
  height: 100dvh;
  background: #131313;
  border: 0;
  border-right: 1px solid #2c2c2c;
  border-radius: 0;
  padding: 18px 12px;
  display: flex;
  flex-direction: column;
  gap: 26px;
  overflow: auto;
}
.workflow-nav > div:nth-child(2) {
  flex: 1;
}
.hotel-switcher {
  padding: 0 6px;
}
.hotel-switcher label {
  display: block;
  color: #ababab;
  font-size: 12px;
  margin-bottom: 6px;
}
.hotel-switcher select {
  width: 100%;
  background: #131313;
  border: 1px solid #393939;
  font-weight: 600;
  font-size: 15px;
}
.workflow-nav nav {
  display: grid;
  gap: 5px;
}
.workflow-nav nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  min-height: 44px;
  color: #c9c9c9;
  border: 0;
  border-radius: 9px;
  background: transparent;
  font-size: 14px;
}
.workflow-nav nav a span {
  font: inherit;
  color: inherit;
  width: auto;
}
.workflow-nav nav a:hover,
.workflow-nav nav a.active {
  background: #303030;
  color: #fff;
}
.workflow-nav svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.rail-footer {
  display: grid;
  gap: 12px;
  border-top: 1px solid #343434;
  padding: 18px 8px 0;
}
.rail-footer span {
  font-size: 12px;
  color: #ababab;
  overflow-wrap: anywhere;
}
.rail-footer button {
  justify-self: start;
}
.workflow {
  display: block;
  min-width: 0;
}
.workflow > .step {
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  max-width: none;
}
.stephead {
  margin-bottom: 24px;
  align-items: center;
}
.step h2 {
  font-size: 20px;
  margin: 0 0 12px;
  line-height: 1.4;
}
.stephead h2 {
  font-size: 18px;
}
.step p,
.stephead p {
  color: #ababab;
  font-size: 14px;
}
.workspace-tabs {
  display: flex;
  gap: 26px;
  border-bottom: 1px solid #393939;
  margin: -9px -32px 28px;
  padding: 0 32px;
}
.workspace-tabs a {
  padding: 0 0 14px;
  text-decoration: none;
  color: #aaa;
  border-bottom: 2px solid transparent;
}
.workspace-tabs a[aria-current] {
  color: white;
  border-bottom-color: #ddd;
}
.platform-form {
  max-width: 680px;
  gap: 23px;
  margin: 24px 0 36px;
}
.platform-form label {
  gap: 9px;
  color: #ddd;
}
.platform-body details {
  max-width: 860px;
  padding: 18px 0;
}
.platform-body summary {
  font-weight: 500;
  color: #ddd;
}
.brand-form {
  max-width: 860px;
  gap: 24px;
}
.platform-result,
.save-result,
.result {
  background: none;
  border: 0;
  padding: 12px 0;
  color: var(--muted);
}
#crawl-form {
  max-width: 900px;
}
.step-actions {
  gap: 8px;
}
.knowledge {
  gap: 0;
}
.knowledge-node {
  margin: 0;
}
.knowledge-row {
  display: grid;
  grid-template-columns: minmax(170px, 0.8fr) minmax(230px, 1.8fr) auto;
  align-items: start;
  gap: 20px;
  padding: 20px 0;
  border: 0;
  border-bottom: 1px solid #383838;
  border-radius: 0;
  background: none;
  box-shadow: none;
}
.knowledge-row.is-group {
  background: none;
  border-color: #484848;
}
.knowledge-row input {
  color: #ededed;
  background: #212121;
  border-color: #555;
  min-height: 42px;
  font-size: 14px;
}
.knowledge-row .topic-input {
  font-weight: 500;
  border-color: transparent;
  padding-left: 0;
}
.knowledge-row small {
  font-size: 12px;
  color: #aaa;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.answer-input {
  padding: 0;
  position: static;
}
.answer-input small {
  position: static;
  display: block;
  margin-top: 9px;
}
.answer-input details {
  font-size: 12px;
  margin-top: 10px;
  color: #bdbdbd;
}
.answer-input > button {
  font-size: 12px;
  padding: 5px 9px;
  margin-top: 10px;
}
.row-actions {
  align-self: start;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0;
}
.row-actions button {
  font-size: 12px;
  padding: 7px 10px;
}
.row-actions .status-dot {
  padding: 0;
  width: 12px;
  height: 12px;
  min-width: 12px;
  border: 0;
  background: #edbc70;
  box-shadow: none !important;
}
.row-actions .status-dot.confirmed {
  background: #79d5ac;
}
.knowledge-children {
  margin: 0 0 0 24px;
  padding-left: 20px;
  border-left: 1px solid #454545;
}
.knowledge-children:before,
.knowledge-node:before {
  display: none;
}
.add-child-card {
  background: transparent;
  color: #bdbdbd;
  border: 1px dashed #626262;
  margin: 18px 0;
  border-radius: 8px;
}
.add-child-card:hover {
  background: #303030;
}
.log-browser {
  grid-template-columns: 300px minmax(0, 1fr);
  border: 1px solid #414141;
  border-radius: 10px;
  background: #212121;
  height: calc(100dvh - 280px);
  min-height: 450px;
  overflow: hidden;
}
.session-list {
  background: #191919;
  border-right: 1px solid #414141;
  height: 100%;
  max-height: none;
  overflow: auto;
  padding: 8px;
}
.session-item {
  background: transparent;
  color: #eee;
  border: 0;
  border-radius: 7px;
  padding: 15px 12px;
}
.session-item:hover,
.session-item.selected {
  background: #333;
  color: #fff;
  box-shadow: none;
}
.session-item b {
  color: #ddd;
}
.session-item small,
.session-title {
  color: #bdbdbd;
}
.conversation {
  background: #212121;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.conversation-head {
  background: #212121;
  color: #eee;
  border-bottom: 1px solid #414141;
  padding: 16px;
}
.conversation-head small {
  color: #aaa;
}
#live-messages {
  height: auto;
  flex: 1;
  min-height: 0;
  background: #212121;
}
.transcript.assistant p {
  background: transparent;
  color: #eee;
  border: 0;
}
.transcript.guest p {
  background: transparent;
  color: #fff;
  border: 0;
}
.transcript.assistant {
  background: #303030;
  color: #eee;
}
.transcript.guest {
  background: #454545;
  color: #fff;
}
.transcript small,
.transcript > span {
  color: #bdbdbd;
}
.live-actions {
  border-top: 1px solid #414141;
}
.presence-dot {
  background: #79d5ac;
}
.chat-filters {
  gap: 8px;
}
.chat-filters input {
  max-width: 210px;
}
.proposal {
  border-color: #444;
}
.proposal blockquote {
  background: #292929;
  color: #ccc;
}
.login-shell {
  max-width: 420px;
  margin: 15vh auto;
  padding: 28px;
}
.login-shell h1 {
  font-size: 30px;
  font-weight: 600;
}
.login-shell button {
  width: 100%;
  justify-self: stretch;
}
.mobile-menu {
  display: none;
}
@media (min-width: 1600px) {
  .dashboard main {
    padding-right: 64px;
  }
  .knowledge-row {
    grid-template-columns: minmax(230px, 1fr) minmax(400px, 2fr) auto;
  }
}
@media (max-width: 1000px) {
  .dashboard .topbar {
    left: 220px;
  }
  .workflow-nav {
    width: 220px;
  }
  .dashboard main {
    padding-left: 244px;
    padding-right: 24px;
  }
  .topbar-inner {
    padding: 0 24px;
  }
  .knowledge-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
  }
  .knowledge-row > label {
    grid-column: 1/-1;
  }
  .log-browser {
    grid-template-columns: 230px minmax(0, 1fr);
  }
  .topbar-actions .console-switch {
    display: none;
  }
}
@media (max-width: 700px) {
  .dashboard .topbar {
    left: 0;
    height: 66px;
  }
  .topbar-inner {
    padding: 0 16px;
    flex-wrap: nowrap;
  }
  .workspace-title {
    font-size: 19px;
  }
  .mobile-menu {
    display: block;
  }
  .topbar-actions .preview-link {
    font-size: 12px;
    padding: 7px;
  }
  .dashboard main {
    padding: 92px 16px 30px;
  }
  .workflow-nav {
    z-index: 10;
    width: 270px;
    top: 66px;
    height: calc(100dvh - 66px);
    display: none;
    box-shadow: 12px 0 28px #0005;
  }
  .nav-open .workflow-nav {
    display: flex;
  }
  .workspace-tabs {
    margin: -5px -16px 24px;
    padding: 0 16px;
  }
  .stephead {
    gap: 12px;
    flex-wrap: wrap;
  }
  .knowledge-row {
    gap: 10px;
  }
  .knowledge-children {
    margin-left: 8px;
    padding-left: 12px;
  }
  .brand-form {
    grid-template-columns: 1fr;
  }
  .log-browser {
    display: flex;
    flex-direction: column;
    height: 780px;
    min-height: 0;
  }
  .session-list {
    height: 240px;
    flex: none;
    border-right: 0;
    border-bottom: 1px solid #414141;
  }
  .conversation {
    flex: 1;
  }
  .chat-filters input {
    max-width: 100%;
    flex: 1;
    width: 140px;
  }
  .platform-form {
    max-width: 100%;
  }
  .login-shell {
    margin: 10vh 16px;
  }
  .workspace-title {
    flex: 1;
  }
  .topbar-actions {
    gap: 0;
  }
}

/* Knowledge ordering: the grip is the only drag target, so text editing and
   status changes remain predictable. A parent moves with its whole subtree. */
#review .knowledge-row {
  grid-template-columns: 28px minmax(170px, 0.8fr) minmax(230px, 1.8fr) auto;
}
.drag-handle {
  width: 28px;
  height: 36px;
  min-width: 28px;
  padding: 0;
  align-self: center;
  display: grid;
  place-items: center;
  background: transparent;
  border: 1px solid transparent;
  color: #858585;
  cursor: grab;
  touch-action: none;
}
#review .knowledge-row > label {
  touch-action: none;
}
.drag-handle svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}
.drag-handle:hover {
  color: #000;
}
.drag-handle:active {
  cursor: grabbing;
}
.knowledge-node.is-dragging {
  opacity: 0.58;
}
.knowledge-node.is-dragging > .knowledge-row {
  background: #2a2a2a;
  border-color: #858585;
}
body.is-sorting-knowledge {
  cursor: grabbing;
  user-select: none;
}

/* The consultation workspace occupies the remaining viewport. The page does
   not scroll; the session list and transcript own their scrolling regions. */
body[data-view="logs-section"] {
  overflow: hidden;
}
body[data-view="logs-section"] main {
  height: 100dvh;
  padding-bottom: 18px;
  overflow: hidden;
}
body[data-view="logs-section"] .workbench,
body[data-view="logs-section"] .workflow {
  height: 100%;
  min-height: 0;
}
#logs-section {
  height: calc(100dvh - 128px);
  min-height: 0;
  display: flex;
  flex-direction: column;
}
#logs-section .stephead {
  flex: none;
  margin-bottom: 12px;
}
#logs-section .stephead h2 {
  margin-bottom: 0;
}
#logs-section .chat-filters {
  flex: none;
  display: grid;
  grid-template-columns: minmax(190px, 1.7fr) 120px 140px 140px auto auto auto;
  gap: 8px;
  margin: 0 0 12px;
}
#logs-section .chat-filters input,
#logs-section .chat-filters select,
#logs-section .chat-filters button {
  width: 100%;
  max-width: none;
  min-width: 0;
  min-height: 38px;
  padding: 8px 10px;
}
#logs-section #logs {
  flex: 1;
  min-height: 0;
}
#logs-section .log-browser {
  width: 100%;
  height: 100%;
  min-height: 0;
  grid-template-columns: minmax(240px, 28%) minmax(0, 72%);
}
#logs-section .session-list,
#logs-section .conversation,
#logs-section .conversation-messages {
  min-height: 0;
}
#logs-section .conversation-head {
  flex: none;
}
#logs-section .conversation-messages {
  flex: 1;
  max-height: none;
  overflow: auto;
}

@media (min-width: 1600px) {
  #review .knowledge-row {
    grid-template-columns: 28px minmax(230px, 1fr) minmax(400px, 2fr) auto;
  }
}
@media (max-width: 1000px) {
  #review .knowledge-row {
    grid-template-columns: 28px minmax(0, 1fr) auto;
  }
  #review .knowledge-row > label {
    grid-column: 2 / -1;
  }
  #review .answer-input {
    grid-column: 2 / 3;
  }
  #review .row-actions {
    grid-column: 3;
  }
  #logs-section .chat-filters {
    grid-template-columns: minmax(180px, 2fr) 120px repeat(2, minmax(125px, 1fr));
  }
  #logs-section .chat-filters button {
    width: auto;
  }
}
@media (max-width: 700px) {
  body[data-view="logs-section"] main {
    padding-bottom: 12px;
  }
  #logs-section {
    height: calc(100dvh - 104px);
  }
  #logs-section .stephead {
    margin-bottom: 8px;
  }
  #logs-section .chat-filters {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 6px;
    margin-bottom: 8px;
  }
  #logs-section .chat-filters input[name="q"] {
    grid-column: span 4;
  }
  #logs-section .chat-filters select {
    grid-column: span 2;
  }
  #logs-section .chat-filters input[type="date"] {
    grid-column: span 3;
  }
  #logs-section .chat-filters button {
    grid-column: span 2;
    width: 100%;
  }
  #logs-section .log-browser {
    display: grid;
    height: 100%;
    min-height: 0;
    grid-template-columns: 1fr;
    grid-template-rows: minmax(128px, 24%) minmax(0, 76%);
  }
  #logs-section .session-list {
    width: 100%;
    height: auto;
    min-height: 0;
  }
  #logs-section .conversation {
    min-height: 0;
  }
  #review .knowledge-row {
    grid-template-columns: 28px minmax(0, 1fr);
  }
  #review .knowledge-row > label,
  #review .answer-input,
  #review .row-actions {
    grid-column: 2 / -1;
  }
}
.dashboard main,
.topbar-inner {
  width: 100%;
}
.workflow {
  animation: none;
  transform: none;
  opacity: 1;
  overflow: visible;
  border-radius: 0;
}
.answer-input {
  display: block;
  align-self: start;
}
.answer-input input {
  width: 100%;
}
.row-actions {
  transform: none;
}
.workflow-nav nav {
  grid-template-columns: 1fr;
  margin-top: 0;
}
.workflow-nav nav a {
  font-weight: 500;
}
.workflow-nav nav a:hover {
  transform: none;
}
.workspace-tabs {
  width: calc(100% + 64px);
}
.workspace-tabs[hidden] {
  display: none;
}
.step > h2 {
  margin-bottom: 24px;
}
.conversation-messages:empty:after {
  content: "选择左侧会话，查看完整对话";
  display: block;
  padding: 64px 24px;
  text-align: center;
  color: #ababab;
}
.knowledge-row input {
  min-width: 0;
}
.answer-input details p {
  white-space: normal;
}
.session-list:empty {
  padding: 20px;
}
.dashboard .topbar {
  min-height: 0;
}
.topbar-inner {
  min-height: 0;
}
.inline-delete {
  color: var(--danger);
}
.row-actions .status-dot,
.row-actions .status-dot.confirmed {
  width: 44px;
  height: 44px;
  min-width: 44px;
  display: inline-grid;
  place-items: center;
  background: transparent;
}
.row-actions .status-dot::before {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--amber);
}
.row-actions .status-dot.confirmed::before { background: var(--green); }
.row-actions .status-dot:hover { background: #333; }
@media (max-width: 700px) {
  .chat-filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chat-filters input, .chat-filters select, .chat-filters button { width: 100%; max-width: 100%; min-width: 0; }
  .chat-filters input[name="q"] { grid-column: 1/-1; }
  .chat-filters select { grid-column: 1/-1; }
  .workspace-tabs {
    width: calc(100% + 32px);
  }
  .topbar-inner {
    width: 100%;
  }
  .answer-input {
    grid-column: 1/-1;
  }
  .row-actions {
    grid-column: 1/-1;
    justify-content: flex-end;
  }
  .knowledge-row > label {
    width: 100%;
  }
  .knowledge-row .topic-input {
    width: 100%;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}

/* Final interactive-state override: broad button selectors use :not() and
   otherwise win by specificity. Every enabled workspace button uses the same
   unambiguous white hover state. */
body button:hover:not(:disabled),
body.workspace-ready .topbar-actions a:hover {
  background: #fff !important;
  background-color: #fff !important;
  border-color: #fff !important;
  color: #000 !important;
  box-shadow: none !important;
}
body button:hover:not(:disabled) * {
  color: #000 !important;
}

/* Knowledge workspace density: keep every fact and action visible while
   reducing vertical travel during daily review. */
#review .stephead {
  margin-bottom: 14px;
}
#review .stephead h2 {
  margin-bottom: 5px;
}
#review .save-result {
  padding: 5px 0;
  min-height: 28px;
}
#review .knowledge-row {
  gap: 14px;
  padding: 12px 0;
}
#review .knowledge-row input {
  min-height: 36px;
  padding-top: 7px;
  padding-bottom: 7px;
}
#review .knowledge-row small {
  line-height: 1.45;
}
#review .answer-input {
  display: grid;
  grid-template-columns: max-content max-content max-content;
  align-items: center;
  gap: 5px 9px;
}
#review .answer-input > input {
  grid-column: 1 / -1;
}
#review .answer-input small,
#review .answer-input details,
#review .answer-input > button {
  margin: 0;
}
#review .answer-input details > summary,
#review .answer-input > button {
  line-height: 1.3;
}
#review .row-actions {
  align-self: center;
  min-height: 44px;
  gap: 6px;
}
#review .knowledge-children {
  margin-left: 18px;
  padding-left: 16px;
}
#review .add-child-card {
  margin: 10px 0;
}
@media (max-width: 700px) {
  #review .knowledge-row {
    padding: 14px 0;
  }
  #review .answer-input {
    display: flex;
    flex-wrap: wrap;
  }
  #review .answer-input > input {
    flex: 0 0 100%;
  }
}

/* Knowledge-only refinement: facts lead, provenance supports. */
#review .stephead { align-items: flex-start; gap: 24px; }
#review .stephead p { max-width: 70ch; line-height: 1.7; }
#review .step-actions { flex-shrink: 0; }
#review .save-result:empty { min-height: 12px; padding: 0; }
#review .knowledge-row {
  grid-template-columns: 32px minmax(160px, .85fr) minmax(0, 2.2fr) auto;
  gap: 16px;
  padding: 20px 0;
  align-items: start;
}
#review .knowledge-row > label { padding-top: 4px; }
#review .knowledge-row .topic-input { font-weight: 600; }
#review .knowledge-row > label small { font-size: 11px; line-height: 1.6; margin-top: 6px; }
#review .knowledge-type {
  display: block;
  width: max-content;
  max-width: 100%;
  min-height: 28px;
  margin-top: 8px;
  padding: 3px 26px 3px 8px;
  border: 1px solid #505050;
  border-radius: 6px;
  background: #242424;
  color: var(--muted);
  font: inherit;
  font-size: 11px;
}
#review .knowledge-type:focus { border-color: #bcbcbc; outline: 2px solid #ededed; outline-offset: 2px; }
#review .answer-input {
  display: flex;
  flex-wrap: wrap;
  min-width: 0;
  gap: 8px 12px;
  align-items: baseline;
}
#review .answer-input > textarea {
  width: 100%;
  flex: 0 0 100%;
  min-height: 68px;
  padding: 10px 12px;
  line-height: 1.65;
  resize: vertical;
  background: #242424;
  border: 1px solid #505050;
  border-radius: 8px;
  color: var(--ink);
}
#review .answer-input > textarea:focus { border-color: #bcbcbc; }
#review .answer-input > small { flex: 1 1 100%; font-size: 11px; }
#review .answer-input > button { padding: 4px 8px; min-height: 28px; }
#review .answer-input details { min-width: 0; max-width: 100%; }
#review .answer-input details[open] { flex-basis: 100%; }
#review .answer-input .version-list {
  flex: 0 0 100%;
  min-width: 0;
  padding: 12px 0 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
#review .answer-input .version-list p { margin: 0 0 12px; }
#review .answer-input .version-list p:last-child { margin-bottom: 0; }

#sources #job-list { max-width: 860px; margin: 20px 0 28px; }
.hotel-deletion { margin-top: 32px; border-top: 1px solid var(--line); }
.hotel-deletion > summary, .hotel-deletion button { color: var(--danger); }
.hotel-deletion button { background: transparent; border: 1px solid var(--danger); }
.hotel-deletion p { max-width: 65ch; line-height: 1.7; }
#sources .job-progress { padding: 16px 0; border-bottom: 1px solid var(--line); }
#sources .job-progress-heading, #sources .job-progress-meta { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
#sources .job-progress-heading { font-size: 13px; margin-bottom: 10px; }
#sources .job-progress-meta { font-size: 12px; color: var(--muted); margin-top: 8px; }
#sources progress {
  display: block;
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  height: 8px;
  border: 0;
  border-radius: 999px;
  overflow: hidden;
  background: transparent;
  color: #fff;
  accent-color: #fff;
}
#sources progress::-webkit-progress-bar { background: transparent; border-radius: 999px; }
#sources progress::-webkit-progress-value { background: #fff; border-radius: 999px; }
#sources progress::-moz-progress-bar { background: #fff; border-radius: 999px; }
#sources progress:indeterminate {
  background: transparent;
  position: relative;
}
#sources progress:indeterminate::after {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 30%;
  border-radius: 999px;
  background: #fff;
  animation: job-progress-pending 1.6s ease-in-out infinite alternate;
}
@keyframes job-progress-pending { from { left: 0; } to { left: 70%; } }
@media (prefers-reduced-motion: reduce) {
  #sources progress:indeterminate::after { animation: none; left: 35%; }
}
#sources .job-progress-error { color: var(--danger); font-size: 12px; margin: 10px 0 0; }
#review .answer-input details p { overflow-wrap: anywhere; line-height: 1.7; margin: 8px 0; }
#review .row-actions { align-self: start; min-height: 68px; gap: 4px; }
#review .drag-handle { align-self: start; margin-top: 16px; width: 32px; height: 36px; }
#review .knowledge-children { margin-left: 16px; padding-left: 24px; }
#review .knowledge-children .knowledge-row { padding: 16px 0; }
#review .knowledge-row.is-group .topic-input { color: #fff; }
#review .add-child-card { width: 100%; margin: 12px 0 20px; min-height: 44px; }
#review .knowledge-row:hover { box-shadow: none; border-bottom-color: #555; }
@media (max-width: 1100px) {
  #review .knowledge-row { grid-template-columns: 32px minmax(0, 1fr) auto; gap: 12px; }
  #review .knowledge-row > label { grid-column: 2; }
  #review .answer-input { grid-column: 2 / -1; grid-row: 2; }
  #review .row-actions { grid-column: 3; grid-row: 1; min-height: 44px; }
  #review .drag-handle { margin-top: 4px; }
}
@media (max-width: 700px) {
  #review .stephead { gap: 12px; }
  #review .step-actions { width: 100%; justify-content: flex-end; }
  #review .knowledge-row { gap: 8px; padding: 16px 0; }
  #review .knowledge-row > label { grid-column: 2 / -1; }
  #review .row-actions { grid-row: 3; grid-column: 2 / -1; min-height: 36px; }
  #review .answer-input { grid-row: 2; }
  #review .knowledge-children { margin-left: 8px; padding-left: 12px; }
}
