/* Founder console. One accent per job, from Plubot's color rule:
   turquoise = ready (the bot), amber = the founder's move (a person),
   blue = actions. Paper and ink stay cool and quiet. */
:root {
  color-scheme: light;
  --paper: #f5f6f3;
  --surface: #ffffff;
  --ink: #15202a;
  --ink-soft: #55616c;
  --ink-faint: #8a949c;
  --rule: #dde2e0;
  --bot: #0fa39a;
  --bot-tint: #e3f4f2;
  --person: #d9902f;
  --person-tint: #fbf0df;
  --team: #2d66d3;
  --team-ink: #ffffff;
  --danger: #b4442f;
  --danger-ink: #ffffff;
  --team-tint: #e7eefb;
  --serif: ui-serif, "New York", "Iowan Old Style", Georgia, serif;
  --sans: -apple-system, "SF Pro Text", system-ui, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
  --radius-control: 6px;
  --radius-panel: 10px;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --paper: #0f151b;
    --surface: #151d25;
    --ink: #e7ecef;
    --ink-soft: #a3adb5;
    --ink-faint: #6f7a83;
    --rule: #26313b;
    --bot: #2cc4b9;
    --bot-tint: #11302f;
    --person: #e8a54b;
    --person-tint: #33281a;
    --team: #5b8ff0;
    --team-ink: #0b1220;
    --danger: #e3735d;
    --danger-ink: #0b1220;
    --team-tint: #172238;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 15px/1.5 var(--sans);
}

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

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--team);
  outline-offset: 2px;
}

/* --- login (online console) ------------------------------------------- */

/* One narrow card in the middle of the page: the console's own name, then
   email, password and the authenticator's code. */
.login {
  max-width: 24rem;
  margin: 14vh auto 0;
  padding: 28px 28px 26px;
  border: 1px solid var(--rule);
  border-radius: var(--radius-panel);
  background: var(--surface);
}

.login .topbar-title {
  margin: 4px 0 22px;
}

.login-form {
  display: grid;
  gap: 6px;
}

.login-form label {
  margin-top: 8px;
  font-weight: 560;
}

.login-form .field-error {
  min-height: 1.4em;
  margin: 6px 0 0;
}

.login-form button {
  justify-self: start;
  margin-top: 8px;
}

/* --- top bar ----------------------------------------------------------- */

.topbar {
  display: flex;
  align-items: baseline;
  gap: 16px;
  max-width: 1240px;
  margin: 0 auto;
  padding: 22px 32px 18px;
  border-bottom: 1px solid var(--rule);
}

.brand {
  margin: 0;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: var(--bot);
}

.topbar-title {
  margin: 0;
  font: 400 22px/1.2 var(--serif);
}

.tenant-picker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  color: var(--ink-soft);
}

.tenant-picker select {
  min-width: 220px;
}

/* --- layout -------------------------------------------------------------- */

.layout {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  gap: 40px;
  max-width: 1240px;
  margin: 0 auto;
  padding: 28px 32px 64px;
}

/* --- the step rail: the one memorable element ---------------------------- */

.rail ol {
  position: sticky;
  top: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rail li + li {
  margin-top: 4px;
}

.step {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: var(--radius-control);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.step:hover {
  background: var(--surface);
}

.step-current {
  background: var(--surface);
  box-shadow: inset 2px 0 0 var(--ink);
}

.step-ring {
  display: grid;
  place-items: center;
  flex: none;
  width: 28px;
  height: 28px;
  border: 2px solid var(--rule);
  border-radius: 50%;
  font: 600 13px/1 var(--sans);
  color: var(--ink-soft);
  transition:
    background-color 180ms ease,
    border-color 180ms ease,
    color 180ms ease;
}

.step-attention .step-ring {
  border-color: var(--person);
  background: var(--person-tint);
  color: var(--ink);
}

.step-done .step-ring {
  border-color: var(--bot);
  background: var(--bot);
  color: var(--surface);
}

.step-title {
  font-weight: 520;
}

/* --- panel --------------------------------------------------------------- */

.panel {
  min-width: 0;
}

.panel:focus {
  outline: none;
}

.panel-header {
  margin-bottom: 28px;
}

.panel-number {
  margin: 0 0 2px;
  color: var(--ink-faint);
}

.panel-header h2 {
  margin: 0;
  font: 400 34px/1.15 var(--serif);
  letter-spacing: -0.01em;
}

.panel-purpose {
  max-width: 62ch;
  margin: 8px 0 0;
  color: var(--ink-soft);
}

.empty {
  color: var(--ink-soft);
}

/* --- manifest form --------------------------------------------------------- */

.group {
  margin: 0 0 30px;
  padding: 22px 0 0;
  border: 0;
  border-top: 1px solid var(--rule);
}

.group legend {
  padding: 0 12px 0 0;
  font: 400 20px/1.2 var(--serif);
}

.group-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 28px;
  margin-top: 14px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.field:has(.choices),
.field:has(textarea) {
  grid-column: 1 / -1;
}

.field-label {
  font-weight: 560;
}

.optional {
  font-weight: 400;
  color: var(--ink-faint);
}

.field input[type="text"],
.field input[type="number"],
.field input[type="date"],
.field select,
.field textarea,
.tenant-picker select,
.dialog-form input,
.login-form input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--rule);
  border-radius: var(--radius-control);
  background: var(--surface);
}

.field-short input,
.field-short select {
  max-width: 220px;
}

.field-invalid input,
.field-invalid select,
.field-invalid textarea {
  border-color: var(--person);
}

.field-help {
  max-width: 64ch;
  margin: 0;
  color: var(--ink-soft);
  font-size: 13.5px;
}

/* Reserved line: an error never moves the fields below it. */
.field-error {
  min-height: 1.45em;
  margin: 0;
  color: var(--person);
  font-size: 13.5px;
}

.fixed-value {
  margin: 0;
  padding: 8px 0;
  color: var(--ink-soft);
}

.choices {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
}

.choices-inline {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.choice {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 10px;
  padding: 11px 12px;
  border: 1px solid var(--rule);
  border-radius: var(--radius-control);
  background: var(--surface);
  cursor: pointer;
}

.choice:has(input:checked) {
  border-color: var(--team);
  box-shadow: inset 0 0 0 1px var(--team);
}

.choice input {
  margin: 3px 0 0;
  accent-color: var(--team);
}

.choice-label {
  font-weight: 560;
}

.choice-help {
  grid-column: 2;
  color: var(--ink-soft);
  font-size: 13.5px;
}

.form-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: start;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
}

.problem-summary ul {
  margin: 6px 0 0;
  padding-left: 18px;
  color: var(--ink-soft);
}

.summary-title {
  margin: 0;
  font-weight: 600;
  color: var(--person);
}

.summary-done {
  margin: 0;
  font-weight: 600;
  color: var(--bot);
}

.form-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.save-status {
  min-height: 1.45em;
  margin: 0;
  color: var(--ink-soft);
  font-size: 13.5px;
}

/* --- buttons ---------------------------------------------------------------- */

.button-primary,
.button-secondary,
.button-quiet {
  padding: 8px 14px;
  border-radius: var(--radius-control);
  font-weight: 560;
  cursor: pointer;
  white-space: nowrap;
}

.button-primary {
  border: 1px solid var(--team);
  background: var(--team);
  color: var(--team-ink);
}

.button-secondary {
  border: 1px solid var(--ink-faint);
  background: var(--surface);
}

.button-quiet {
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-soft);
}

.button-quiet:hover,
.button-secondary:hover {
  border-color: var(--ink-soft);
}

.button-danger {
  padding: 8px 14px;
  border: 1px solid var(--danger);
  border-radius: var(--radius-control);
  background: var(--danger);
  color: var(--danger-ink);
  font-weight: 560;
  cursor: pointer;
  white-space: nowrap;
}

.button-quiet:disabled,
.button-danger:disabled {
  opacity: 0.45;
  cursor: default;
}

.button-quiet:disabled:hover {
  border-color: transparent;
}

/* --- checklist --------------------------------------------------------------- */

.items {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: item;
}

.item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: start;
  padding: 16px 0;
  border-top: 1px solid var(--rule);
}

.item-title {
  margin: 0;
  font-weight: 600;
}

.item-done .item-title {
  color: var(--bot);
}

.item-why {
  max-width: 70ch;
  margin: 3px 0 0;
  color: var(--ink-soft);
}

.item-work {
  margin-top: 12px;
}

.item-inputs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px 18px;
  max-width: 760px;
}

.item-inputs input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--rule);
  border-radius: var(--radius-control);
  background: var(--surface);
}

.actions-row button:disabled {
  opacity: 0.55;
  cursor: progress;
}

/* --- variables ------------------------------------------------------------- */

.variables {
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
}

.variables h3 {
  margin: 0;
  font: 400 20px/1.2 var(--serif);
}

.actions-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 16px 0;
}

.done-note {
  color: var(--bot);
  font-weight: 560;
}

.log {
  max-height: 340px;
  margin: 0 0 18px;
  padding: 14px 16px;
  overflow: auto;
  border-radius: var(--radius-panel);
  background: var(--ink);
  color: var(--paper);
  font: 12.5px/1.55 var(--mono);
  white-space: pre-wrap;
}

.plan-count {
  margin: 0 0 8px;
  color: var(--ink-soft);
}

.plan {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.plan th {
  padding: 6px 10px 6px 0;
  border-bottom: 1px solid var(--rule);
  text-align: left;
  font-weight: 600;
  color: var(--ink-soft);
}

.plan td {
  padding: 5px 10px 5px 0;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}

.plan-key {
  font-family: var(--mono);
  font-size: 12.5px;
  white-space: nowrap;
}

.plan-value {
  max-width: 520px;
  overflow-wrap: anywhere;
  color: var(--ink-soft);
}

.plan-keep td:nth-child(2),
.plan-copyFromAlinea td:nth-child(2) {
  color: var(--person);
  font-weight: 560;
}

.plan-generate td:nth-child(2) {
  color: var(--bot);
}

/* --- dialog ------------------------------------------------------------------ */

dialog {
  width: min(440px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid var(--rule);
  border-radius: var(--radius-panel);
  background: var(--surface);
  color: var(--ink);
}

dialog::backdrop {
  background: rgb(15 21 27 / 35%);
}

.dialog-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 22px;
}

.dialog-form h2 {
  margin: 0;
  font: 400 24px/1.2 var(--serif);
}

.dialog-form p {
  margin: 0 0 6px;
  color: var(--ink-soft);
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 10px;
}

.dialog-confirm {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dialog-confirm[hidden] {
  display: none;
}

.session-missing {
  max-width: 60ch;
  margin: 40px auto;
  color: var(--person);
}

/* --- the journey: cards, flows and guides --------------------------------- */

.step-tools .step-ring {
  border-style: dashed;
  color: var(--ink-faint);
}

.card {
  margin: 0 0 22px;
  padding: 20px 22px;
  border: 1px solid var(--rule);
  border-radius: var(--radius-panel);
  background: var(--surface);
}

.card h3,
.tools-group h3 {
  margin: 0 0 6px;
  font: 400 21px/1.25 var(--serif);
}

.access-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 20px;
  margin-top: 14px;
}

.password-row {
  display: flex;
  gap: 6px;
}

.password-row input {
  flex: 1;
  min-width: 0;
}

code {
  padding: 1px 6px;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: var(--paper);
  font: 13px/1.5 var(--mono);
  overflow-wrap: anywhere;
}

/* A flow: its button, its steps (a real sequence) and its log. */
.flow {
  margin: 4px 0 26px;
}

.items + .flow {
  margin-top: 24px;
}

.flow-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.flow-start:disabled,
.flow-retry:disabled {
  opacity: 0.55;
  cursor: default;
}

.flow-status {
  margin: 0;
  color: var(--ink-soft);
}

.flow-error {
  margin: 8px 0 0;
}

.flow-steps {
  margin: 18px 0 10px;
  padding: 0;
  list-style: none;
}

.flow-step {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 8px 0;
  border-top: 1px solid var(--rule);
}

.flow-mark {
  width: 12px;
  height: 12px;
  border: 2px solid var(--rule);
  border-radius: 50%;
}

.flow-step-running .flow-mark {
  border-color: var(--person);
  background: var(--person-tint);
}

.flow-step-done .flow-mark {
  border-color: var(--bot);
  background: var(--bot);
}

.flow-step-waiting .flow-mark {
  border-color: var(--person);
  background: var(--person);
}

.flow-step-waiting .flow-note {
  color: var(--person);
}

.flow-step-failed .flow-mark {
  border-color: var(--danger);
  background: var(--danger);
}

.flow-step-failed .flow-label {
  color: var(--danger);
}

.flow-step-skipped .flow-mark,
.flow-step-earlier .flow-mark {
  border-style: dashed;
  border-color: var(--ink-faint);
}

.flow-step-skipped .flow-label,
.flow-step-pending .flow-label {
  color: var(--ink-soft);
}

.flow-note {
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
}

.flow-log summary,
.more > summary {
  padding: 6px 0;
  color: var(--ink-soft);
  font-weight: 560;
  cursor: pointer;
}

.flow-log .log {
  margin-top: 8px;
}

.flow-next {
  margin-top: 4px;
}

.more {
  margin: 4px 0 22px;
}

.more .group {
  margin-top: 14px;
}

/* The Kommo guide is done in this order: numbered. */
.guide {
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
  counter-reset: guide;
}

.guide > li {
  position: relative;
  padding: 0 0 22px 42px;
  counter-increment: guide;
}

.guide > li::before {
  content: counter(guide);
  position: absolute;
  top: -2px;
  left: 0;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 2px solid var(--person);
  border-radius: 50%;
  background: var(--person-tint);
  font: 600 13px/1 var(--sans);
}

.guide-title {
  margin: 0 0 6px;
  font-weight: 600;
}

.guide-values {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 10px 18px;
  align-items: center;
  margin: 8px 0;
}

.guide-values dt {
  color: var(--ink-soft);
}

.guide-values dd {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
}

/* How the assistant writes with the chosen voice, in the bot's color. */
.voice-sample {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 8px 18px;
  margin: 4px 0 8px;
  padding: 12px 14px;
  border-left: 2px solid var(--bot);
}

.voice-sample dt {
  color: var(--ink-soft);
}

.voice-sample dd {
  display: grid;
  margin: 0;
}

.voice-sample dd > span {
  grid-area: 1 / 1;
}

.voice-sample .voice-off {
  visibility: hidden;
}

/* The dashboard's own name, with the domain it lives under. */
.domain-input {
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: 28rem;
}

.domain-input input {
  flex: 1;
  min-width: 0;
}

.domain-input span {
  color: var(--ink-soft);
}

/* "Copiado" takes the label's place without changing the button's width. */
.copy-button {
  display: inline-grid;
}

.copy-button > span {
  grid-area: 1 / 1;
}

.copy-done {
  visibility: hidden;
  color: var(--bot);
}

.copied .copy-label {
  visibility: hidden;
}

.copied .copy-done {
  visibility: visible;
}

.share-message {
  width: 100%;
  margin: 6px 0 10px;
  padding: 10px 12px;
  border: 1px solid var(--rule);
  border-radius: var(--radius-control);
  background: var(--paper);
  resize: vertical;
}

.share .actions-row {
  justify-content: flex-start;
}

.checks {
  margin: 8px 0 0;
  padding-left: 20px;
}

.checks li + li {
  margin-top: 6px;
}

/* The SalesBot, node after node. */
.salesbot {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.salesbot li {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 12px;
  align-items: baseline;
  padding: 6px 0 6px 14px;
  border-left: 2px solid var(--rule);
}

.salesbot-node {
  justify-self: start;
  padding: 1px 10px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--surface);
  font-weight: 600;
  white-space: nowrap;
}

.salesbot-detail {
  color: var(--ink-soft);
}

.tools-group + .tools-group {
  margin-top: 40px;
}

@media (max-width: 860px) {
  .topbar {
    flex-wrap: wrap;
    padding: 18px;
  }

  .layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
    padding: 18px;
  }

  .rail {
    min-width: 0;
  }

  .rail ol {
    position: static;
    display: flex;
    gap: 4px;
    overflow-x: auto;
  }

  .rail li + li {
    margin-top: 0;
  }

  .step {
    width: auto;
    white-space: nowrap;
  }

  .item {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .group-fields,
  .form-footer,
  .access-grid,
  .guide-values,
  .voice-sample {
    grid-template-columns: 1fr;
  }

  .salesbot li {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .step-ring {
    transition: none;
  }
}

/* --- knowledge: the chat with Plubot -------------------------------------- */

.knowledge {
  display: grid;
  gap: 22px;
  align-items: start;
}

@media (min-width: 1100px) {
  .knowledge {
    grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr);
  }

  .knowledge-summary {
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
  }
}

.chat {
  display: flex;
  flex-direction: column;
  height: clamp(520px, calc(100vh - 230px), 860px);
  margin: 0;
  padding: 0;
  overflow: hidden;
}

.chat-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--rule);
}

.chat-header h3 {
  margin: 0;
}

.chat-testing .chat-header {
  box-shadow: inset 0 3px 0 var(--person);
}

.chat-mode {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--rule);
  border-radius: 999px;
}

.chat-mode-option {
  padding: 5px 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-soft);
  font-weight: 560;
  cursor: pointer;
}

.chat-mode-option:disabled {
  opacity: 0.45;
  cursor: default;
}

.chat-mode-current {
  background: var(--paper);
  color: var(--ink);
}

.chat-log {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 18px;
  overflow-y: auto;
  list-style: none;
  overscroll-behavior: contain;
}

.msg {
  max-width: 82%;
  padding: 10px 14px;
  border-radius: 14px;
  line-height: 1.45;
}

.msg-text,
.msg-label,
.msg-badge {
  margin: 0;
}

.msg-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.msg-plubot,
.msg-bot {
  align-self: flex-start;
  border-bottom-left-radius: 4px;
  background: var(--bot-tint);
}

.msg-owner {
  align-self: flex-end;
  border-bottom-right-radius: 4px;
  background: var(--team-tint);
}

.msg-customer {
  align-self: flex-end;
  border-bottom-right-radius: 4px;
  background: var(--person-tint);
}

.msg-system {
  align-self: center;
  max-width: 100%;
  padding: 4px 10px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 13.5px;
}

.msg-typing .msg-text {
  color: var(--ink-soft);
}

.msg-label {
  margin-bottom: 2px;
  color: var(--ink-soft);
  font-size: 12.5px;
  font-weight: 560;
}

.msg-badge {
  margin-top: 6px;
  color: var(--ink-soft);
  font-size: 12.5px;
}

.chat-error {
  margin: 0;
  padding: 0 18px;
}

.chat-error:empty {
  display: none;
}

.chat-composer {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
  padding: 12px 14px;
  border-top: 1px solid var(--rule);
}

.chat-composer .chat-input {
  min-height: 44px;
  max-height: 168px;
  padding: 10px 12px;
  border: 1px solid var(--rule);
  border-radius: var(--radius-control);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.4;
  resize: none;
  field-sizing: content;
}

.chat-attach {
  padding: 10px 10px;
  border: 1px solid var(--rule);
  border-radius: var(--radius-control);
  background: transparent;
  color: var(--ink-soft);
  font-weight: 560;
  cursor: pointer;
}

.chat-attach:hover {
  border-color: var(--ink-soft);
}

.chat-send {
  min-height: 44px;
}

.knowledge-summary {
  margin: 0;
}

.knowledge-counts {
  margin: 0 0 14px;
  color: var(--ink-soft);
}

.knowledge-gaps {
  margin-bottom: 12px;
}

.gaps {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
}

.gaps li {
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--person-tint);
  font-size: 13.5px;
}

.knowledge-complete {
  margin: 0 0 12px;
  padding-left: 14px;
  border-left: 3px solid var(--bot);
}

.knowledge-section {
  padding: 10px 0;
  border-top: 1px solid var(--rule);
}

.knowledge-section > summary {
  font-weight: 560;
  cursor: pointer;
}

.knowledge-items {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 260px;
  margin: 10px 0 0;
  padding: 0;
  overflow-y: auto;
  list-style: none;
}

.knowledge-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  font-size: 14px;
}

.knowledge-item-text {
  min-width: 0;
  overflow-wrap: anywhere;
}

.knowledge-price {
  color: var(--ink-soft);
}

.knowledge-remove {
  flex: none;
  padding: 2px 8px;
  font-size: 13px;
}

.knowledge-battery,
.knowledge-use {
  margin-top: 6px;
  padding-top: 14px;
  border-top: 1px solid var(--rule);
}

.knowledge-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.knowledge-actions .field-help {
  margin: 0;
}

.battery {
  display: grid;
  gap: 8px;
  max-height: 340px;
  margin: 12px 0 0;
  padding: 0;
  overflow-y: auto;
  list-style: none;
}

.battery-item {
  padding: 10px 12px;
  border: 1px solid var(--rule);
  border-radius: var(--radius-control);
}

.battery-question {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0;
  font-weight: 560;
}

.battery-mark {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--bot);
}

.battery-bad .battery-mark {
  background: var(--person);
}

.battery-reply {
  margin: 6px 0 0 16px;
  color: var(--ink-soft);
  font-size: 14px;
  white-space: pre-wrap;
}

.battery-why {
  margin: 4px 0 0 16px;
  color: var(--person);
  font-size: 13.5px;
}

.knowledge-file {
  margin-top: 14px;
}
