/* web/style.css */
* {
  box-sizing: border-box;
}
dialog {
  color: var(--bp-text);
  background: var(--bp-paper);
  border: 1px solid var(--bp-border);
  border-radius: 12px;
  width: min(760px, 94vw);
  max-height: 85vh;
  padding: 24px;
  box-shadow: 0 12px 60px #0004;
}
dialog::backdrop {
  background: #13223899;
}
dialog h2 {
  margin-top: 0;
}
dialog label {
  display: grid;
  gap: 7px;
  margin: 14px 0;
}
dialog input,
dialog select,
.node-actions select {
  padding: 9px;
  color: var(--bp-text);
  background: var(--bp-paper);
  border: 1px solid var(--bp-border);
  border-radius: 5px;
  max-width: 100%;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}
.checkbox-label {
  display: flex;
  align-items: center;
}
.library-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 0 8px 14px;
}
.library-actions button {
  font-size: 11px;
  padding: 6px 8px;
  background: transparent;
  color: var(--bp-navigation-text);
  border-color: var(--bp-navigation-hover);
}
.node-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
}
.node-actions button,
.node-actions select {
  font-size: 12px;
}
#section-children {
  display: grid;
  gap: 8px;
}
#section-children button {
  text-align: left;
}
#documents .tree-node::before {
  display: none;
}
.trash-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--bp-border);
}
#import-preview {
  max-height: 45vh;
  overflow: auto;
}
#import-preview details {
  padding: 8px 0;
}
.import-content {
  overflow: auto;
  background: white;
  color: #172b4d;
  padding: 14px;
}
.import-content img {
  max-width: 100%;
  max-height: 400px;
}
.import-content table {
  border-collapse: collapse;
}
.import-content td,
.import-content th {
  padding: 6px;
  border: 1px solid #b8c6d6;
}
#node-error {
  color: #c43838;
}
[hidden] {
  display: none !important;
}
html {
  scroll-padding-top: 90px;
}
body {
  margin: 0;
  background: var(--bp-page);
  color: var(--bp-text);
  font:
    14px/1.5 "Fira Sans",
    "Segoe UI",
    sans-serif;
}
button,
input,
select {
  font: inherit;
}
a {
  color: var(--bp-primary);
  text-decoration: none;
}
button {
  background: var(--bp-paper);
  color: var(--bp-primary);
  border: 1px solid var(--bp-border);
  border-radius: var(--bp-radius);
  cursor: pointer;
  padding: 9px 14px;
  transition: background 150ms, border-color 150ms;
}
button:hover {
  background: var(--bp-primary-soft);
  border-color: var(--bp-primary);
}
button:disabled {
  opacity: .45;
  cursor: default;
}
:focus-visible {
  outline: 2px solid var(--bp-primary);
  outline-offset: 3px;
}
.skip-link {
  position: fixed;
  top: -60px;
  left: 280px;
  padding: 12px;
  z-index: 30;
  background: var(--bp-paper);
}
.skip-link:focus {
  top: 10px;
}
svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.sidebar {
  width: var(--bp-sidebar-width);
  position: fixed;
  inset: 0 auto 0 0;
  display: flex;
  flex-direction: column;
  background: var(--bp-navigation);
  color: var(--bp-navigation-text);
  z-index: 20;
}
.brand {
  height: var(--bp-header-height);
  min-height: var(--bp-header-height);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 23px;
  color: var(--bp-navigation-text);
  font-size: 18px;
  white-space: nowrap;
}
.brand img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}
.brand strong {
  font-weight: 500;
}
.sidebar-scroll {
  overflow: auto;
  padding: 22px 12px;
  flex: 1;
  scrollbar-color: var(--bp-navigation-scrollbar) transparent;
}
.portal-nav a,
.nav-current {
  display: flex;
  align-items: center;
  gap: 13px;
  color: var(--bp-navigation-text);
  padding: 12px 15px;
  border-radius: 6px;
  font-weight: 500;
  margin-bottom: 4px;
}
.portal-nav a:hover {
  background: var(--bp-navigation-hover);
}
.nav-current {
  background: var(--bp-navigation-deep);
}
.nav-icon {
  width: 21px;
  font-size: 23px;
  line-height: 1;
  text-align: center;
}
.chevron {
  margin-left: auto;
}
.nav-section {
  font-size: 11px;
  color: var(--bp-navigation-muted);
  padding: 13px 15px 5px;
  letter-spacing: .04em;
}
#documents {
  display: grid;
  gap: 3px;
}
#documents button {
  text-align: left;
  line-height: 1.5;
  font-size: 13px;
  border: 0;
  color: var(--bp-navigation-muted);
  background: transparent;
  border-radius: 5px;
  padding: 10px 12px 10px 43px;
  position: relative;
  width: 100%;
}
#documents button::before {
  content: "";
  position: absolute;
  width: 5px;
  height: 5px;
  border: 1px solid currentColor;
  border-radius: 50%;
  left: 23px;
  top: 18px;
}
#documents button:hover,
#documents button.active {
  background: var(--bp-navigation-hover);
  color: var(--bp-navigation-text);
}
#documents button.active {
  font-weight: 500;
}
#documents button.active::before {
  border-color: var(--bp-secondary);
  background: var(--bp-secondary);
}
#documents button:focus-visible {
  outline-color: var(--bp-navigation-text);
  outline-offset: -2px;
}
.nav-empty {
  padding: 12px;
  color: var(--bp-navigation-muted);
}
.sidebar-footer {
  border-top: 1px solid var(--bp-navigation-hover);
  padding: 18px 26px;
  font-size: 12px;
  color: var(--bp-navigation-muted);
}
.pilot-dot {
  width: 6px;
  height: 6px;
  background: var(--bp-secondary);
  display: inline-block;
  border-radius: 50%;
  margin-right: 9px;
}
.sidebar-footnote {
  display: block;
  padding: 3px 0 0 15px;
  opacity: .7;
  font-size: 11px;
}
.app-header {
  height: var(--bp-header-height);
  position: fixed;
  inset: 0 0 auto var(--bp-sidebar-width);
  display: flex;
  align-items: center;
  gap: 17px;
  padding: 0 28px;
  background: var(--bp-paper);
  box-shadow: var(--bp-header-shadow);
  z-index: 10;
}
.header-title {
  font-size: 16px;
  font-weight: 500;
  white-space: nowrap;
}
.header-divider {
  width: 1px;
  height: 20px;
  background: var(--bp-border);
}
.header-context {
  color: var(--bp-muted);
  font-size: 13px;
}
.header-actions {
  margin-left: auto;
  display: flex;
  gap: 17px;
  align-items: center;
}
.document-search {
  height: 38px;
  width: 265px;
  display: flex;
  gap: 8px;
  align-items: center;
  border: 1px solid var(--bp-control-border);
  border-radius: 8px;
  padding: 0 11px;
  color: var(--bp-muted);
  background: var(--bp-search);
}
.document-search:focus-within {
  border-color: var(--bp-primary);
  box-shadow: 0 0 0 3px var(--bp-focus-ring);
}
.document-search svg {
  width: 18px;
  height: 18px;
}
.document-search input {
  background: transparent;
  color: var(--bp-text);
  border: 0;
  outline: 0;
  width: 100%;
  min-width: 0;
  font-size: 13px;
}
.document-search input::placeholder {
  color: var(--bp-search-placeholder);
}
.document-search kbd {
  border: 1px solid var(--bp-border);
  padding: 0 5px;
  border-radius: 3px;
  font-size: 11px;
}
.icon-button {
  border: 0;
  background: transparent;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 38px;
  height: 38px;
  padding: 7px;
}
.qa-theme-toggle svg {
  display: none;
}
html[data-bp-theme-mode=auto] .qa-theme-icon--auto,
html[data-bp-theme-mode=light] .qa-theme-icon--light,
html[data-bp-theme-mode=dark] .qa-theme-icon--dark {
  display: block;
}
.menu-toggle {
  display: none;
}
main {
  margin-left: var(--bp-sidebar-width);
  padding: calc(var(--bp-header-height) + 27px) 30px 40px;
  min-width: 0;
}
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--bp-muted);
  font-size: 12px;
  margin-bottom: 25px;
}
.breadcrumbs span:last-child {
  color: var(--bp-primary);
}
.version-badge {
  background: var(--bp-primary-soft);
  color: var(--bp-primary);
  border-radius: 4px;
  padding: 2px 7px;
  font-size: 10px;
}
h1 {
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -.4px;
  line-height: 1.25;
  margin: 12px 0 8px;
}
.muted {
  color: var(--bp-muted);
  font-size: 12px;
  line-height: 1.6;
}
.page-actions {
  display: flex;
  flex-wrap: wrap;
  max-width: 100%;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.page-actions button {
  white-space: nowrap;
  font-size: 12px;
  padding: 11px 15px;
}
.primary {
  color: var(--bp-on-primary);
  background: var(--bp-primary);
  border-color: var(--bp-primary);
  box-shadow: var(--bp-button-shadow);
}
.primary:hover {
  color: var(--bp-on-primary);
  background: var(--bp-primary-hover);
}
.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 245px;
  gap: 22px;
  align-items: start;
}
.editor-sheet {
  min-width: 0;
  background: var(--bp-paper);
  border: 1px solid var(--bp-border-soft);
  box-shadow: var(--bp-shadow-1);
  border-radius: var(--bp-radius);
}
#toolbar {
  display: flex;
  flex-wrap: wrap;
  background: var(--bp-paper);
  border-bottom: 1px solid var(--bp-border-soft);
  padding: 9px 12px;
  gap: 5px 0;
  border-radius: var(--bp-radius) var(--bp-radius) 0 0;
  position: sticky;
  top: var(--bp-header-height);
  z-index: 5;
}
.toolbar-group {
  display: flex;
  align-items: center;
  gap: 1px;
  border-right: 1px solid var(--bp-border-soft);
  padding: 0 6px;
}
.toolbar-group:last-child {
  border: 0;
}
#toolbar button {
  border: 0;
  border-radius: 4px;
  padding: 7px 8px;
  min-height: 32px;
  font-size: 12px;
  color: var(--bp-text);
}
#toolbar button[aria-pressed=true] {
  background: var(--bp-primary-soft);
  color: var(--bp-primary);
}
#editor {
  min-width: 0;
  overflow-x: auto;
}
.tiptap {
  padding: 34px 36px;
  min-height: 680px;
  line-height: 1.7;
  outline: 0;
  overflow-wrap: anywhere;
}
.tiptap h1 {
  font-size: 27px;
  margin: 0 0 25px;
}
.tiptap h2 {
  font-size: 21px;
  font-weight: 500;
  margin: 30px 0 14px;
}
.tiptap h3 {
  font-size: 17px;
  font-weight: 500;
}
.tiptap ul,
.tiptap ol {
  padding-left: 25px;
}
.tiptap li {
  margin: 5px 0;
}
.tiptap table {
  border-collapse: collapse;
  width: 100%;
  table-layout: fixed;
  font-size: 12px;
  margin: 20px 0;
}
.tiptap th,
.tiptap td {
  border: 1px solid var(--bp-border);
  padding: 10px;
  vertical-align: top;
  position: relative;
  min-width: 90px;
}
.tiptap th {
  background: var(--bp-table-head);
  font-weight: 500;
}
.tiptap td p,
.tiptap th p {
  margin: 0;
}
.tiptap tr:hover td {
  background: var(--bp-row-hover);
}
.tiptap .selectedCell {
  background: var(--bp-primary-soft);
}
.tiptap img {
  max-width: 100%;
  height: auto;
  border-radius: 5px;
}
.tiptap .ProseMirror-selectednode {
  outline: 2px solid var(--bp-primary);
  outline-offset: 3px;
}
.tiptap blockquote {
  margin: 20px 0;
  border-left: 3px solid var(--bp-primary);
  background: var(--bp-magic-soft);
  padding: 10px 16px;
  color: var(--bp-muted);
  font-size: 13px;
}
.tiptap blockquote p {
  margin: 0;
}
.tiptap code {
  background: var(--bp-neutral-soft);
  border-radius: 3px;
  padding: 2px 4px;
  font-size: .9em;
}
.tiptap pre {
  overflow: auto;
  background: var(--bp-code);
  color: var(--bp-code-text);
  padding: 16px;
  border-radius: var(--bp-radius);
}
.tiptap pre code {
  background: transparent;
}
.tiptap a {
  text-decoration: underline;
  text-underline-offset: 2px;
}
.inspector {
  min-width: 0;
  display: grid;
  gap: 16px;
}
.inspector-card {
  background: var(--bp-paper);
  border: 1px solid var(--bp-border-soft);
  border-radius: var(--bp-radius);
  padding: 17px;
  box-shadow: var(--bp-shadow-1);
  scroll-margin-top: 20px;
}
.inspector-card h2 {
  font-size: 13px;
  font-weight: 500;
  margin: 0 0 13px;
}
.inspector-card .muted {
  font-size: 11px;
  margin-bottom: 0;
}
.card-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.count-badge {
  border-radius: 4px;
  font-size: 10px;
  padding: 1px 6px;
  background: var(--bp-neutral-soft);
  color: var(--bp-muted);
}
#status {
  font-size: 12px;
  line-height: 1.6;
  background: var(--bp-primary-soft);
  color: var(--bp-primary);
  padding: 10px;
  border-radius: 5px;
  margin: 0;
  overflow-wrap: anywhere;
}
#versions {
  max-height: 220px;
  overflow: auto;
  scrollbar-width: thin;
}
#versions button {
  display: block;
  font-size: 11px;
  padding: 9px 0;
  border: 0;
  border-radius: 0;
  border-bottom: 1px solid var(--bp-border-soft);
  width: 100%;
  text-align: left;
}
.empty-state {
  color: var(--bp-muted);
  font-size: 11px;
  margin: 3px 0;
}
.upload-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 19px 8px;
  width: 100%;
  border: 1px dashed var(--bp-control-border);
  background: var(--bp-page);
  font-size: 11px;
}
.upload-zone small {
  color: var(--bp-muted);
  font-size: 10px;
}
#assets {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}
#assets:not(:empty) {
  margin-top: 12px;
}
#assets button {
  padding: 5px;
  background: var(--bp-page);
}
#assets img {
  width: 100%;
  height: 48px;
  object-fit: contain;
  display: block;
}
.text-action {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border: 0;
  font-size: 12px;
  width: 100%;
  text-align: left;
}
details {
  font-size: 11px;
  border-top: 1px solid var(--bp-border-soft);
  margin-top: 12px;
  padding-top: 12px;
}
summary {
  color: var(--bp-muted);
  cursor: pointer;
}
details button {
  font-size: 11px;
  width: 100%;
  margin-top: 8px;
}
.source-path {
  overflow-wrap: anywhere;
}
.comparison-link {
  display: block;
  font-size: 11px;
  margin-top: 14px;
}
body.reading #toolbar,
body.reading #save,
body.reading .upload-zone {
  display: none;
}
.office-publication-bar {
  display: flex;
  gap: 20px;
  justify-content: space-between;
  flex-wrap: wrap;
  margin: 18px 0;
  color: var(--bp-muted);
  font-size: 13px;
}
.office-publication-bar a {
  color: var(--bp-primary);
  font-weight: 500;
}
.published-content {
  background: var(--bp-paper);
  border: 1px solid var(--bp-border);
  border-radius: 8px;
  padding: 32px;
  margin-bottom: 20px;
  overflow: auto;
  line-height: 1.65;
  overflow-wrap: anywhere;
}
.published-content table {
  border-collapse: collapse;
  width: 100%;
  margin: 18px 0;
}
.published-content td,
.published-content th {
  border: 1px solid var(--bp-border);
  padding: 8px;
  vertical-align: top;
  min-width: 80px;
}
.published-content th {
  background: var(--bp-primary-soft);
}
.published-content img {
  max-width: 100%;
  height: auto;
}
.published-content pre {
  white-space: pre-wrap;
}
.office-empty-state {
  min-height: 280px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 8px;
  text-align: center;
  color: var(--bp-muted);
}
.office-empty-state h2 {
  margin: 0;
  color: var(--bp-text);
  font-size: 20px;
}
.office-empty-state p {
  margin: 0;
}
#published-versions button {
  display: block;
  margin: 8px 0;
  text-align: left;
}
@media (min-width: 1600px) {
  .workspace {
    grid-template-columns: minmax(0, 1fr) 275px;
  }
  .tiptap {
    padding: 42px 50px;
  }
}
@media (max-width: 1200px) {
  .header-context,
  .header-divider {
    display: none;
  }
  .workspace {
    grid-template-columns: minmax(0, 1fr) 210px;
    gap: 16px;
  }
  main {
    padding-left: 22px;
    padding-right: 22px;
  }
  .tiptap {
    padding: 25px;
  }
}
@media (max-width: 1000px) {
  .workspace {
    grid-template-columns: minmax(0, 1fr);
  }
  .inspector {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .document-search {
    width: 220px;
  }
}
@media (max-width: 760px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 180ms ease;
  }
  body.menu-open .sidebar {
    transform: translateX(0);
  }
  .app-header {
    left: 0;
    gap: 8px;
    padding: 0 12px;
  }
  .menu-toggle {
    display: flex;
  }
  .header-title {
    display: none;
  }
  .header-actions {
    flex: 1;
    gap: 8px;
    margin: 0;
  }
  .document-search {
    width: auto;
    flex: 1;
  }
  .document-search kbd {
    display: none;
  }
  main {
    margin-left: 0;
    padding: 82px 16px 30px;
  }
  .breadcrumbs {
    margin-bottom: 20px;
  }
  h1 {
    font-size: 24px;
  }
  .page-actions {
    flex-wrap: wrap;
  }
  .tiptap {
    padding: 22px;
  }
  .tiptap h1 {
    font-size: 24px;
  }
  #toolbar {
    position: static;
    padding: 8px 5px;
  }
  #toolbar button {
    min-height: 38px;
  }
  #menu-backdrop {
    position: fixed;
    inset: 0;
    background: rgb(5 8 25 / 50%);
    border: 0;
    border-radius: 0;
    z-index: 15;
  }
  body.menu-open {
    overflow: hidden;
  }
  .skip-link {
    left: 15px;
  }
}
@media (max-width: 430px) {
  .inspector {
    grid-template-columns: minmax(0, 1fr);
  }
  .tiptap {
    padding: 18px;
  }
  .page-actions {
    width: 100%;
  }
  .page-actions button {
    flex: 1;
    padding: 10px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
body:not([data-ready]) .library-actions {
  visibility: hidden;
}
.wiki-reader #new-page,
.wiki-reader #new-section,
.wiki-reader #new-office,
.wiki-reader #import-file,
.wiki-reader #trash-open,
.wiki-reader #edit-node,
.wiki-reader #delete-node,
.wiki-reader #media-panel,
.wiki-reader #toolbar,
.wiki-reader #office-preview-link {
  display: none !important;
}
#space-select {
  margin: 0 20px 12px;
  width: calc(100% - 40px);
  padding: 8px;
  border: 1px solid var(--bp-border);
  border-radius: 7px;
  background: var(--bp-paper);
  color: var(--bp-text);
}
.account-link {
  margin-left: 14px;
  font-size: 13px;
  white-space: nowrap;
}
#publish-page {
  margin-left: 8px;
}
#search-results {
  margin-bottom: 24px;
  padding: 20px;
  background: var(--bp-paper);
  border: 1px solid var(--bp-border);
  border-radius: 8px;
}
#search-results h2 {
  font-size: 18px;
}
#search-results button {
  display: flex;
  flex-direction: column;
  text-align: left;
  width: 100%;
  gap: 8px;
  padding: 12px;
  margin-top: 8px;
}
#search-results span {
  font-size: 13px;
  color: var(--bp-muted);
  white-space: normal;
  line-height: 1.5;
}
.tree-row {
  display: flex;
  align-items: center;
  min-width: 0;
}
#documents .tree-toggle {
  width: 28px;
  flex: 0 0 28px;
  padding: 7px 0;
  text-align: center;
  font-size: 20px;
}
#documents .tree-toggle::before {
  display: none;
}
#documents .tree-node {
  width: auto;
  flex: 1;
  min-width: 0;
  padding: 9px 8px;
  overflow-wrap: anywhere;
}
.tree-spacer {
  flex: 0 0 28px;
}
#document-domain {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
#document-domain button {
  padding: 0;
  border: 0;
  font-size: inherit;
  text-align: left;
}
#document-domain button:hover {
  text-decoration: underline;
}
.workspace {
  grid-template-columns: minmax(0, 1fr);
}
.office-node .editor-sheet,
.office-node #media-panel,
.office-node #outline-panel {
  display: none;
}
.office-frame {
  width: 100%;
}
.office-frame:has(#office[hidden]) {
  display: none;
}
.office-frame-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  margin: 0 0 6px;
}
.office-frame-actions button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 9px;
  border-color: transparent;
  color: var(--bp-muted);
  background: transparent;
  font-size: 12px;
}
.office-frame-actions button:hover {
  color: var(--bp-text);
  background: var(--bp-primary-soft);
}
.office-frame-actions svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}
#office {
  height: calc(100dvh - 150px);
  min-height: 680px;
  max-height: 2000px;
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--bp-border);
  border-radius: 10px;
  background: var(--bp-paper);
  box-shadow: 0 10px 30px color-mix(in srgb, var(--bp-text) 8%, transparent);
}
.office-resize-handle {
  height: 14px;
  position: relative;
  cursor: ns-resize;
  touch-action: none;
}
.office-resize-handle::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 5px;
  width: 52px;
  height: 3px;
  transform: translateX(-50%);
  border-radius: 2px;
  background: var(--bp-border);
}
.office-resize-handle:hover::before,
.office-resize-handle:focus-visible::before {
  background: var(--bp-primary);
}
body.resizing-office {
  cursor: ns-resize;
  user-select: none;
}
.office-frame:fullscreen {
  display: flex;
  flex-direction: column;
  width: 100vw;
  height: 100vh;
  padding: 8px;
  background: var(--bp-paper);
}
.office-frame:fullscreen .office-frame-actions {
  flex: 0 0 auto;
  margin-bottom: 6px;
}
.office-frame:fullscreen #office {
  flex: 1 1 auto;
  height: auto !important;
  min-height: 0;
  max-height: none;
  border-radius: 6px;
}
.office-frame:fullscreen .office-resize-handle {
  display: none;
}
#office-review-dialog {
  width: min(1400px, calc(100vw - 32px));
  max-height: 95vh;
}
#office-review-frame {
  height: 65vh;
  min-height: 380px;
}
#office-review-web {
  max-height: 65vh;
  min-height: 380px;
}
#office-review-warnings:empty {
  display: none;
}
#office iframe,
#office-review-frame iframe {
  border: 0;
}
#document-tools > summary {
  cursor: pointer;
  padding: 14px 0;
  color: var(--bp-muted);
}
#document-tools .inspector {
  grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr));
  align-items: start;
}
#comments-panel {
  padding: 24px;
}
#comment-form {
  margin-top: 22px;
  display: grid;
  gap: 12px;
}
#comment-form textarea {
  width: 100%;
  box-sizing: border-box;
  resize: vertical;
  padding: 12px;
  font: inherit;
  color: var(--bp-text);
  background: var(--bp-paper);
  border: 1px solid var(--bp-border);
  border-radius: 6px;
}
#comment-form button {
  justify-self: start;
}
#block-style {
  max-width: 160px;
  min-height: 34px;
  border: 1px solid var(--bp-border);
  border-radius: 4px;
  color: var(--bp-text);
  background: var(--bp-paper);
  font: inherit;
  font-size: 12px;
  padding: 5px;
}
#table-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  flex-basis: 100%;
  gap: 5px;
  padding-top: 8px;
  margin-top: 3px;
  border-top: 1px solid var(--bp-border);
}
#table-tools[hidden] {
  display: none;
}
.table-tools-label {
  color: var(--bp-primary);
  font-size: 12px;
  padding: 0 6px;
}
#table-tools small {
  flex-basis: 100%;
  font-size: 11px;
  color: var(--bp-muted);
  padding: 3px 6px;
}
#toolbar button:disabled {
  opacity: .4;
  cursor: default;
}
.tiptap .tableWrapper {
  overflow-x: auto;
  margin: 18px 0;
}
.tiptap .tableWrapper table {
  margin: 0;
}
.tiptap .column-resize-handle {
  position: absolute;
  right: -2px;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--bp-primary);
  pointer-events: none;
}
.tiptap.resize-cursor {
  cursor: col-resize;
}
.tiptap .selectedCell::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--bp-primary-soft);
  pointer-events: none;
}
@media (max-width: 760px) {
  #table-tools .toolbar-group {
    flex-wrap: wrap;
  }
  #table-tools button {
    font-size: 11px;
  }
}
#insert-menu {
  position: fixed;
  z-index: 100;
  width: 260px;
  max-height: 310px;
  overflow: auto;
  padding: 6px;
  background: var(--bp-paper);
  border: 1px solid var(--bp-border);
  border-radius: 8px;
  box-shadow: 0 8px 30px #0002;
}
#insert-menu[hidden] {
  display: none;
}
#insert-menu button {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  padding: 10px;
}
#insert-menu [aria-selected=true],
.choice-list [aria-pressed=true] {
  background: var(--bp-primary-soft);
  color: var(--bp-primary);
}
.choice-list {
  display: flex;
  flex-direction: column;
  max-height: 220px;
  overflow: auto;
  gap: 4px;
}
.choice-list button {
  text-align: left;
}
.tiptap figure,
.published-content figure {
  margin: 20px 0;
  max-width: 100%;
}
.tiptap figcaption,
.published-content figcaption {
  color: var(--bp-muted);
  font-size: 13px;
  padding: 8px 0;
  white-space: pre-wrap;
}
.tiptap [id] {
  scroll-margin-top: 150px;
}
#document-outline {
  display: flex;
  flex-direction: column;
  gap: 9px;
  font-size: 13px;
  overflow-wrap: anywhere;
}
#personal-pages {
  margin: 20px;
  color: #fff;
  font-size: 12px;
}
#personal-pages h2 {
  font-size: 12px;
  margin-top: 20px;
}
#personal-pages button {
  color: inherit;
  background: transparent;
  border: 0;
  display: block;
  width: 100%;
  text-align: left;
  padding: 6px 0;
  overflow-wrap: anywhere;
}
.search-section-label {
  display: block;
  margin: 12px 20px;
  color: #fff;
  font-size: 12px;
}
#search-section {
  width: 100%;
  margin-top: 6px;
  min-width: 0;
  padding: 7px;
  border-radius: 5px;
}
.large-dialog {
  width: min(960px, calc(100vw - 32px));
  max-height: 85vh;
  overflow: auto;
}
.large-dialog textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 10px;
  color: var(--bp-text);
  background: var(--bp-paper);
  border: 1px solid var(--bp-border);
  border-radius: 5px;
  font: inherit;
}
.comment {
  padding: 16px 0;
  border-bottom: 1px solid var(--bp-border);
}
.comment h3 {
  margin: 0;
  font-size: 14px;
}
.comment p,
.comment blockquote {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.comment blockquote {
  border-left: 3px solid var(--bp-border);
  padding-left: 12px;
  margin-left: 0;
  color: var(--bp-muted);
}
.version-comparison,
.compare-selectors {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
}
.version-comparison pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: inherit;
  font-size: 13px;
  padding: 14px;
  background: var(--bp-bg);
  border: 1px solid var(--bp-border);
  border-radius: 5px;
}
.diff-added {
  background: #dcfce7;
  color: #14532d;
}
.diff-removed {
  background: #fee2e2;
  color: #7f1d1d;
}
#compare-open {
  font-size: 12px;
}
@media (max-width: 760px) {
  .version-comparison {
    grid-template-columns: 1fr;
  }
  .page-actions {
    flex-wrap: wrap;
  }
  #compare-open {
    flex: 1;
  }
}
.document-version {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  min-height: 36px;
  padding: 0;
  flex-shrink: 0;
}
.document-version[hidden],
#global-status:empty {
  display: none;
}
.document-version .version-badge {
  font-size: 11px;
  white-space: nowrap;
}
.document-version {
  gap: 8px;
}
.document-version .document-actions-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  font-size: 26px;
  line-height: 1;
  border-color: transparent;
  background: transparent;
}
.document-version .document-actions-toggle:hover,
.document-actions-toggle[aria-expanded=true] {
  background: var(--bp-primary-soft);
}
.document-version #save {
  margin-right: auto;
  font-size: 12px;
  padding: 8px 12px;
}
.document-actions-popover {
  position: fixed;
  inset: auto;
  margin: 0;
  width: min(320px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  overflow: auto;
  padding: 8px;
  color: var(--bp-text);
  background: var(--bp-paper);
  border: 1px solid var(--bp-border);
  border-radius: 10px;
  box-shadow: 0 10px 35px #0003;
}
.document-actions-popover .page-actions,
.document-actions-popover .node-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 3px;
  margin: 0;
  width: 100%;
}
.document-actions-popover .node-actions {
  border-top: 1px solid var(--bp-border-soft);
  margin-top: 6px;
  padding-top: 6px;
}
.document-actions-popover button {
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  font-size: 13px;
  white-space: normal;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.document-actions-popover button:hover {
  background: var(--bp-primary-soft);
}
.document-actions-popover button[hidden] {
  display: none;
}
.document-actions-popover #delete-node {
  color: var(--bp-danger,#c73535);
}
.document-actions-popover label {
  display: grid;
  gap: 8px;
  padding: 10px 12px 4px;
  font-size: 12px;
}
.document-actions-popover select {
  width: 100%;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.document-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.document-topbar .breadcrumbs {
  flex: 1;
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}
.document-topbar #document-domain {
  min-width: 0;
}
@media (max-width: 760px) {
  .document-topbar {
    flex-wrap: wrap;
    gap: 6px;
  }
  .document-topbar .breadcrumbs {
    flex-basis: 100%;
  }
  .document-topbar .document-version {
    max-width: 100%;
    margin-left: auto;
  }
}
.version-info {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 4px 8px;
  min-width: 0;
}
#version-details {
  color: var(--bp-muted);
  font-size: 11px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
#version-details time {
  white-space: nowrap;
}
.document-topbar .document-version {
  flex-shrink: 1;
  max-width: 65%;
}
.document-version .document-actions-toggle,
.document-version #save {
  flex-shrink: 0;
}
@media (max-width: 760px) {
  .document-topbar .document-version {
    max-width: 100%;
  }
}
.space-heading {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 18px 4px 12px;
  min-width: 0;
}
#space-name {
  flex: 1;
  min-width: 0;
  font-weight: 500;
  padding: 4px;
  overflow-wrap: anywhere;
}
.space-heading #space-select {
  flex: 1;
  min-width: 0;
  width: auto;
  margin: 0;
  padding: 6px;
}
.space-heading .sidebar-action {
  flex: 0 0 30px;
  width: 30px;
  height: 32px;
  padding: 0;
  font-size: 22px;
  line-height: 1;
  color: var(--bp-navigation-text);
  background: transparent;
  border-color: transparent;
}
.space-heading .sidebar-action:hover {
  background: var(--bp-navigation-hover);
}
body:not([data-ready]) .sidebar-action {
  visibility: hidden;
}
.sidebar-popover {
  position: fixed;
  inset: auto;
  margin: 0;
  width: min(220px, calc(100vw - 24px));
  padding: 6px;
  border: 1px solid var(--bp-border);
  border-radius: 8px;
  color: var(--bp-text);
  background: var(--bp-paper);
  box-shadow: 0 8px 25px #0003;
}
.sidebar-popover button {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  padding: 10px 12px;
}
#search-filter {
  margin: 0 0 12px;
  color: var(--bp-muted);
  font-size: 12px;
  max-width: 420px;
}
#search-filter select {
  display: block;
  background: var(--bp-paper);
  color: var(--bp-text);
  border: 1px solid var(--bp-border);
}
.document-edit-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}
.document-edit-actions button {
  font-size: 12px;
  padding: 8px 12px;
}
.document-edit-actions #publish-page {
  margin: 0;
}
body.reading .document-edit-actions {
  display: none;
}
#page-preview-content {
  padding: 16px 0;
  overflow-wrap: anywhere;
}
#page-preview-content img {
  max-width: 100%;
}
#page-preview-content table {
  width: 100%;
  border-collapse: collapse;
}
#page-preview-content td,
#page-preview-content th {
  border: 1px solid var(--bp-border);
  padding: 8px;
}
