/* Rich doc editor (lib/doc-editor.js). Content reuses .design-rendered typography. */
.doc-editor {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.doc-editor-toolbar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 6px;
  margin-bottom: 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
}
.doc-editor-toolbar button {
  font: inherit;
  font-size: 13.2px;
  color: var(--quiet);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 4px 9px;
  cursor: pointer;
}
.doc-editor-toolbar button:hover {
  color: var(--text);
  border-color: var(--line-strong);
}
.doc-editor-toolbar button[aria-pressed='true'] {
  color: var(--green);
  background: var(--green-dim);
  border-color: var(--green-line);
}
.doc-editor-toolbar button:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 1px;
}
.doc-editor-content .doc-editor-prose {
  min-height: 55vh;
  padding: 4px 2px 24px;
  color: var(--text);
  outline: none;
}
.doc-editor-content .doc-editor-prose:focus-visible {
  box-shadow: inset 0 0 0 1px var(--green-line);
  border-radius: 4px;
}
.doc-editor-content h4 {
  font-size: 15.6px;
  margin: 12px 0 6px;
}
.doc-editor-content a {
  color: var(--green);
}
.doc-editor-content code {
  font-family: Consolas, monospace;
  font-size: 0.92em;
  background: var(--info-bg);
  border-radius: 3px;
  padding: 1px 4px;
}
.doc-editor-content pre code {
  background: none;
  padding: 0;
}
.doc-editor-content hr {
  border: 0;
  border-top: 1px solid var(--line-strong);
  margin: 18px 0;
}
.doc-editor-content table {
  display: table;
  table-layout: fixed;
}
.doc-editor-content td p,
.doc-editor-content th p {
  margin: 0;
}
.doc-editor-content .selectedCell {
  background: var(--green-dim);
}
.doc-editor-content .tableWrapper {
  overflow-x: auto;
  margin-bottom: 12px;
}
.doc-editor-content .doc-img {
  display: inline-block;
  max-width: 100%;
}
.doc-editor-content .doc-img img {
  display: block;
}
.doc-editor-content .ProseMirror-selectednode.doc-img,
.doc-editor-content .ProseMirror-selectednode.doc-wb {
  outline: 2px solid var(--green);
  border-radius: 5px;
}
.doc-img-missing {
  display: inline-block;
  font-size: 13.2px;
  color: var(--muted);
  border: 1px dashed var(--line-strong);
  border-radius: 4px;
  padding: 6px 10px;
}
.doc-editor-content .doc-wb {
  margin: 0 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px;
  background: var(--surface);
}
.doc-editor-content .doc-wb > .doc-img-missing {
  display: block;
  text-align: center;
  padding: 24px 10px;
}
.doc-wb-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
}
.doc-wb-title {
  font-size: 13.2px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.doc-wb-open {
  font: inherit;
  font-size: 13.2px;
  color: var(--on-green);
  background: var(--green);
  border: 0;
  border-radius: 4px;
  padding: 5px 10px;
  cursor: pointer;
  white-space: nowrap;
}
.doc-wb-open:hover {
  background: var(--green-hover);
}

/* Docs (F-6): banners, the Core doc view and the rich diff of a proposed Core doc change. */
.doc-banner {
  margin: 4px 0 14px;
  font-size: 13.2px;
}
.doc-versions {
  font: inherit;
  font-size: 13.2px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 3px 6px;
}
.docs-intro {
  margin: 10px 0;
}
.core-doc-title {
  margin: 12px 0 4px;
}
.core-doc-proposals,
.core-doc-changes {
  margin: 16px 0;
}
.core-doc-changes ol {
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
}
.core-doc-changes li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13.2px;
  color: var(--quiet);
}
.design-rendered a.doc-board {
  display: block;
  text-decoration: none;
}
.design-rendered a.doc-board img {
  border: 1px solid var(--line);
  border-radius: 6px;
}
.rich-diff > div {
  padding: 2px 10px;
  border-left: 3px solid transparent;
}
.rich-diff .diff-added {
  background: var(--green-dim);
  border-left-color: var(--green);
}
.rich-diff .diff-removed {
  background: var(--danger-dim);
  border-left-color: var(--danger);
  text-decoration: line-through;
  opacity: 0.8;
}
.rich-diff .diff-changed {
  border-left-color: var(--warn);
}
.rich-diff .diff-words {
  white-space: pre-wrap;
  font-size: 13.2px;
  color: var(--quiet);
  margin: 4px 0 8px;
}
.rich-diff .diff-words del {
  color: var(--danger);
  background: var(--danger-dim);
}
.rich-diff .diff-words ins {
  color: var(--green);
  background: var(--green-dim);
  text-decoration: none;
}
