/* Site paint for the sbi mount. Tokens fall back to --kld-*. */

.sbi-host {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 1.25rem 4rem;
}

.sbi-app {
  margin-top: 2.25rem;
}

.sbi-intro {
  color: var(--kld-muted, #59636f);
  max-width: 38rem;
  margin: 0 0 1.5rem;
}

.sbi-intro strong {
  color: var(--kld-ink, #17202b);
}

.sbi-step {
  margin-top: 2.5rem;
}

.sbi-step h2 {
  font-size: 1.15rem;
  margin: 0 0 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.sbi-stepnum {
  flex: none;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  background: var(--kld-rust, #b5532f);
  color: #fff;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sbi-hint {
  margin: 0 0 0.75rem;
  color: var(--kld-muted, #59636f);
  font-size: 0.95rem;
}

.sbi-result blockquote {
  margin: 0 0 1rem;
  padding: 1rem 1.2rem;
  background: #fff;
  border-left: 4px solid var(--kld-rust, #b5532f);
  border-radius: 0 8px 8px 0;
  white-space: pre-wrap;
}

.sbi-result .placeholder {
  color: var(--kld-muted, #59636f);
  font-style: italic;
}

.sbi-intent-toggle {
  display: block;
  margin-bottom: 1rem;
  color: var(--kld-muted, #59636f);
  font-size: 0.95rem;
}

.sbi-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sbi-actions button {
  font: inherit;
  padding: 0.55rem 1.4rem;
  border: none;
  border-radius: 8px;
  background: var(--kld-rust, #b5532f);
  color: #fff;
  cursor: pointer;
}

.sbi-actions button:disabled {
  opacity: 0.45;
  cursor: default;
}

.sbi-actions button:not(:disabled):hover,
.sbi-actions button:not(:disabled):focus {
  background: var(--kld-rust-dark, #883a22);
}

#copied {
  color: var(--kld-rust, #b5532f);
  font-size: 0.92rem;
}

.sbi-tips {
  margin-top: 1.25rem;
  color: var(--kld-muted, #59636f);
  font-size: 0.95rem;
}

.sbi-tips summary {
  cursor: pointer;
  color: var(--kld-ink, #17202b);
}

.sbi-footer {
  margin-top: 3.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--kld-line, #d5d8dc);
  color: var(--kld-muted, #59636f);
  font-size: 0.9rem;
}

.sbi-footer p {
  margin: 0.5rem 0 0;
}

.sbi-footer p:first-child {
  margin-top: 0;
}

.sbi-footer a {
  color: var(--kld-rust, #b5532f);
}

.sbi-footer a:hover {
  color: var(--kld-rust-dark, #883a22);
}

.sbi-repo {
  margin: 2.5rem 0 0;
  text-align: center;
}

.sbi-repo a {
  display: inline-flex;
  color: var(--kld-muted, #59636f);
}

.sbi-repo a:hover {
  color: var(--kld-ink, #17202b);
}

.sbi-repo-icon {
  width: 1.5rem;
  height: 1.5rem;
}

/* Lintbox: textarea with a highlight layer behind it. The backdrop holds the
   same text with <mark> spans; its text is transparent so only marks show. */

.sbi-app .lintbox {
  position: relative;
}

.sbi-app .lintbox .backdrop,
.sbi-app .lintbox textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--kld-line, #d5d8dc);
  border-radius: 8px;
  font: inherit;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

.sbi-app .lintbox .backdrop {
  position: absolute;
  inset: 0;
  color: transparent;
  background: #fff;
  border-color: transparent;
  pointer-events: none;
}

.sbi-app .lintbox textarea {
  position: relative;
  display: block;
  background: transparent;
  color: var(--kld-ink, #17202b);
  resize: vertical;
  min-height: 3.4rem;
}

.sbi-app .lintbox textarea:focus {
  outline: 2px solid var(--kld-ink, #17202b);
  outline-offset: 1px;
}

.sbi-app .backdrop mark {
  border-radius: 3px;
  color: transparent;
}

.sbi-app .backdrop mark.label {
  background: #fbd3d0;
}

.sbi-app .backdrop mark.praise {
  background: #fde8b8;
}

.sbi-app .backdrop mark.intent {
  background: #e3d4f5;
}

.sbi-app .backdrop mark.absolute {
  background: #fbd3d0;
}

.sbi-app .backdrop mark.vague {
  background: #fde8b8;
}

/* Flags list below each textarea */

.sbi-app .flags {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
  font-size: 0.92rem;
}

.sbi-app .flags li {
  margin: 0.35rem 0;
  color: var(--kld-muted, #59636f);
}

.sbi-app .flags li.ok {
  color: #2c7a4b;
}

.sbi-app .flags .chip {
  display: inline-block;
  padding: 0 0.4rem;
  margin-right: 0.45rem;
  border-radius: 4px;
  color: var(--kld-ink, #17202b);
  font-weight: 600;
}

.sbi-app .flags .chip.label {
  background: #fbd3d0;
}

.sbi-app .flags .chip.praise {
  background: #fde8b8;
}

.sbi-app .flags .chip.intent {
  background: #e3d4f5;
}

.sbi-app .flags .chip.absolute {
  background: #fbd3d0;
}

.sbi-app .flags .chip.vague {
  background: #fde8b8;
}
