/* src/client/page-hierarchy.css */
.page-hierarchy {
  max-width: 1040px;
  margin: 0 auto;
  padding: 40px 48px 100px;
  color: var(--text, #37352f);
}
.paper:has(> .page-hierarchy-wide:not([hidden])) {
  max-width: none;
}
.paper > .page-hierarchy-wide {
  max-width: none;
  padding-inline: 0;
}
.sidebar-actions .topic-directory-name {
  white-space: normal;
  overflow-wrap: anywhere;
}
.page-hierarchy h1 {
  font-size: 32px;
  letter-spacing: -.6px;
  margin: 12px 0;
}
.page-hierarchy-description,
.page-hierarchy-empty {
  color: var(--muted, #787774);
  font-size: 14px;
}
.page-hierarchy-status {
  font-size: 14px;
  min-height: 20px;
}
.page-hierarchy-controls {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 12px 0;
  font-size: 14px;
  flex-wrap: wrap;
}
.page-hierarchy-controls button,
.page-hierarchy-place {
  border: 1px solid var(--border, #e6e5e3);
  border-radius: 4px;
  padding: 4px 8px;
  background: transparent;
  color: inherit;
}
.page-hierarchy-row {
  position: relative;
  display: flex;
  min-height: 38px;
  align-items: center;
  gap: 5px;
  border-radius: 4px;
  padding-left: calc(var(--page-depth, 0) * 24px + 4px);
  border: 1px solid transparent;
}
.page-hierarchy-row:hover {
  background: var(--hover, #f5f5f4);
}
.page-hierarchy-row button {
  font: inherit;
  cursor: pointer;
}
.page-hierarchy-toggle,
.page-hierarchy-more,
.page-hierarchy-title {
  background: transparent;
  border: 0;
  color: inherit;
  border-radius: 4px;
  padding: 6px;
  text-align: left;
}
.page-hierarchy-toggle {
  width: 26px;
  flex: 0 0 26px;
  font-size: 20px !important;
}
.page-hierarchy-toggle:disabled {
  cursor: default;
}
.page-hierarchy-label {
  position: relative;
  min-width: 0;
  max-width: 100%;
}
.page-hierarchy-title {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.page-hierarchy-label:has(.page-hierarchy-more) .page-hierarchy-title {
  padding-inline-end: 38px;
}
.page-hierarchy-label > .page-hierarchy-more {
  position: absolute;
  inset-inline-end: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
}
.page-hierarchy-more {
  opacity: .4;
  font-weight: 600;
  font-size: 20px !important;
}
.page-hierarchy-row:hover .page-hierarchy-more,
.page-hierarchy-more:focus {
  opacity: 1;
}
.page-hierarchy-source {
  outline: 2px solid var(--accent, #2383e2);
  outline-offset: -2px;
}
.page-hierarchy-row[data-drop=before]::before,
.page-hierarchy-row[data-drop=after]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 3px;
  background: #2383e2;
  border-radius: 2px;
}
.page-hierarchy-row[data-drop=before]::before {
  top: -2px;
}
.page-hierarchy-row[data-drop=after]::after {
  bottom: -2px;
}
.page-hierarchy-row[data-drop=child] {
  box-shadow: inset 0 0 0 2px #2383e2;
  background: #eaf4fe;
}
.page-hierarchy-menu {
  position: fixed;
  inset: auto;
  margin: 0;
  max-width: calc(100vw - 16px);
  color: var(--text);
  z-index: 12;
  min-width: 180px;
  background: var(--surface, white);
  border: 1px solid var(--border, #e6e5e3);
  border-radius: 6px;
  box-shadow: 0 4px 16px #0002;
  padding: 5px;
}
.page-hierarchy-menu button {
  font: inherit;
  cursor: pointer;
  display: block;
  padding: 7px 10px;
  border: 0;
  background: transparent;
  width: 100%;
  text-align: left;
  color: inherit;
}
.page-hierarchy-menu button:hover {
  background: var(--hover, #f5f5f4);
}
.page-hierarchy-confirm {
  box-sizing: border-box;
  width: min(470px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
  color: var(--text);
  background: var(--surface);
  padding: 24px;
  border: 1px solid #e6e5e3;
  border-radius: 8px;
}
.page-hierarchy-confirm button {
  padding: 7px 12px;
  margin-right: 8px;
  border-radius: 4px;
  border: 1px solid #ddd;
  background: transparent;
}
.page-hierarchy-confirm .danger {
  color: #b91c1c;
}
.page-hierarchy-confirm::backdrop {
  background: #0005;
}
@media (max-width: 700px) {
  .page-hierarchy {
    padding: 24px 16px 80px;
  }
  .page-hierarchy h1 {
    font-size: 26px;
  }
  .page-hierarchy-place {
    font-size: 11px !important;
    padding: 3px;
  }
}

/* src/client/principal-picker.css */
.principal-picker {
  flex: 1 1 12rem;
  min-width: 0;
}
.principal-picker > input {
  width: 100%;
}
.principal-results {
  position: fixed;
  inset: auto;
  margin: 0;
  box-sizing: border-box;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  border-radius: 7px;
  padding: 4px;
  overflow-y: auto;
  overscroll-behavior: contain;
  box-shadow: 0 4px 16px #0002;
  font:
    14px/1.4 -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}
.principal-results [role=option] {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 3px 7px;
  border-radius: 4px;
  cursor: pointer;
  overflow-wrap: anywhere;
}
.principal-results [role=option]:is(:hover, [aria-selected=true]) {
  background: var(--hover);
}
.principal-results [aria-disabled=true] {
  color: var(--muted);
  cursor: default;
}
.principal-icon {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 23px;
  height: 23px;
  border-radius: 50%;
  color: var(--text);
  background: var(--hover);
  font-size: 12px;
  font-weight: 600;
}
.principal-icon svg {
  width: 16px;
  height: 16px;
}

/* src/client/project-cards.css */
.project-database .project-card-heading {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  padding-right: 20px;
}
.project-database .project-card-heading .database-entry {
  display: block;
  min-width: 0;
  padding: 2px 0;
  font-weight: 500;
  line-height: 21px;
}
.project-database .project-card-icon {
  display: inline-flex;
  flex: 0 0 24px;
  align-items: center;
  justify-content: center;
  height: 25px;
  min-height: 0;
  padding: 2px;
  border: 0;
  background: none;
  border-radius: 4px;
  font-size: 18px;
}
.project-database .project-card-icon svg {
  width: 17px;
  height: 17px;
}
.project-database .project-card-property {
  display: block;
  max-width: 100%;
  border: 0;
  background: none;
  padding: 2px 4px;
  min-height: 26px;
  text-align: left;
  font: inherit;
  font-size: 13px;
  border-radius: 4px;
}
.project-database .project-card-property:hover,
.project-database .project-card-icon:hover {
  background: #00000008;
}
.project-database .database-list-properties {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  margin-top: 4px;
}
.project-database .project-card-composing {
  padding: 10px;
  border: 1px solid #aaa;
  box-shadow: 0 2px 5px #0001;
}
.project-database input.project-card-name {
  width: 100%;
  min-width: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
  padding: 0;
  font: inherit;
  font-size: 14px;
  line-height: 23px;
  outline: none;
}
.project-card-compose-properties {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px;
  margin-top: 5px;
}
.project-card-notice {
  font-size: 12px;
  line-height: 18px;
  color: var(--muted);
  margin: 4px 0 0;
}
.project-card-notice:empty {
  display: none;
}
.project-card-dialog {
  position: fixed;
  inset: auto;
  margin: 0;
  width: 280px;
  max-width: calc(100vw - 16px);
  max-height: min(520px, calc(100vh - 24px));
  overflow: auto;
  overscroll-behavior: contain;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 8px 28px #0002;
  font:
    14px/1.4 -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}
.project-card-dialog::backdrop {
  background: transparent;
}
.project-card-dialog button,
.project-card-dialog summary,
.project-card-field-choice {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 32px;
  padding: 5px 8px;
  margin: 0;
  border: 0;
  border-radius: 4px;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.project-card-dialog button:hover,
.project-card-dialog summary:hover,
.project-card-field-choice:hover {
  background: #00000008;
}
.project-card-dialog h3 {
  font: inherit;
  font-weight: 500;
  margin: 6px 8px;
}
.project-card-dialog .database-card-move-form {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
  padding: 6px 4px;
  margin-top: 5px;
}
.project-card-dialog select {
  max-width: 100%;
  font: inherit;
}
.project-card-dialog input[type=checkbox] {
  width: 15px;
  height: 15px;
  margin: 0;
}
.project-card-icons {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
}
.project-card-icons button {
  font-size: 23px;
  justify-content: center;
  padding: 5px;
}
.project-card-property-menu[open] {
  max-height: 240px;
  overflow: auto;
}
.project-database .project-card-actions > summary {
  min-width: 26px;
  min-height: 24px;
  text-align: center;
}

/* src/client/project-card-polish.css */
.project-database .database-card-content {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.project-database .project-card-heading {
  min-height: 26px;
  align-items: center;
}
.project-database .project-card-heading .database-entry {
  line-height: 22px;
  padding: 2px 0;
}
.project-database .database-entry:hover {
  text-decoration: none;
}
.project-database .database-card-content .database-list-properties {
  gap: 6px;
  margin: 0;
  padding: 0;
}
.project-database .project-card-property {
  min-height: 26px;
  line-height: 22px;
  padding: 2px 0;
  font-size: 14px;
}
.project-database .project-card-property > .database-cell-value {
  line-height: 22px;
}
.project-database .project-card-compose-properties {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  margin-top: 6px;
}
.project-database .project-card-actions {
  margin: 0;
  height: 0;
}
.project-card-dialog .project-menu-arrow {
  margin-left: auto;
  padding-left: 16px;
  font-size: 18px;
  line-height: 18px;
  color: var(--muted);
}
.project-menu-header {
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 5px;
  margin-bottom: 5px;
}
.project-card-dialog .project-menu-header > button {
  width: auto;
  flex-shrink: 0;
  color: var(--muted);
}
.project-menu-header > span {
  font-size: 13px;
  font-weight: 500;
}
.project-card-dialog hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 5px 0;
}
.project-card-dialog .project-menu-danger {
  color: #b4443b;
}
.project-menu-explanation {
  font-size: 13px;
  line-height: 1.5;
  padding: 0 8px;
  margin: 8px 0 12px;
}
.project-property-back {
  display: flex;
  gap: 8px;
  align-items: center;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  padding: 6px 8px;
  border-radius: 4px;
  cursor: pointer;
}
.project-property-back:not([hidden])::before {
  content: "\2039";
  font-size: 20px;
}
.project-property-back[hidden] {
  display: none;
}
.project-property-back:hover {
  background: var(--hover);
}
.project-option .database-cell-option {
  flex: 0 0 auto;
}
.project-database .database-card[data-insert] {
  position: relative;
}
.project-database .database-card[data-insert]::after {
  content: "";
  pointer-events: none;
  position: absolute;
  left: -2px;
  right: -2px;
  height: 3px;
  border-radius: 2px;
  background: var(--accent, #276450);
  z-index: 3;
}
.project-database .database-card[data-insert=before]::after {
  top: -5px;
}
.project-database .database-card[data-insert=after]::after {
  bottom: -5px;
}
.project-property-dialog .database-cell-option[data-kind=select][data-option="0"] {
  background: #f4e1df;
  color: #88483f;
}
.project-property-dialog .database-cell-option[data-kind=select][data-option="2"] {
  background: #e0ece7;
  color: #3b6854;
}
.project-property-dialog .database-cell-option[data-kind=status] {
  border-radius: 12px;
}
.project-property-dialog .database-cell-option[data-kind=status]::before {
  content: "\25cf";
  font-size: 10px;
  margin-right: 5px;
}
.project-property-dialog .database-cell-option[data-kind=status][data-option="1"] {
  background: #f4e9cd;
  color: #705825;
}
.project-property-dialog .database-cell-option[data-kind=status][data-option="2"] {
  background: #e0ece7;
  color: #3b6854;
}

/* src/client/project-hierarchy.css */
.project-hierarchy {
  margin: 14px 0 22px;
  min-width: 0;
  --project-blue: #2383e2;
}
.hierarchy-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 6px 12px;
  margin: 4px 0 8px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--line);
}
.hierarchy-tabs,
.hierarchy-tools,
.hierarchy-controls,
.hierarchy-heading {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}
.hierarchy-tools {
  margin-inline-start: auto;
}
.hierarchy-controls {
  gap: 8px;
}
.hierarchy-controls[hidden],
.hierarchy-tabs[hidden],
.hierarchy-board[hidden] {
  display: none;
}
.hierarchy-tabs .database-view-tab {
  min-height: 28px;
  border-radius: 999px;
  font: inherit;
  font-size: 14px;
  color: var(--muted);
  cursor: pointer;
}
.hierarchy-tabs .database-view-tab:is([aria-selected=true], [aria-pressed=true]) {
  background: var(--hover);
  color: var(--text);
  font-weight: 550;
}
.hierarchy-tabs svg,
.hierarchy-tools svg {
  display: block;
  width: 16px;
  height: 16px;
}
.hierarchy-controls input[type=search] {
  flex: 1 1 12rem;
  min-width: 8rem;
  max-width: 28rem;
}
.hierarchy-tool,
.hierarchy-controls > button,
.hierarchy-lane > button,
.hierarchy-menu-items button,
.hierarchy-dialog button {
  border: 0;
  border-radius: 5px;
  padding: 5px 8px;
  color: var(--text);
  background: transparent;
  font: inherit;
  cursor: pointer;
}
.hierarchy-tool {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  box-sizing: border-box;
  padding: 0;
  color: var(--muted);
}
.hierarchy-tool:hover,
.hierarchy-tool[aria-pressed=true],
.hierarchy-controls > button:hover,
.hierarchy-lane > button:hover,
.hierarchy-menu-items button:hover,
.hierarchy-dialog button:hover {
  background: var(--hover);
}
.hierarchy-tool[aria-pressed=true] {
  color: var(--project-blue);
}
.hierarchy-tools .hierarchy-primary {
  min-height: 28px;
  padding: 4px 10px;
  border: 0;
  border-radius: 6px;
  font: inherit;
  font-weight: 550;
  color: #fff;
  background: var(--project-blue);
  cursor: pointer;
}
.hierarchy-tools .hierarchy-primary:hover {
  background: #1976d2;
}
.hierarchy-create-task:disabled {
  opacity: .55;
  cursor: wait;
}
.hierarchy-lane .hierarchy-lane-create {
  display: flex;
  align-items: center;
  gap: 5px;
  text-align: start;
  color: var(--muted);
}
.hierarchy-lane-create svg {
  width: 15px;
  height: 15px;
}
.hierarchy-lane > .hierarchy-lane-create {
  opacity: 0;
  pointer-events: none;
}
.hierarchy-lane > .hierarchy-lane-create:focus-visible,
.hierarchy-lane[data-reveal-create] > .hierarchy-lane-create {
  opacity: 1;
  pointer-events: auto;
}
@media (hover: hover) {
  .hierarchy-lane:hover > .hierarchy-lane-create {
    opacity: 1;
    pointer-events: auto;
  }
}
.hierarchy-card-drag-active .hierarchy-lane > .hierarchy-lane-create {
  opacity: 0;
  pointer-events: none;
}
.hierarchy-controls input,
.hierarchy-dialog input,
.hierarchy-dialog select {
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 5px 8px;
  color: var(--text);
  background: var(--surface);
  font: inherit;
}
.hierarchy-current-status,
.hierarchy-archived {
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--subtle);
  font-size: .85em;
}
.hierarchy-archived {
  border: 1px solid var(--line);
}
.hierarchy-notice {
  margin: 7px 0;
  color: var(--muted);
}
.hierarchy-notice:empty {
  display: none;
}
.hierarchy-board {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  padding: 9px 0;
}
.hierarchy-board-list {
  display: block;
}
.hierarchy-table {
  min-width: 640px;
}
.hierarchy-table-row > td:first-child {
  position: relative;
  min-width: 220px;
}
.hierarchy-table-row .project-card-heading {
  padding-right: 20px;
}
.hierarchy-table-row :is(.hierarchy-origin, .hierarchy-archived) {
  display: inline-block;
  margin: 0 5px 4px;
}
.hierarchy-lane {
  display: grid;
  flex: 1 0 240px;
  min-width: 240px;
  gap: 6px;
  padding: 8px;
  box-sizing: border-box;
  border-radius: 5px;
  background: var(--subtle);
}
.hierarchy-lane h3,
.hierarchy-group h4 {
  margin: 0;
  font-size: .95em;
}
.hierarchy-lane-scroll {
  max-height: min(62dvh, 620px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  padding: 4px;
}
.hierarchy-lane-scroll:empty {
  min-height: 30px;
}
.project-embed .hierarchy-lane-scroll {
  max-height: var(--hierarchy-lane-height, min(62dvh, 620px));
}
.hierarchy-group {
  display: grid;
  gap: 7px;
  min-height: 22px;
  padding: 4px 0;
}
.hierarchy-card {
  position: relative;
  display: grid;
  gap: 6px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 5px;
  min-width: 0;
  background: var(--surface);
}
.hierarchy-card[draggable=true] {
  cursor: grab;
}
.project-hierarchy .project-card-heading .hierarchy-card-title {
  min-height: unset;
  color: var(--text);
  font-weight: 500;
  white-space: normal;
  overflow-wrap: anywhere;
  text-decoration: none;
}
.hierarchy-card .project-card-heading {
  align-items: flex-start;
  padding-right: 24px;
}
.hierarchy-origin,
.hierarchy-card-fields {
  color: var(--muted);
  font-size: .82em;
  overflow-wrap: anywhere;
}
.hierarchy-card-fields {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}
.hierarchy-card-fields:empty {
  display: none;
}
.hierarchy-card-fields .database-cell-option,
.hierarchy-card-fields .project-person-chip {
  font-size: 13px;
}
.hierarchy-menu {
  position: relative;
}
.hierarchy-menu summary {
  list-style: none;
  cursor: pointer;
}
.hierarchy-menu summary::-webkit-details-marker {
  display: none;
}
.hierarchy-card-menu {
  position: absolute;
  top: 5px;
  right: 7px;
  width: 25px;
  height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  border-radius: 4px;
  color: var(--muted);
  font: inherit;
  cursor: pointer;
}
.hierarchy-card-menu:is(:hover, [aria-expanded=true]) {
  background: var(--hover);
  color: var(--text);
}
.project-card-dialog.hierarchy-task-popup {
  position: fixed;
  inset: auto;
  margin: 0;
  box-sizing: border-box;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 8px 28px #0002;
  font: 14px/1.4 system-ui, sans-serif;
  overflow: auto;
  overscroll-behavior: contain;
  z-index: 12;
  width: min(245px, var(--editor-visible-width, calc(100vw - 16px)));
}
.hierarchy-task-popup button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 32px;
  padding: 5px 8px;
  margin: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: start;
  cursor: pointer;
}
.hierarchy-task-popup button:hover {
  background: var(--hover);
}
.hierarchy-task-popup .project-menu-arrow {
  margin-inline-start: auto;
}
.hierarchy-task-popup .project-menu-danger {
  color: #b4443b;
}
.hierarchy-peek-actions:not([hidden]) {
  margin: 10px 0;
}
.hierarchy-dialog-actions button.project-menu-danger {
  background: #bd3c35;
}
.hierarchy-dialog-actions button.project-menu-danger:hover {
  background: #a7302a;
}
.hierarchy-menu-items {
  display: grid;
  gap: 2px;
  padding: 5px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 7px;
  box-shadow: 0 5px 18px #0002;
  z-index: 2;
  white-space: nowrap;
}
.hierarchy-menu-items button {
  text-align: start;
}
.hierarchy-menu .hierarchy-menu-items {
  position: absolute;
  inset-inline-end: 0;
  top: calc(100% + 4px);
  min-width: max-content;
}
.hierarchy-drop-before::before,
.hierarchy-drop-after::after {
  content: "";
  position: absolute;
  inset-inline: 1px;
  height: 3px;
  background: var(--project-blue);
  pointer-events: none;
}
.hierarchy-drop-before::before {
  top: -5px;
}
.hierarchy-drop-after::after {
  bottom: -5px;
}
.hierarchy-drop-end {
  box-shadow: inset 0 -3px var(--project-blue);
}
.hierarchy-dragging {
  opacity: .55;
}
.hierarchy-dialog {
  width: min(420px, calc(100% - 24px));
  max-height: 85dvh;
  overflow: auto;
  box-sizing: border-box;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  padding: 14px;
  box-shadow: 0 8px 28px #0002;
  font: 14px/1.45 system-ui, sans-serif;
}
.hierarchy-dialog h2 {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 600;
}
.hierarchy-dialog::backdrop {
  background: #0002;
}
.hierarchy-field {
  display: grid;
  gap: 4px;
  margin: 0 0 9px;
  color: var(--muted);
  font-size: 13px;
}
.hierarchy-dialog fieldset {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 8px 0;
  padding: 8px 0 0;
}
.hierarchy-dialog .project-card-icons {
  margin-bottom: 8px;
}
.hierarchy-dialog .project-card-icons button[aria-pressed=true] {
  background: var(--active-surface);
}
.hierarchy-field[hidden],
.hierarchy-archive-control[hidden] {
  display: none;
}
.hierarchy-dialog-actions {
  display: flex;
  justify-content: end;
  gap: 8px;
  margin-top: 12px;
}
.hierarchy-dialog-actions button[type=submit] {
  background: #2383e2;
  color: #fff;
}
.hierarchy-dialog-actions button[type=submit]:hover {
  background: #1976d2;
}
.hierarchy-preview ul {
  max-height: 35dvh;
  overflow: auto;
}
.hierarchy-archive-control {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.project-hierarchy :focus-visible,
.hierarchy-dialog :focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
@media (pointer: coarse) {
  .hierarchy-tool,
  .hierarchy-controls button,
  .hierarchy-dialog button {
    min-height: 40px;
  }
  .hierarchy-card-menu {
    min-width: 32px;
    min-height: 32px;
  }
}
.hierarchy-column-heading {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 24px;
  gap: 4px;
  padding-inline-end: 27px;
}
.hierarchy-column-heading > h3 {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 5px;
  width: 100%;
}
.hierarchy-column-heading .hierarchy-card-menu {
  inset-inline-end: 0;
  top: 0;
}
.hierarchy-column-label {
  min-width: 0;
  overflow-wrap: anywhere;
  text-align: start;
  padding: 2px 3px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: text;
}
.hierarchy-column-label:hover {
  background: var(--hover);
}
.hierarchy-column-name {
  padding: 2px 5px;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  color: inherit;
  font: inherit;
  border: 1px solid var(--control-line);
  background: var(--surface);
  border-radius: 4px;
}
.hierarchy-column-draft {
  border: 1px dashed var(--control-line);
}
.hierarchy-column-done {
  display: inline-grid;
  flex: 0 0 16px;
  height: 16px;
  box-sizing: border-box;
  place-items: center;
  border-radius: 50%;
  border: 1px solid currentColor;
  font-size: 11px;
  color: var(--muted);
}
.hierarchy-lane[data-status-drop],
.hierarchy-column-moving {
  position: relative;
}
.hierarchy-column-moving {
  outline: 2px solid var(--project-blue);
  outline-offset: -2px;
  cursor: grab;
}
.hierarchy-lane[data-status-drop]::after {
  content: "";
  position: absolute;
  inset-block: 0;
  width: 3px;
  border-radius: 2px;
  background: var(--project-blue);
  pointer-events: none;
}
.hierarchy-lane[data-status-drop=before]::after {
  inset-inline-start: -7px;
}
.hierarchy-lane[data-status-drop=after]::after {
  inset-inline-end: -7px;
}
.hierarchy-progress {
  font-size: .82em;
  color: var(--muted);
}
.hierarchy-progress summary {
  cursor: pointer;
  padding: 2px;
}
.hierarchy-progress progress {
  display: block;
  width: 100%;
  height: 6px;
  margin: 5px 0 0;
  accent-color: var(--project-blue);
}
.hierarchy-progress-group {
  padding: 5px 0;
  border-bottom: 1px solid var(--line);
}
.hierarchy-progress-group ul {
  margin: 2px 0;
  padding-inline-start: 14px;
}
.hierarchy-board-search {
  display: block;
}
.hierarchy-search-project + .hierarchy-search-project {
  margin-top: 14px;
}
.hierarchy-search-project > h3 {
  font-size: .95em;
  margin-block: 0 5px;
}
.hierarchy-search-lanes {
  display: flex;
  gap: 12px;
}
.hierarchy-task-popup [aria-disabled=true] {
  color: var(--muted);
  opacity: .65;
  cursor: default;
}
.hierarchy-swimlane-grid {
  width: max(100%, calc(var(--hierarchy-columns) * 250px - 10px));
  display: grid;
  gap: 4px;
}
.hierarchy-swimlane {
  position: relative;
  min-width: 0;
  padding-inline: 1px;
}
.hierarchy-swimlane-cells {
  display: grid;
  grid-template-columns: repeat(var(--hierarchy-columns), minmax(0, 1fr));
  gap: 10px;
}
.hierarchy-swimlane-headings {
  margin-inline: 1px;
  scrollbar-gutter: stable;
  overflow-y: hidden;
}
.hierarchy-swimlane-named {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding-inline: 0;
}
.hierarchy-swimlane-name {
  margin: 0;
  padding: 3px 36px 3px 8px;
  line-height: 22px;
  overflow-wrap: anywhere;
  font-size: .9em;
  font-weight: 600;
}
.hierarchy-swimlane-menu {
  inset-inline-end: 6px;
  top: 2px;
}
.hierarchy-row-viewport {
  height: var(--board-row-height, auto);
  max-height: var(--board-row-height, var(--hierarchy-lane-height, min(62dvh, 620px)));
  overflow-y: auto;
  scrollbar-gutter: stable;
}
.hierarchy-swimlane-cell {
  min-width: 0;
  min-height: 44px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 4px;
}
.hierarchy-swimlane-cell .hierarchy-lane-scroll,
.project-embed .hierarchy-swimlane-cell .hierarchy-lane-scroll {
  max-height: none;
  min-height: 12px;
  padding: 1px 2px;
  overflow: visible;
  scrollbar-gutter: auto;
}
.hierarchy-swimlane-cell .hierarchy-group {
  min-height: 12px;
  padding: 0;
  gap: 5px;
}
.hierarchy-lane.hierarchy-swimlane-cell > .hierarchy-lane-create {
  min-height: 22px;
  padding-block: 1px;
}
.hierarchy-board-ungrouped {
  gap: 0;
}
.hierarchy-board-ungrouped .hierarchy-swimlane-status {
  border-end-start-radius: 0;
  border-end-end-radius: 0;
}
.hierarchy-board-ungrouped .hierarchy-swimlane-cell {
  border-start-start-radius: 0;
  border-start-end-radius: 0;
  align-self: start;
}
.hierarchy-row-viewport[data-sized] > .hierarchy-swimlane-cells {
  min-height: 100%;
}
.hierarchy-row-viewport[data-sized] .hierarchy-swimlane-cell {
  align-self: stretch;
}
.hierarchy-row-resize {
  display: flex;
  align-items: center;
  height: 9px;
  padding-inline: 12px;
  cursor: ns-resize;
  touch-action: none;
  user-select: none;
}
.hierarchy-row-resize::after {
  content: "";
  position: sticky;
  left: 12px;
  width: 30px;
  height: 3px;
  border-radius: 3px;
  background: var(--control-line);
}
.hierarchy-row-resize:is(:hover, :focus-visible)::after {
  background: var(--accent);
}
@media (pointer: coarse) {
  .hierarchy-row-resize {
    height: 18px;
  }
}
.hierarchy-swimlane-cell .hierarchy-lane-create {
  opacity: 0;
  pointer-events: none;
}
.hierarchy-swimlane-cell[data-reveal-create] .hierarchy-lane-create,
.hierarchy-swimlane-cell .hierarchy-lane-create:focus-visible {
  opacity: 1;
  pointer-events: auto;
}
@media (hover: hover) {
  .hierarchy-swimlane-cell:hover .hierarchy-lane-create {
    opacity: 1;
    pointer-events: auto;
  }
}
.hierarchy-card-drag-active .hierarchy-swimlane-cell .hierarchy-lane-create {
  opacity: 0;
  pointer-events: none;
}
.hierarchy-swimlane-edit {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 4px 32px 8px;
}
.hierarchy-swimlane-edit .hierarchy-column-name {
  flex: 1 1 12rem;
  width: auto;
  max-width: 24rem;
}
.hierarchy-swimlane-edit button {
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--text);
  background: var(--surface);
  font: inherit;
  cursor: pointer;
}
.hierarchy-swimlane-moving {
  outline: 2px solid var(--project-blue);
  outline-offset: -2px;
  cursor: grab;
}
.hierarchy-swimlane-target::after {
  content: "";
  position: absolute;
  inset: -6px 0 auto;
  height: 3px;
  background: var(--project-blue);
  pointer-events: none;
}
.hierarchy-swimlane-target-after::after {
  inset-block: auto -6px;
}
.board-icon-hint {
  position: fixed;
  z-index: 1000;
  pointer-events: none;
  width: max-content;
  max-width: min(28rem, 90vw);
  padding: 4px 8px;
  border-radius: 5px;
  background: #353530;
  color: white;
  box-shadow: 0 2px 6px #0002;
  font: 12px/1.4 system-ui, sans-serif;
}
.hierarchy-task-popup button[aria-pressed=true]::after {
  content: "\2713";
  margin-inline-start: auto;
}
.hierarchy-task-popup .project-card-field-choice {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  min-height: 24px;
  cursor: pointer;
}
.hierarchy-card-fields button {
  display: inline-flex;
  align-items: center;
  color: inherit;
  font: inherit;
  padding: 0;
  background: transparent;
  border: 0;
  cursor: pointer;
}
.hierarchy-card-fields button:hover {
  text-decoration: underline;
}
.hierarchy-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-block: 8px;
  color: var(--muted);
}
.hierarchy-pagination[hidden] {
  display: none;
}
.hierarchy-archive-control select {
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 4px 6px;
}
.hierarchy-pagination .hierarchy-tool {
  width: auto;
  padding-inline: 8px;
  font: inherit;
}
.hierarchy-pagination .hierarchy-tool:disabled {
  opacity: .45;
  cursor: default;
}
.hierarchy-table-options {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
}
.hierarchy-table-options[hidden] {
  display: none;
}
@media (max-width: 600px) {
  .hierarchy-page-size-text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}

/* src/client/project-embeddings.css */
.project-embed {
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
}
.project-embed .database-heading {
  position: relative;
  flex-wrap: nowrap;
  min-height: 36px;
  gap: 8px;
}
.project-embed .database-heading h2 {
  min-width: 0;
  overflow-wrap: anywhere;
}
.project-embed-menu {
  flex: 0 0 auto;
}
.project-embed-compact:not(:hover, :focus-within) .project-embed-menu:not([open]) > summary {
  opacity: 0;
}
.project-embed-options {
  position: absolute;
  inset-inline-end: 0;
  inset-block-start: 100%;
  z-index: 7;
  display: grid;
  min-width: min(200px, 100%);
  padding: 4px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 8px;
  box-shadow: 0 4px 16px #0002;
}
.project-embed-options :is(button, a) {
  min-height: 36px;
  text-align: start;
}
.project-embed-options [aria-pressed=true] {
  background: var(--hover);
}
.project-embed .project-embed-viewport {
  min-width: 0;
  max-width: 100%;
  overflow: auto;
  scrollbar-gutter: stable;
}
.project-embed .database-scroll {
  overflow: visible;
}
.project-embed .database-view-strip {
  min-width: 0;
  max-width: 100%;
}
.project-embed-resize {
  position: relative;
  display: grid;
  place-items: center;
  height: 24px;
  border-top: 1px solid var(--line);
  cursor: ns-resize;
  touch-action: none;
}
.project-embed-resize::after {
  content: "";
  width: 28px;
  height: 3px;
  background: var(--muted);
  border-radius: 2px;
}
.project-embed :is(summary, button, a, .project-embed-resize):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.project-embed-resizing {
  user-select: none;
}
.project-embed-picker .project-embed-choices:not([hidden]) {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.project-embed-picker label {
  display: grid;
  gap: 5px;
}
.project-embed-picker select {
  max-width: 100%;
}
.project-embed-picker [hidden] {
  display: none;
}

/* src/client/preview-users.css */
.preview-user-choices {
  display: grid;
  gap: 8px;
}
.preview-user-hint {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}
.preview-user {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
  font: inherit;
  cursor: pointer;
}
.preview-user:hover {
  background: var(--hover);
}
.preview-user:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.preview-user:disabled {
  opacity: .5;
  cursor: wait;
}
.preview-user-avatar {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border-radius: 6px;
  background: var(--active-surface);
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
}
.preview-local-account {
  margin-top: 12px;
}
.preview-local-account summary {
  cursor: pointer;
}
.preview-local-fields {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

/* src/client/topic-areas.css */
.topic-navigation {
  margin: 14px 0 8px;
  font-size: 14px;
  color: var(--text);
}
.topic-nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.topic-navigation button {
  font: inherit;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  border-radius: 4px;
}
.topic-nav-header .topic-add {
  width: 26px;
  height: 26px;
  font-size: 20px;
}
.topic-nav-row {
  display: flex;
  margin: 1px 4px;
  border-radius: 4px;
}
.topic-nav-row:has([aria-pressed=true]) {
  background: rgba(55, 53, 47, .07);
}
.topic-nav-link {
  flex: 1;
  min-width: 0;
  padding: 6px 7px;
  text-align: left;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  display: flex;
  gap: 9px;
  align-items: center;
}
.topic-nav-icon {
  color: var(--muted);
  font-size: 18px;
}
.topic-manage {
  width: 28px;
  flex-shrink: 0;
}
.topic-navigation button:hover {
  background: rgba(55, 53, 47, .08);
}
.topic-navigation .topic-monitor {
  font-size: 12px;
  color: var(--muted);
  text-align: left;
  margin: 8px 8px 0;
  padding: 6px;
}
.topic-dialog {
  box-sizing: border-box;
  width: 540px;
  max-width: calc(100vw - 24px);
  max-height: 85dvh;
  padding: 0;
  border: 1px solid rgba(0, 0, 0, .08);
  border-radius: 10px;
  box-shadow: 0 14px 50px rgba(15, 15, 15, .18);
  color: var(--text);
  background: var(--surface);
  font:
    14px/1.5 -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}
.topic-dialog::backdrop {
  background: rgba(15, 15, 15, .25);
}
.topic-dialog header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}
.topic-dialog h2 {
  font-size: 16px;
  margin: 0;
  font-weight: 600;
}
.topic-dialog h3 {
  font-size: 12px;
  color: var(--muted);
  margin: 22px 0 8px;
  font-weight: 600;
}
.topic-dialog p {
  margin: 8px 0;
}
.topic-dialog-body {
  padding: 4px 20px 20px;
}
.topic-dialog > form {
  padding: 8px 20px 20px;
}
.topic-dialog button,
.guest-entry button {
  font: inherit;
  border: 1px solid var(--line);
  background: var(--surface);
  color: inherit;
  border-radius: 5px;
  padding: 5px 10px;
  cursor: pointer;
}
.topic-dialog button:hover {
  background: var(--hover);
}
.topic-dialog .topic-close {
  font-size: 22px;
  line-height: 24px;
  padding: 0;
  width: 28px;
  border: 0;
  color: var(--muted);
}
.topic-dialog input,
.topic-dialog select,
.guest-entry input {
  box-sizing: border-box;
  min-width: 0;
  font: inherit;
  color: inherit;
  background: var(--subtle);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 6px 8px;
}
.topic-dialog input:focus,
.topic-dialog select:focus,
.guest-entry input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.topic-field {
  display: grid;
  gap: 6px;
  margin: 12px 0 16px;
}
.topic-area-name {
  font-weight: 600;
  font-size: 18px;
}
.topic-muted {
  color: var(--muted);
  font-size: 13px;
}
.topic-member-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 40px;
  padding: 4px 0;
  border-bottom: 1px solid var(--line);
}
.topic-member-row > :first-child {
  min-width: 0;
  overflow-wrap: anywhere;
}
.topic-member-row small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.topic-member-row select {
  flex-shrink: 0;
  background: transparent;
  border-color: transparent;
  max-width: 145px;
}
.topic-add-member {
  display: flex;
  gap: 6px;
  margin: 12px 0;
}
.topic-add-member > :first-child {
  flex: 1;
  width: 0;
}
.topic-add-member button,
.topic-add-member select {
  flex-shrink: 0;
}
.topic-dialog .topic-text-button {
  border: 0;
  color: var(--muted);
  font-size: 12px;
}
.topic-status {
  color: var(--danger);
  font-size: 13px;
  padding: 0 20px;
}
.topic-status:empty {
  display: none;
}
.topic-invite-result {
  background: var(--subtle);
  border-radius: 6px;
  padding: 12px;
  margin: 12px 0;
}
.topic-invite-result input {
  width: 100%;
  margin: 4px 0 10px;
}
.topic-dialog a,
.guest-entry a {
  color: var(--accent);
  font-size: 13px;
}
.topic-monitor-dialog {
  width: 760px;
}
.topic-monitor-dialog table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.topic-monitor-dialog td,
.topic-monitor-dialog th {
  padding: 8px 6px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  overflow-wrap: anywhere;
}
.topic-event {
  display: grid;
  grid-template-columns: 125px 1fr;
  gap: 2px 12px;
  font-size: 12px;
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
}
.topic-event > :last-child {
  grid-column: 2;
  color: var(--muted);
}
.guest-entry {
  width: 380px;
  max-width: calc(100vw - 40px);
  margin: 14vh auto;
  color: var(--text);
  font:
    14px/1.6 -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}
.guest-entry h1 {
  font-size: 26px;
  letter-spacing: -.5px;
}
.guest-entry .topic-status {
  padding: 0;
}
@media (max-width: 500px) {
  .topic-dialog header,
  .topic-dialog-body {
    padding-left: 14px;
    padding-right: 14px;
  }
  .topic-add-member {
    flex-wrap: wrap;
  }
  .topic-add-member > :first-child {
    flex-basis: 100%;
    width: 100%;
  }
  .topic-monitor-dialog table {
    table-layout: fixed;
  }
}
.topic-guest-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
}
.page-message.topic-empty {
  color: var(--muted);
  font-size: 16px;
}
.topic-controls {
  display: flex;
  gap: 4px;
  padding: 0 6px;
}
.topic-navigation .topic-selector {
  display: block;
  flex: 1;
  min-width: 0;
  border: 1px solid var(--line);
  padding: 6px 26px 6px 9px;
  position: relative;
  min-height: 34px;
  text-align: start;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: var(--surface);
}
.topic-selector::after {
  content: "\2304";
  position: absolute;
  inset-inline-end: 8px;
  color: var(--muted);
}
.topic-settings {
  flex: none;
  min-width: 32px;
}
.topic-directory {
  position: fixed;
  z-index: 55;
  margin: 0;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-sizing: border-box;
  color: var(--text);
  background: var(--surface);
  box-shadow: 0 8px 30px #0003;
}
.topic-directory[open] {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.topic-directory input {
  appearance: none;
  box-sizing: border-box;
  min-width: 0;
  min-height: 34px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  background: var(--subtle);
  color: inherit;
  border-radius: 4px;
  font: inherit;
}
.topic-results {
  list-style: none;
  margin: 0;
  padding: 2px;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
.topic-directory-row {
  display: flex;
  gap: 4px;
  align-items: stretch;
}
.topic-directory-row button {
  min-height: 34px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.topic-directory-row button:hover,
.topic-directory-name[aria-current] {
  background: var(--hover);
}
.topic-directory-name {
  text-align: start;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 4px 7px;
}
.topic-favorite {
  flex: none;
  min-width: 38px;
  font-size: 16px;
}
.topic-directory-row [aria-disabled=true] {
  cursor: default;
}
.topic-directory :focus-visible,
.topic-controls :focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}
.topic-directory-status {
  margin: 0;
  padding: 4px 6px;
  color: var(--muted);
}
.topic-directory-status:empty {
  display: none;
}
.topic-dialog textarea {
  box-sizing: border-box;
  width: 100%;
  resize: vertical;
  padding: 6px 8px;
  font: inherit;
  color: inherit;
  background: var(--subtle);
  border: 1px solid var(--line);
  border-radius: 5px;
}
.topic-field:has(input[type=checkbox]) {
  display: flex;
  align-items: start;
  flex-direction: row-reverse;
  justify-content: start;
}
.topic-member-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  justify-content: end;
}
@media (pointer: coarse) {
  .topic-controls button,
  .topic-directory input,
  .topic-directory-row button {
    min-height: 44px;
  }
  .topic-favorite {
    min-width: 44px;
  }
}
.topic-metadata > button[type=submit] {
  display: block;
  margin-inline-start: auto;
}
.page-access-policy {
  max-width: min(540px, calc(100vw - 32px));
}
.page-access-policy[open] {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}
.page-access-body .topic-add-member:empty {
  display: none;
}
.page-access-body {
  overflow: auto;
  min-height: 0;
}
.page-access-inherit {
  display: flex;
  gap: 8px;
  align-items: center;
}
.page-access-inherit + .topic-muted {
  display: block;
}
.page-access-body > .principal-picker {
  margin-block-start: 8px;
}
.page-access-rows,
.page-access-choices {
  margin: 0 0 8px;
  padding: 0 4px;
  list-style: none;
  overflow: auto;
}
.page-access-rows {
  max-height: min(320px, 39dvh);
}
.page-access-choices {
  max-height: min(150px, 23dvh);
}
@media (pointer: coarse) {
  .page-access-policy :is(button, select, input[type=search]),
  .page-access-inherit {
    min-height: 44px;
  }
}

/* src/client/style.css */
:root {
  color-scheme: light;
  color: var(--text);
  background: var(--surface);
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    system-ui,
    sans-serif;
  font-size: 16px;
  --accent: #245d4d;
  --on-accent: #fff;
  --muted: #686861;
  --sidebar: #f7f7f5;
  --line: #e9e9e5;
  --hover: #ededeb;
  --text: #292925;
  --surface: #fff;
  --subtle: #f7f6f3;
  --danger: #8f3b2e;
  --active-surface: #e7eee9;
  --active-text: #204f42;
  --control-line: #c8ccc8;
  --strong-line: #838780;
  --focus-width: 2px;
  --surface-edge-inset: 16px;
  --block-selection: #e4edfa;
  --link-selection: #c8ddfa;
  --peer-selection: #e3e1fa;
  --find-highlight: #ffecae;
  --find-current: #ffd57b;
}
:root[data-theme=dark] {
  color-scheme: dark;
  --text: #ededeb;
  --surface: #1e1f1d;
  --sidebar: #252623;
  --subtle: #282a27;
  --hover: #343632;
  --line: #444742;
  --control-line: #626660;
  --strong-line: #a0a59d;
  --muted: #b2b7ad;
  --accent: #87cdb6;
  --on-accent: #172823;
  --danger: #f3a495;
  --active-surface: #344941;
  --active-text: #bce8d9;
  --block-selection: #32465c;
  --link-selection: #294665;
  --peer-selection: #43365e;
  --find-highlight: #635127;
  --find-current: #79551f;
}
@media (prefers-color-scheme: dark) {
  :root[data-theme=system] {
    color-scheme: dark;
    --text: #ededeb;
    --surface: #1e1f1d;
    --sidebar: #252623;
    --subtle: #282a27;
    --hover: #343632;
    --line: #444742;
    --control-line: #626660;
    --strong-line: #a0a59d;
    --muted: #b2b7ad;
    --accent: #87cdb6;
    --on-accent: #172823;
    --danger: #f3a495;
    --active-surface: #344941;
    --active-text: #bce8d9;
    --block-selection: #32465c;
    --link-selection: #294665;
    --peer-selection: #43365e;
    --find-highlight: #635127;
    --find-current: #79551f;
  }
}
:root[data-contrast=high] {
  --muted: var(--text);
  --line: var(--strong-line);
  --control-line: var(--strong-line);
  --focus-width: 3px;
}
@media (prefers-contrast: more) {
  :root[data-contrast=system] {
    --muted: var(--text);
    --line: var(--strong-line);
    --control-line: var(--strong-line);
    --focus-width: 3px;
  }
}
*,
*::before,
*::after {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input {
  font: inherit;
  color: inherit;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  cursor: pointer;
}
:focus-visible {
  outline: var(--focus-width) solid var(--accent);
  outline-offset: 2px;
}
[hidden] {
  display: none !important;
}
svg {
  width: 18px;
  height: 18px;
  flex: none;
}
.shell {
  display: flex;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}
.sidebar {
  display: none;
  flex: 0 0 var(--visible-sidebar-width, 270px);
  min-width: 0;
  background: var(--sidebar);
  border-right: 1px solid var(--line);
  overflow: auto;
}
.shell.sidebar-visible {
  --visible-sidebar-width: clamp(200px, var(--chosen-sidebar-width, 270px), min(600px, calc(100vw - 320px)));
}
.shell.sidebar-drawer {
  --visible-sidebar-width: min(86vw, var(--chosen-sidebar-width, 282px));
}
.sidebar-resize {
  display: none;
  position: fixed;
  z-index: 5;
  top: 0;
  bottom: 0;
  left: var(--visible-sidebar-width);
  width: 8px;
  transform: translateX(-50%);
  cursor: col-resize;
  touch-action: none;
  user-select: none;
}
.sidebar-visible > .sidebar-resize {
  display: block;
}
.sidebar-resize::after {
  content: "";
  position: absolute;
  inset: 0 3px;
}
.sidebar-resize:is(:hover, :focus-visible, :active)::after {
  background: var(--accent);
}
.sidebar-visible .sidebar {
  display: flex;
  flex-direction: column;
}
.personal-workspace-menu {
  margin: auto 8px 8px;
}
.personal-workspace-menu summary {
  cursor: pointer;
  padding: 7px 9px;
  font-size: 14px;
  border-radius: 5px;
}
.personal-workspace-menu summary:hover {
  background: var(--hover);
}
.personal-settings-trigger {
  display: block;
  width: 100%;
  margin: 3px 0 0;
  padding: 7px 9px;
  text-align: start;
  font-size: 14px;
  border: 0;
  border-radius: 5px;
  background: transparent;
}
.personal-settings-trigger:hover {
  background: var(--hover);
}
.personal-settings {
  position: fixed;
  inset: 0;
  width: min(90vw, 1188px);
  height: min(86vh, 666px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
  color: var(--text);
  overflow: hidden;
}
.personal-settings[open] {
  display: grid;
  grid-template-columns: min(27%, 216px) minmax(0, 1fr);
}
.personal-settings::backdrop {
  background: #0009;
}
.personal-settings-menu {
  padding: 8px;
  background: var(--sidebar);
  border-inline-end: 1px solid var(--line);
  overflow: auto;
}
.personal-settings-search {
  width: 100%;
  min-height: 28px;
  border: 1px solid var(--control-line);
  border-radius: 6px;
  background: var(--subtle);
  padding: 4px 8px;
  font-size: 14px;
}
.personal-settings-tabs {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 28px;
}
.personal-settings-tabs button {
  padding: 6px 8px;
  min-height: 27px;
  text-align: start;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  overflow-wrap: anywhere;
}
.personal-settings-tabs button:is(:hover, [aria-selected=true]) {
  background: var(--hover);
  color: var(--text);
}
.personal-settings-body {
  padding: 30px clamp(20px, 9vw, 126px);
  overflow: auto;
}
.personal-settings-title {
  margin: 0 25px 6px 0;
  font-size: 24px;
  line-height: 1.2;
}
.personal-settings-panel h3 {
  margin: 8px 0 23px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}
.personal-settings-group {
  margin-bottom: 30px;
}
.personal-settings-group h4 {
  margin: 0 0 5px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
  font-size: 15px;
}
.personal-settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 60px;
  padding: 9px 0;
}
.personal-settings-row span {
  display: grid;
  gap: 4px;
}
.personal-settings-row strong {
  font-size: 14px;
  font-weight: 550;
}
.personal-settings-row small {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}
.personal-settings-row select {
  font: inherit;
  font-size: 13px;
  color: inherit;
  padding: 4px;
  max-width: 100%;
}
.personal-settings-switch {
  width: 28px;
  height: 17px;
  appearance: none;
  flex: none;
  margin: 0;
  border-radius: 20px;
  background: var(--control-line);
  border: 1px solid var(--control-line);
  cursor: pointer;
}
.personal-settings-switch::before {
  content: "";
  display: block;
  width: 11px;
  height: 11px;
  margin: 2px;
  background: var(--surface);
  border-radius: 50%;
}
.personal-settings-switch:checked {
  background: var(--accent);
}
.personal-settings-switch:checked::before {
  margin-inline-start: 13px;
}
.personal-settings-switch:disabled {
  opacity: .55;
  cursor: default;
}
.personal-settings-close {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 20px;
}
.personal-settings-status,
.personal-settings-empty {
  color: var(--muted);
  font-size: 13px;
}
.workspace-admin-panel {
  min-width: 0;
}
.admin-controls,
.admin-policy {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 8px;
  margin: 0 0 12px;
}
.admin-policy {
  justify-content: space-between;
  padding: 8px 0 16px;
  border-bottom: 1px solid var(--line);
}
.admin-policy .admin-field {
  align-items: center;
  grid-template-columns: minmax(0, 1fr) auto;
}
.admin-field {
  display: grid;
  gap: 5px;
  min-width: 0;
  font-size: 13px;
  color: var(--muted);
}
.admin-field[hidden] {
  display: none;
}
.integration-form {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 10px;
  margin-block: 12px;
}
.integration-form .admin-field {
  flex: 1 1 130px;
}
.integration-credentials {
  display: grid;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.integration-credential {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.integration-credential > div {
  display: grid;
  gap: 3px;
  min-width: 0;
  overflow-wrap: anywhere;
}
.integration-credential small {
  color: var(--muted);
}
.admin-field :is(input:not([type=checkbox]), select) {
  width: 100%;
  min-width: 0;
  max-width: 210px;
  padding: 5px 7px;
  border: 1px solid var(--control-line);
  border-radius: 5px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
}
.admin-policy input[type=number] {
  width: 78px;
}
.admin-controls button[aria-pressed=true] {
  background: var(--hover);
  color: var(--text);
}
.admin-table-scroll {
  overflow: auto;
  margin-block: 8px;
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.admin-table :is(th, td) {
  min-width: 76px;
  padding: 9px 8px;
  border-bottom: 1px solid var(--line);
  text-align: start;
}
.admin-table th {
  color: var(--muted);
  font-weight: 550;
}
.admin-status {
  color: var(--muted);
  font-size: 13px;
}
.admin-status:empty {
  display: none;
}
.document-import {
  max-width: 720px;
}
.document-import h3 {
  margin: 16px 0;
  font-size: 15px;
}
.document-import-target {
  display: grid;
  gap: 5px;
  max-width: 360px;
  font-size: 14px;
}
.document-import-target select {
  width: 100%;
  min-height: 32px;
  padding: 4px 6px;
  color: inherit;
  font: inherit;
  background: var(--surface);
  border: 1px solid var(--control-line);
  border-radius: 6px;
}
.document-import-drop {
  display: grid;
  place-content: center;
  min-height: 175px;
  margin-block: 16px 12px;
  padding: 15px;
  text-align: center;
  border: 1px dashed var(--control-line);
  border-radius: 9px;
  background: var(--subtle);
}
.document-import-drop label {
  display: grid;
  gap: 10px;
  justify-items: center;
  font-size: 14px;
}
.document-import-drop input {
  width: 100%;
  max-width: 265px;
  color: inherit;
  font: inherit;
}
.document-import-filename {
  margin: 6px 0 0;
  font-size: 13px;
  overflow-wrap: anywhere;
}
.document-import-filename:empty {
  display: none;
}
.document-import-formats,
.document-import-actions {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-block: 10px;
  font-size: 13px;
}
.document-import-formats span {
  border: 1px solid var(--line);
  padding: 5px 9px;
  border-radius: 5px;
}
.document-import-report {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  font-size: 14px;
  overflow-wrap: anywhere;
}
.document-import-report p,
.document-import-report ul {
  margin: 6px 0 0;
}
.document-import-status {
  font-size: 13px;
  color: var(--muted);
}
.document-import-mapping {
  margin-top: 16px;
}
.document-import-mapping .document-import-target {
  margin-bottom: 8px;
}
.document-import-mapping p {
  font-size: 13px;
}
.document-import-mapping .document-import-report button {
  margin: 6px 6px 0 0;
}
dialog.document-export-dialog {
  width: min(320px, calc(100% - 28px));
  max-height: calc(100dvh - 24px);
  overflow: auto;
  border-radius: 12px;
  padding: 24px;
}
.document-export-dialog h2 {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.document-export-form {
  display: flex;
  flex-direction: column;
  min-height: 190px;
}
.document-export-form label {
  display: grid;
  align-items: center;
  grid-template-columns: 1fr minmax(0, 1.5fr);
  min-height: 28px;
  gap: 6px;
  font-size: 14px;
  color: var(--muted);
}
.document-export-form label:has(input[type=checkbox]) {
  grid-template-columns: 1fr auto;
}
.document-export-form select {
  width: 100%;
  min-height: 26px;
  border: 0;
  border-radius: 6px;
  background: var(--surface);
  color: inherit;
  font: inherit;
}
.document-export-form select {
  color: var(--text);
  text-align: right;
  text-align-last: right;
}
.document-export-form select:focus {
  position: relative;
  z-index: 1;
  outline: var(--focus-width) solid var(--accent);
  outline-offset: 2px;
}
.document-export-form input[role=switch] {
  appearance: none;
  justify-self: end;
  width: 30px;
  height: 18px;
  margin: 0;
  padding: 2px;
  border: 0;
  border-radius: 10px;
  background: var(--control-line);
}
.document-export-form input[role=switch]::before {
  content: "";
  display: block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--surface);
}
.document-export-form input[role=switch]:checked {
  background: var(--accent);
}
.document-export-form input[role=switch]:checked::before {
  transform: translateX(12px);
}
.document-export-form input[role=switch]:disabled {
  opacity: .5;
}
@media (forced-colors: active) {
  .document-export-form input[role=switch] {
    border: 1px solid ButtonText;
    padding: 1px;
  }
  .document-export-form input[role=switch]::before {
    background: ButtonText;
  }
  .document-export-form input[role=switch]:checked {
    background: Highlight;
  }
  .document-export-form input[role=switch]:checked::before {
    background: HighlightText;
  }
}
.document-export-actions .session-button {
  min-height: 28px;
  font-size: 14px;
}
.document-export-status {
  font-size: 13px;
  color: var(--muted);
  margin: 8px 0 0;
}
.document-export-status:empty {
  display: none;
}
.document-export-actions {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
  margin-top: auto;
  padding-top: 16px;
}
.document-export-actions .session-button {
  border-color: transparent;
  padding: 4px 7px;
}
.session-button.document-export-confirm {
  background: var(--accent);
  color: var(--on-accent);
  border-color: var(--accent);
}
.document-export-dialog::backdrop {
  background: #0009;
}
.document-export-trigger {
  flex: none;
}
@media (max-width: 480px) {
  .document-export-trigger {
    max-width: 86px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}
.inbox-badge {
  margin-inline-start: 5px;
  padding: 1px 4px;
  border-radius: 8px;
  background: var(--active-surface);
  color: var(--active-text);
}
@media (max-width: 600px) {
  .personal-settings {
    width: calc(100% - 20px);
    height: min(92dvh, 666px);
  }
  .personal-settings[open] {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
  }
  .personal-settings-menu {
    border-inline-end: 0;
    border-bottom: 1px solid var(--line);
    padding-inline-end: 44px;
  }
  .personal-settings-tabs {
    margin-top: 7px;
    flex-direction: row;
    flex-wrap: wrap;
  }
  .personal-settings-body {
    padding: 17px;
  }
  .personal-settings-row {
    align-items: flex-start;
    flex-wrap: wrap;
  }
}
.sidebar-top {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  min-height: 54px;
}
.brand {
  display: grid;
  place-items: center;
  flex: 0 0 26px;
  height: 26px;
  border-radius: 7px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 16px;
  font-weight: 750;
}
.workspace {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  line-height: 1.24;
  font-size: 14px;
}
.workspace small {
  color: var(--muted);
  font-size: 11px;
}
.icon-button {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  flex: none;
  border: 0;
  border-radius: 5px;
  color: var(--muted);
  background: transparent;
}
.icon-button:hover {
  background: var(--hover);
  color: var(--text);
}
.sidebar .navigation {
  padding: 4px 8px 12px;
  font-size: 14px;
  line-height: 1.4;
}
.navigation .topic-navigation {
  margin: 0 0 10px;
  font: inherit;
}
.navigation .topic-controls {
  padding: 0;
}
.navigation .topic-nav-header,
.navigation-objects h2 {
  padding: 4px 8px;
  margin: 0;
  color: var(--muted);
  font: inherit;
  font-weight: 600;
}
.navigation-create {
  display: grid;
}
.navigation-create .session-button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 32px;
  margin: 0;
  padding: 4px 8px;
  border: 0;
  border-radius: 5px;
  color: inherit;
  background: transparent;
  font: inherit;
  text-align: start;
  cursor: pointer;
}
.navigation-create svg {
  flex: none;
  width: 16px;
  height: 16px;
  color: var(--muted);
}
.navigation-create button:hover {
  background: var(--hover);
}
.navigation .topic-selector {
  position: relative;
  display: block;
  flex: 1;
  min-width: 0;
  min-height: 34px;
  width: 100%;
  padding: 5px 28px 5px 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: inherit;
  background: var(--surface);
  font: inherit;
  text-align: start;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.navigation .topic-selector:hover,
.navigation .topic-selector[aria-expanded=true] {
  background: var(--hover);
}
.navigation .topic-selector::after {
  content: "";
  position: absolute;
  inset-inline-end: 11px;
  top: 50%;
  width: 6px;
  height: 6px;
  border: solid var(--muted);
  border-width: 0 1.5px 1.5px 0;
  transform: translateY(-70%) rotate(45deg);
}
.topic-directory {
  font:
    14px/1.4 -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    system-ui,
    sans-serif;
}
.navigation-objects {
  margin-block-start: 12px;
}
.navigation .page-tree {
  padding-block-end: 8px;
  margin-block-end: 6px;
  border-bottom: 1px solid var(--line);
}
@media (pointer: coarse) {
  .navigation-create .session-button,
  .navigation .topic-selector {
    min-height: 44px;
  }
}
.nav-error,
.page-message {
  color: var(--danger);
}
.nav-error {
  padding: 0 8px;
  font-size: 13px;
}
.page-tree ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.page-tree .page-children {
  padding-left: 15px;
}
.navigation-settings {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin: 0 0 4px;
}
.navigation-settings .navigation-status:not(:empty) {
  flex-basis: 100%;
}
.navigation-status:empty {
  display: none;
}
.navigation-status,
.navigation-empty {
  margin: 4px 6px;
  color: var(--muted);
  font-size: 13px;
}
.navigation-pages a {
  padding-inline: 8px;
}
.navigation-pages a:hover,
.navigation-pages [aria-current=page] {
  background: var(--hover);
}
.navigation-star {
  flex: none;
  font-size: 20px;
}
.navigation-star[aria-pressed=true] {
  color: #87580d;
}
.navigation-star[aria-disabled=true] {
  opacity: .65;
}
.wiki-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-block: 0 12px;
  font-size: 13px;
}
.wiki-viewbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  width: 100%;
}
.wiki-viewbar select {
  min-height: 29px;
  max-width: 100%;
  padding: 4px 9px;
  background: var(--hover);
  border: 0;
  border-radius: 16px;
  color: inherit;
  font: inherit;
}
.wiki-viewbar button {
  min-height: 28px;
  margin-inline-start: auto;
  padding: 4px 9px;
  color: var(--on-accent);
  background: var(--accent);
  border-color: transparent;
  white-space: nowrap;
}
.wiki-viewbar button:hover {
  filter: brightness(.95);
}
.wiki-actions:not([hidden]) {
  display: grid;
  gap: 1px;
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px solid var(--line);
}
.wiki-controls .wiki-status:empty {
  display: none;
}
.wiki-viewbar input,
.wiki-dialog :is(select, input[type=datetime-local]) {
  max-width: 100%;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
  font: inherit;
}
.wiki-verification {
  color: var(--muted);
}
.wiki-verification[data-verification=verified] {
  color: #255993;
}
.wiki-verification[data-verification=expired],
.wiki-status {
  color: var(--danger);
}
.wiki-overview {
  overflow: auto;
  font-size: 14px;
}
.wiki-overview table {
  border-collapse: collapse;
  min-width: 510px;
  width: 100%;
}
.wiki-overview :is(th, td) {
  padding: 8px;
  text-align: start;
  border-block-end: 1px solid var(--line);
  overflow-wrap: anywhere;
}
.wiki-overview th {
  font-weight: 550;
  color: var(--muted);
}
.wiki-overview td + td {
  border-inline-start: 1px solid var(--line);
}
.wiki-page-link {
  font-weight: 620;
}
.wiki-page-link:hover {
  text-decoration: underline;
}
.wiki-view-hidden {
  display: none !important;
}
.wiki-form-fields {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
}
.wiki-form-fields label {
  display: grid;
  gap: 4px;
}
.wiki-form-fields .wiki-owner-option {
  display: flex;
  gap: 6px;
}
.wiki-dialog button + button {
  margin-inline-start: 5px;
}
.page-row {
  display: flex;
  align-items: center;
  position: relative;
  gap: 1px;
  min-width: 0;
  height: 30px;
  border-radius: 5px;
}
.page-row:hover,
.page-row:focus-within {
  background: var(--hover);
}
.page-row:has([aria-current=page]) {
  background: var(--active-surface);
  color: var(--active-text);
}
.page-link {
  flex: 1;
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  line-height: 27px;
  border-radius: 4px;
}
.page-link svg {
  width: 15px;
  height: 15px;
  margin-right: 5px;
  vertical-align: -3px;
}
.expand,
.expand-space {
  flex: 0 0 20px;
  width: 20px;
  height: 24px;
}
.expand svg {
  width: 13px;
  height: 13px;
}
.add-child {
  width: 25px;
  height: 25px;
  margin-right: 3px;
  opacity: 0;
}
.page-row:hover .add-child,
.page-row:focus-within .add-child {
  opacity: 1;
}
.add-child svg {
  width: 15px;
  height: 15px;
}
.page-order-handle {
  width: 24px;
  height: 25px;
  font-size: 17px;
  opacity: 0;
}
.page-order-handle svg {
  width: 16px;
  height: 16px;
}
.page-order-handle[aria-expanded=true],
.page-row:hover .page-order-handle,
.page-row:focus-within .page-order-handle {
  opacity: 1;
}
.page-row[data-drag-source] {
  opacity: 0.6;
}
.page-row[data-drop-side=before] {
  box-shadow: inset 0 2px var(--accent);
}
.page-row[data-drop-side=after] {
  box-shadow: inset 0 -2px var(--accent);
}
.page-row[data-drop-side=end] {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}
.page-order-dialog label {
  display: grid;
  gap: 4px;
  margin-block: 8px;
}
.page-order-dialog select {
  width: 100%;
  font: inherit;
}
.page-order-dialog button + button {
  margin-inline-start: 6px;
}
.trash-list {
  padding: 0;
  list-style: none;
}
.trash-list li {
  padding-block: 8px;
  border-bottom: 1px solid var(--line);
}
.trash-list :is(select, button) {
  margin: 5px 4px 0 0;
  max-width: 100%;
  font: inherit;
  font-size: 13px;
}
.navigation > .session-button {
  display: block;
  width: 100%;
  min-height: 32px;
  font: inherit;
  margin: 2px 0 0;
  padding: 4px 8px;
  border: 0;
  color: var(--muted);
  background: transparent;
  text-align: start;
}
.navigation > .session-button:hover {
  background: var(--hover);
  color: var(--text);
}
.page-tree + .nav-error + .session-button {
  margin-top: 8px;
}
.surface {
  position: relative;
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.maintenance-notice {
  display: none;
  flex: none;
  margin: 0;
  border-block: 1px solid var(--line);
  padding: 8px 16px;
  font-size: 13px;
}
[data-maintenance] .maintenance-notice {
  display: block;
}
.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  flex: none;
  padding: 6px var(--surface-edge-inset);
}
.toolbar:has(.page-locked:not([hidden]), .locked-draft:not([hidden]), .toolbar-critical:not([hidden])) {
  flex-wrap: wrap;
}
.sidebar-visible:not(.sidebar-drawer) .toolbar > [aria-controls=sidebar] {
  display: none;
}
.crumbs {
  min-width: 0;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
}
.crumb {
  display: block;
  min-width: 0;
  max-width: 240px;
  padding: 4px 3px;
  border-radius: 4px;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
  font-size: 14px;
}
a.crumb:hover {
  background: var(--hover);
}
.crumbs svg {
  width: 12px;
  color: var(--muted);
}
.save-status {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
}
.save-status svg {
  width: 15px;
  height: 15px;
}
.save-status[data-state=saveError],
.save-status[data-state=conflict],
.save-status[data-state=draftError] {
  color: var(--danger);
}
.save-status:empty,
.save-status[data-state=""] {
  display: none;
}
.page-actions {
  position: relative;
  flex: none;
}
.page-actions > summary {
  list-style: none;
  cursor: pointer;
}
.page-actions > summary::-webkit-details-marker {
  display: none;
}
.page-actions[open] > summary {
  background: var(--hover);
}
.page-actions-panel {
  position: absolute;
  inset-block-start: calc(100% + 5px);
  inset-inline-end: 0;
  z-index: 5;
  width: min(244px, calc(100vw - 24px));
  max-height: calc(100dvh - 60px);
  overflow: auto;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 5px 22px #2428262b;
}
.page-actions-panel .discovery-row {
  display: grid;
  gap: 1px;
  margin: 0;
}
.page-actions-panel .page-discovery-tools {
  padding-bottom: 4px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--line);
}
.page-actions-panel .session-button {
  width: 100%;
  padding: 6px 7px;
  background: transparent;
  border: 0;
  text-align: start;
}
.page-actions-panel .session-button:hover {
  background: var(--hover);
}
.toolbar-search {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 5px;
}
.toolbar-search svg {
  width: 16px;
  height: 16px;
  color: var(--muted);
}
.toolbar > .session-button:not(.toolbar-critical, .locked-draft) {
  border-color: transparent;
  background: transparent;
}
.toolbar > .session-button:not(.toolbar-critical, .locked-draft):hover {
  background: var(--hover);
}
.document-surface {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.document-scroll {
  flex: 1;
  overflow: auto;
}
.document-surface:has(.page-find:not([hidden])) .document-scroll {
  scroll-padding-top: 55px;
}
.document-surface:has(.page-find:not([hidden]) .page-replace:not([hidden])) .document-scroll {
  scroll-padding-top: 118px;
}
.document-scroll:focus-visible {
  outline-offset: -2px;
}
.page-outline {
  position: absolute;
  z-index: 2;
  top: min(184px, 25%);
  right: 12px;
}
.page-outline-trigger {
  display: flex;
  justify-content: flex-end;
  align-items: start;
  border: 0;
  background: transparent;
  color: inherit;
  width: 32px;
  min-height: 30px;
  padding: 0 7px 3px 5px;
  border-radius: 5px;
}
.page-outline-marks {
  position: relative;
  display: grid;
  justify-items: end;
  max-height: min(45vh, 340px);
  overflow: hidden;
}
.page-outline-marks span {
  display: grid;
  place-items: center end;
  width: 16px;
  height: 13px;
}
.page-outline-marks span::after {
  content: "";
  width: max(6px, calc(15px - 4px * var(--outline-depth)));
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  opacity: .14;
}
.page-outline-marks span.is-current::after {
  opacity: 1;
}
.page-outline > .editor-contents {
  position: absolute;
  top: -4px;
  right: 0;
  box-sizing: border-box;
  margin: 0;
  width: min(212px, calc(100vw - 24px));
  max-height: 65vh;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 14px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 6px 20px #28282415;
  font-size: 12px;
}
.page-outline ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.page-outline li {
  padding-inline-start: min(48px, calc(12px * var(--contents-depth, 0)));
}
.page-outline .editor-contents a {
  display: block;
  min-height: 22px;
  line-height: 22px;
  padding: 0 6px;
  border-radius: 4px;
  text-decoration: none;
}
.page-outline a[aria-current] {
  color: var(--accent);
  font-weight: 550;
}
.page-outline a:hover {
  background: var(--hover);
}
.ProseMirror :is(h1, h2, h3, h4) {
  scroll-margin-top: 48px;
}
.page-decoration {
  position: relative;
}
.page-decoration-actions {
  position: absolute;
  inset-inline-start: 0;
  bottom: calc(100% + 5px);
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.page-decoration-actions button {
  border-color: transparent;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
}
.page-decoration-actions button:hover,
.page-decoration-actions button:focus-visible {
  background: var(--hover);
}
.page-symbol {
  display: block;
  padding-bottom: 7px;
  font-size: 56px;
  line-height: 1.2;
}
.page-link-symbol {
  display: inline-block;
  width: 1.15em;
  margin-inline-end: 5px;
}
.page-cover {
  position: relative;
  height: clamp(120px, 29vh, 290px);
  background: var(--hover);
}
.page-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.page-cover-actions,
.page-cover-position-actions {
  display: flex;
  align-items: center;
  gap: 1px;
}
.page-cover-actions {
  position: absolute;
  inset: 10px 12px auto auto;
  padding: 2px;
  border-radius: 6px;
  background: var(--surface);
  box-shadow: 0 1px 5px #241e1924;
}
.page-cover-actions :is(button, a) {
  color: var(--muted);
  min-height: 22px;
  padding: 2px 8px;
  border: 0;
  background: transparent;
  font-size: 12px;
  text-decoration: none;
}
.page-cover-actions > :not(:first-child) {
  border-inline-start: 1px solid var(--line);
}
@media (hover: hover) {
  .page-cover:not(:hover, :focus-within) .page-cover-actions {
    opacity: 0;
  }
}
.page-cover-credit {
  position: absolute;
  inset: auto 12px 9px auto;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--surface);
  color: var(--muted);
  font-size: 11px;
}
.page-decoration-dialog {
  max-height: calc(100dvh - 32px);
}
.page-decoration-dialog input,
.page-decoration-dialog select {
  max-width: 100%;
  font: inherit;
}
.page-decoration-dialog input[type=search] {
  width: 100%;
  padding: 6px 8px;
}
.page-symbol-options {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;
  margin-block: 9px;
}
.page-symbol-options button {
  min-width: 0;
  padding-inline: 0;
  border-color: transparent;
  font-size: 22px;
}
.page-symbol-options button:is(:hover, [aria-pressed=true]) {
  background: var(--hover);
}
dialog.page-cover-dialog {
  position: fixed;
  inset: var(--cover-menu-top, 8px) auto auto var(--cover-menu-left, 8px);
  width: min(540px, var(--editor-visible-width, calc(100vw - 16px)));
  max-height: var(--editor-visible-height, calc(100dvh - 16px));
  margin: 0;
  padding: 0;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.4;
  box-shadow: 0 10px 30px #24282624;
}
dialog.page-cover-dialog[open] {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
dialog.page-cover-dialog > :not(.page-cover-options) {
  flex: none;
}
dialog.page-cover-dialog::backdrop {
  background: transparent;
}
dialog.page-cover-dialog h2 {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  overflow: hidden;
  clip-path: inset(50%);
}
.page-cover-options {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.page-cover-options > [role=tabpanel] {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
}
.page-cover-options label {
  display: grid;
  gap: 5px;
}
.page-cover-menu-header {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  flex: none;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.page-cover-tabs {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  column-gap: 12px;
  min-width: 0;
}
.page-cover-tabs button {
  min-height: 39px;
  padding: 4px 1px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
}
.page-cover-tabs button[aria-selected=true] {
  color: var(--text);
  box-shadow: inset 0 -2px var(--text);
}
.page-cover-menu-header > button {
  flex: none;
  border: 0;
  background: transparent;
  color: var(--muted);
}
.page-cover-close:not(:focus-visible) {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.page-cover-source {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 16px;
}
.page-cover-source:has(> .page-cover-upload) {
  gap: 12px;
}
.page-cover-source:has(> .page-cover-link-form) {
  padding: 12px 9px 6px;
}
.page-cover-source select {
  width: 100%;
  height: 32px;
  border: 1px solid var(--control-line);
  border-radius: 5px;
  background: var(--surface);
  color: inherit;
}
.page-cover-source .page-cover-upload {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 32px;
  color: var(--text);
  cursor: pointer;
}
.page-cover-upload:disabled {
  opacity: .55;
  cursor: default;
}
.page-cover-paste-hint {
  margin: 0;
  color: var(--muted);
  text-align: center;
  font-size: 12px;
}
.page-cover-link-form {
  display: grid;
  gap: 14px;
}
.page-cover-link-form input,
.page-cover-photos > input[type=search] {
  min-width: 0;
  width: 100%;
  height: 28px;
  padding: 4px 7px;
  border: 1px solid var(--control-line);
  border-radius: 6px;
  background: var(--subtle);
  color: var(--text);
}
.page-cover-link-form input {
  height: 26px;
}
.page-cover-link-form button {
  width: min(100%, 300px);
  min-height: 28px;
  padding-block: 3px;
  justify-self: center;
  color: var(--surface);
  background: var(--accent);
  border-color: transparent;
}
.page-cover-gallery,
.page-cover-photos {
  max-height: 444px;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 12px 16px 12px;
}
.page-cover-photos {
  padding: 18px 12px 12px;
}
.page-cover-gallery section + section {
  margin-top: 20px;
}
.page-cover-gallery h3 {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}
.page-cover-grid,
.page-cover-photo-results {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}
.page-cover-grid button,
.page-cover-photo button {
  display: block;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 1.92;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: var(--hover);
}
.page-cover-grid img,
.page-cover-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.page-cover-grid button:hover,
.page-cover-photo button:hover {
  filter: brightness(.9);
}
.page-cover-photos > input[type=search] {
  height: 26px;
  margin-bottom: 16px;
}
.page-cover-photo-results {
  row-gap: 10px;
}
.page-cover-photo a {
  display: block;
  overflow: hidden;
  margin-top: 1px;
  font-size: 12px;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.page-cover-position {
  position: absolute;
  inset: 0;
  font-size: 12px;
  pointer-events: none;
}
.page-cover-position-hint {
  position: absolute;
  top: 50%;
  left: 50%;
  width: max-content;
  max-width: calc(100% - 24px);
  transform: translate(-50%, -50%);
  padding: 4px 8px;
  border-radius: 5px;
  background: #242826b8;
  color: white;
  text-align: center;
}
.page-cover-position-actions,
.page-cover-position label,
.page-cover-position-status {
  position: absolute;
  inset-inline-end: 12px;
  padding: 2px;
  border-radius: 6px;
  background: var(--surface);
  box-shadow: 0 1px 5px #241e1924;
  pointer-events: auto;
}
.page-cover-position-actions {
  top: 10px;
}
.page-cover-position label {
  top: 44px;
  max-width: calc(100% - 24px);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
}
.page-cover-position label:not(:focus-within) {
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.page-cover-position input {
  width: min(44%, 160px);
}
.page-cover-position button {
  min-height: 22px;
  padding: 2px 6px;
  font-size: inherit;
  border: 0;
}
.page-cover-position-status {
  bottom: 10px;
  padding: 5px 8px;
  color: var(--danger);
  margin: 0;
}
.page-cover-position-status:empty {
  display: none;
}
.page-cover.is-repositioning img {
  cursor: ns-resize;
  touch-action: none;
}
.page-cover-dialog > .page-cover-retry {
  margin: 0 14px 10px;
}
.page-cover-file-status,
.page-cover-dialog .page-decoration-status {
  margin: 0;
  font-size: 13px;
}
.page-cover-dialog .page-decoration-status:not(:empty) {
  padding: 0 14px 10px;
}
.page-cover-file-status:empty,
.page-cover-dialog .page-decoration-status:empty {
  display: none;
}
.page-decoration-footer {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 8px;
}
.page-cover-dialog .session-button {
  font-size: inherit;
}
.page-decoration-status {
  font-size: 13px;
  color: var(--danger);
}
.page-decoration-dialog > button + button {
  margin-inline-start: 6px;
}
.paper {
  max-width: 804px;
  margin: 0 auto;
  padding: 74px 48px 120px;
  min-height: 100%;
}
.paper.page-full-width {
  max-width: none;
}
@media (min-width: 801px) {
  .document-scroll:has(> .page-cover[hidden]) > .paper:not(.database-source-page, .page-full-width):not(:has(> .database-page:not([hidden]))):has(> .title-group:not([hidden])):has(.page-symbol[hidden]):not(:has(.wiki-overview:not([hidden]), .wiki-controls:not([hidden]))) {
    padding-top: 110px;
  }
}
.page-font-option[data-font-style=serif] .page-font-example,
:is(.paper, .database-peek-content)[data-font-style=serif] :is(.page-title, .ProseMirror) {
  font-family:
    Georgia,
    "Times New Roman",
    serif;
}
.page-font-option[data-font-style=mono] .page-font-example,
:is(.paper, .database-peek-content)[data-font-style=mono] :is(.page-title, .ProseMirror) {
  font-family:
    ui-monospace,
    Menlo,
    monospace;
}
.page-appearance {
  position: fixed;
  z-index: 6;
  width: min(300px, var(--editor-visible-width, calc(100vw - 16px)));
  max-height: var(--editor-visible-height, calc(100dvh - 16px));
  overflow: auto;
  padding: 11px 11px 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 5px 22px #2428262b;
}
.page-font-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border: 0;
  padding: 0;
  margin: 0 0 10px;
}
.page-font-options legend {
  color: var(--muted);
  margin-bottom: 7px;
  font-size: 12px;
}
.page-font-option {
  display: grid;
  justify-items: center;
  align-content: center;
  min-height: 61px;
  padding: 4px 2px;
  border: 0;
  border-radius: 5px;
  cursor: pointer;
  font-size: 14px;
  line-height: 20px;
}
.page-font-option:has(input:checked) {
  background: var(--hover);
}
.page-font-option:has(input:checked) .page-font-example {
  color: var(--accent);
}
.page-font-option:has(input:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.page-font-option input {
  position: absolute;
  opacity: 0;
}
.page-font-example {
  font-size: 24px;
}
.page-appearance-heading {
  margin: 0 0 8px;
  padding: 12px 0 0;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}
.page-appearance-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 29px;
  font-size: 14px;
}
.page-appearance-option > svg {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.page-appearance-option > span {
  flex: 1;
}
.page-appearance-option input {
  appearance: none;
  flex: none;
  width: 30px;
  height: 18px;
  margin: 0;
  padding: 2px;
  border: 0;
  border-radius: 10px;
  background: var(--control-line);
  cursor: pointer;
}
.page-appearance-option input::before {
  content: "";
  display: block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--surface);
}
.page-appearance-option input:checked {
  background: var(--accent);
}
.page-appearance-option input:checked::before {
  transform: translateX(12px);
}
.page-appearance-option input:disabled {
  opacity: .5;
  cursor: default;
}
.page-presentation-trigger::after {
  content: "\2039";
  float: right;
  font-size: 16px;
}
.page-lock-trigger[aria-checked=true]::after {
  content: "\2713";
  float: right;
}
.page-appearance-status {
  margin: 6px 0;
  color: var(--danger);
  font-size: 13px;
}
.page-appearance-status:empty {
  display: none;
}
@media (forced-colors: active) {
  .page-appearance-option input {
    border: 1px solid ButtonText;
    padding: 1px;
  }
  .page-appearance-option input::before {
    background: ButtonText;
  }
  .page-appearance-option input:checked {
    background: Highlight;
  }
  .page-appearance-option input:checked::before {
    background: HighlightText;
  }
}
.page-locked {
  color: var(--muted);
  flex: none;
  font-size: 12px;
}
.paper:has(.wiki-overview:not([hidden])) {
  max-width: 1216px;
}
.title-group {
  margin: 0 0 17px;
  font: inherit;
}
.page-title {
  display: block;
  resize: none;
  overflow: hidden;
  min-height: 1.22em;
  font-family: inherit;
  color: inherit;
  overflow-wrap: anywhere;
  border: 0;
  border-radius: 3px;
  width: 100%;
  padding: 0;
  background: transparent;
  font-size: 40px;
  font-weight: 720;
  line-height: 1.22;
  letter-spacing: -0.005em;
}
.page-title::placeholder {
  color: #777770;
  opacity: 1;
}
:is(.page-title, .ProseMirror):focus {
  outline: none;
}
.editor-mount {
  position: relative;
}
.paper.database-source-page:not(.page-full-width) {
  max-width: 1216px;
}
.database-page,
.database-embed {
  margin: 12px 0;
  min-width: 0;
}
.database-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.database-heading h2 {
  margin: 0;
  font-size: 21px;
  line-height: 1.25;
}
.database-status {
  margin: 4px 0;
  color: var(--muted);
  font-size: 13px;
}
.database-status:empty {
  margin: 0;
}
.database-scroll {
  overflow-x: auto;
}
.database-view-bar,
.database-view-actions,
.database-view-strip {
  display: flex;
  align-items: center;
  gap: 5px;
}
.database-view-bar {
  flex-wrap: wrap;
}
.database-view-bar {
  justify-content: space-between;
  margin-block: 6px 8px;
}
.database-view-strip {
  min-width: 0;
  max-width: 100%;
}
.database-view-strip > button {
  padding: 3px;
  min-width: 28px;
  border-color: transparent;
}
.database-view-strip > button svg {
  display: block;
  width: 18px;
  height: 18px;
}
.database-view-tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  max-width: 100%;
  padding: 3px;
}
.database-view-tab {
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 5px 9px;
  border: 0;
  background: transparent;
  color: inherit;
  border-radius: 18px;
  white-space: nowrap;
  font: inherit;
  font-size: 14px;
}
.database-view-tab:is(:hover, [aria-selected=true]) {
  background: var(--hover);
}
.database-view-actions > a {
  text-decoration: none;
}
.database-view-menu {
  position: relative;
}
.database-view-menu summary {
  display: block;
  list-style: none;
  cursor: pointer;
  text-align: center;
  min-width: 27px;
}
.database-view-menu summary::-webkit-details-marker {
  display: none;
}
.database-peek {
  border: 1px solid var(--line);
  padding: 0;
  color: inherit;
  background: var(--surface);
  box-shadow: 0 6px 28px #25252325;
}
.database-peek[data-mode=side] {
  position: fixed;
  inset: 0 0 0 auto;
  margin: 0;
  height: 100dvh;
  width: min(590px, 100%);
  max-width: 100%;
  max-height: 100%;
  z-index: 8;
  border-width: 0 0 0 1px;
}
.database-peek[data-mode=center] {
  width: min(1040px, calc(100% - 32px));
  height: min(720px, calc(100dvh - 56px));
  max-width: 100%;
  border-radius: 8px;
}
.database-peek::backdrop {
  background: #29292545;
}
.database-peek[open] {
  display: flex;
  flex-direction: column;
}
.database-peek-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}
.database-peek-label {
  flex: 1;
  color: var(--muted);
  font-size: 13px;
}
.database-peek-content {
  flex: 1;
  overflow: auto;
  padding: 46px clamp(20px, 7vw, 76px) 32px;
}
.database-peek-content > .page-title {
  margin-bottom: 18px;
}
.database-peek-properties {
  display: grid;
  grid-template-columns: minmax(88px, 1fr) 2fr;
  gap: 8px 10px;
  margin: 0 0 16px;
  font-size: 14px;
  overflow-wrap: anywhere;
}
.database-peek-properties:empty {
  display: none;
}
.database-peek-properties dt {
  color: var(--muted);
}
.database-peek-properties dd {
  margin: 0;
}
.database-view-options {
  position: absolute;
  inset-inline-end: 0;
  top: calc(100% + 4px);
  z-index: 2;
  min-width: max-content;
  padding: 4px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
}
.database-view-options button {
  display: block;
  width: 100%;
  border: 0;
  text-align: start;
}
.database-view-list {
  list-style: none;
  margin: 0;
  padding: 0 8px;
}
.database-view-list li + li {
  border-top: 1px solid var(--line);
}
.database-view-list li:not([hidden]) {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: space-between;
}
.database-list-properties {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 4px 8px;
}
.database-cards {
  padding: 4px 2px 12px;
}
.database-board {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  width: max-content;
  min-width: 100%;
}
.database-cards[hidden] {
  display: none;
}
.database-card-group {
  min-width: 0;
}
.database-board .database-card-group {
  width: 262px;
}
.database-card-group h3 {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 0 0 8px;
  font-size: 14px;
  line-height: 26px;
}
.database-card-count {
  color: var(--muted);
  font-weight: 400;
}
.database-card-items,
.ProseMirror .database-card-items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 252px), 1fr));
  gap: 14px;
  list-style: none;
  padding: 0;
  margin: 0 0 12px;
}
.database-board .database-card-items {
  grid-template-columns: 1fr;
  gap: 6px;
  min-height: 42px;
}
.database-card {
  min-width: 0;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 11px;
  box-shadow: 0 1px 3px #1616110c;
}
.database-card[draggable=true] {
  cursor: grab;
}
.database-card-content {
  padding: 4px 11px 8px;
}
.database-card-content .database-entry {
  font-weight: 600;
}
.database-card-content .database-list-properties {
  padding: 0 0 5px;
}
.database-card-move {
  max-width: 100%;
  font: inherit;
  font-size: 13px;
  color: inherit;
}
.database-card-move-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
}
.database-card-preview {
  aspect-ratio: 272 / 146;
  background: var(--sidebar);
  border-bottom: 1px solid var(--line);
}
.database-card-preview img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.database-schedule-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  margin: 4px 0 10px;
}
.database-schedule-header h3 {
  margin: 0;
  font-size: 15px;
}
.database-schedule-navigation {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.database-calendar-grid {
  width: 100%;
  min-width: 735px;
  table-layout: fixed;
  border-collapse: collapse;
}
.database-calendar-grid th {
  font-size: 12px;
  font-weight: 450;
  color: var(--muted);
  padding: 6px;
}
.database-calendar-day {
  height: 124px;
  padding: 6px;
  vertical-align: top;
  border: 1px solid var(--line);
}
.database-calendar-day > time {
  display: block;
  text-align: end;
  font-size: 13px;
}
.database-other-month {
  background: var(--sidebar);
}
.database-other-month > time {
  color: var(--muted);
}
.database-schedule time[aria-current=date] {
  color: #9e352e;
  font-weight: 700;
}
.database-schedule :is(.database-calendar-day, .database-timeline-bar) > a {
  min-height: 28px;
  padding: 2px 4px;
  font-size: 13px;
  display: flex;
  overflow-wrap: anywhere;
}
.database-calendar-day > a,
.database-timeline-bar {
  background: var(--hover);
  border-radius: 4px;
  margin-top: 3px;
}
.database-schedule-time {
  font-size: 11px;
}
.database-schedule-reschedule {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
  margin-block: 3px;
}
.database-schedule-reschedule :is(input, button) {
  max-width: 100%;
  font-size: 12px;
}
.database-timeline-grid {
  --database-day-width: 40px;
  width: calc(var(--database-days) * var(--database-day-width));
  position: relative;
}
.database-timeline-scale,
.database-timeline-row {
  display: grid;
  grid-template-columns: repeat(var(--database-days), var(--database-day-width));
}
.database-timeline-scale > time {
  text-align: center;
  font-size: 12px;
  color: var(--muted);
}
.database-timeline-row {
  min-height: 42px;
  border-bottom: 1px solid var(--line);
}
.database-timeline-bar {
  min-width: 0;
}
.database-timeline-today {
  position: absolute;
  inset-block: 20px 0;
  width: 1px;
  background: #c25245;
  pointer-events: none;
}
.database-schedule-unset {
  margin-top: 8px;
}
.database-chart {
  min-width: 0;
}
.database-chart-visual {
  max-width: 100%;
  max-height: 270px;
  overflow-x: auto;
}
.database-chart-visual canvas {
  display: block;
}
.database-chart-values {
  width: 100%;
  border-collapse: collapse;
  text-align: start;
  font-size: 14px;
}
.database-chart-values :is(th, td) {
  border-bottom: 1px solid var(--line);
  padding: 6px 8px;
  text-align: start;
}
.database-chart-values td {
  font-variant-numeric: tabular-nums;
}
.database-dashboard-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}
.database-dashboard-tools input {
  min-width: 0;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 4px 8px;
}
.database-dashboard-widgets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 410px), 1fr));
  gap: 12px;
}
.database-dashboard-widget {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.database-dashboard-widget h3 {
  margin: 0 0 7px;
  font-size: 15px;
}
.database-dashboard-widget h3 a:hover {
  text-decoration: underline;
}
.database-dashboard-widget ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.database-dashboard-editor {
  max-height: calc(100dvh - 32px);
  overflow: auto;
}
.database-dashboard-editor select {
  max-width: 100%;
}
.database-dashboard-draft {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  border-top: 1px solid var(--line);
  padding-block: 8px;
}
.database-dashboard-draft strong {
  flex-basis: 100%;
  font-size: 14px;
}
.database-view-dialog form > label {
  display: grid;
  gap: 6px;
  margin-bottom: 8px;
}
.database-view-dialog {
  max-height: calc(100dvh - 24px);
  overflow: auto;
}
.database-view-dialog:has(.database-view-settings:not([hidden])) {
  width: min(560px, calc(100% - 32px));
}
.database-view-settings {
  display: grid;
  gap: 8px;
}
.database-view-settings fieldset {
  min-width: 0;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.database-view-settings label {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
}
.database-view-settings :is(select, input) {
  max-width: 100%;
}
.database-view-setting-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-block: 6px;
}
.database-view-group {
  background: var(--sidebar);
  color: var(--muted);
  font-weight: 600;
}
.database-view-list .database-view-group {
  padding: 6px 8px;
}
.database-table {
  width: 100%;
  border-collapse: collapse;
  text-align: start;
}
.database-table th,
.database-table td {
  height: 38px;
  padding: 0 8px;
  border-bottom: 1px solid var(--line);
  text-align: start;
}
.database-table th {
  color: var(--muted);
  font-size: 13px;
  font-weight: 550;
}
.database-table td:first-child {
  position: relative;
  padding-inline-end: 32px;
}
.database-table:has(.database-property-column) th:first-child {
  min-width: 175px;
}
.database-table :is(th, td).database-property-column {
  min-width: 138px;
  max-width: 260px;
  border-inline-start: 1px solid var(--line);
  padding: 0;
}
.database-table .database-add-column {
  width: 32px;
  padding: 0;
}
.database-table .database-property-column > .database-field-access {
  min-height: 24px;
  color: var(--muted);
}
.database-cell-control {
  display: block;
  width: 100%;
  min-height: 37px;
  padding: 4px 8px;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: start;
  cursor: pointer;
}
.database-cell-control:hover {
  background: var(--hover);
}
.database-cell-control:focus-visible {
  outline-offset: -2px;
}
.database-cell-control.database-title-edit {
  position: absolute;
  inset-inline-end: 3px;
  top: 4px;
  width: 27px;
  min-height: 28px;
  padding: 2px;
  text-align: center;
  color: var(--muted);
}
.database-title-edit:not(:focus-visible) {
  opacity: 0;
}
.database-table tr:hover .database-title-edit {
  opacity: 1;
}
@media (hover: none) {
  .database-title-edit:not(:focus-visible) {
    opacity: 1;
  }
}
.database-cell-value {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.database-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.database-property-column > :is(.database-cell-value, span) {
  margin: 4px 8px;
}
.database-cell-option {
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--hover);
  font-size: 13px;
}
.database-entry {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 6px 0;
  color: inherit;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.database-entry svg {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  color: var(--muted);
}
.database-entry:hover {
  text-decoration: underline;
}
.database-entry-name {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  min-width: 0;
}
.database-entry-name .database-entry-fold {
  flex: 0 0 24px;
  min-height: 27px;
  padding: 0;
  color: var(--muted);
  text-align: center;
}
.database-add-row {
  display: block;
  width: 100%;
  min-height: 36px;
  padding: 6px 8px;
  text-align: start;
  color: var(--muted);
  background: transparent;
  border: 0;
  font: inherit;
  font-size: 14px;
}
.database-add-row:hover {
  background: var(--hover);
}
.database-add-row::before {
  content: "+ ";
}
.database-entry-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 4px 8px;
}
.database-entry-form input {
  flex: 1;
  min-width: 100px;
}
.database-dialog form > label {
  display: grid;
  gap: 4px;
  margin-bottom: 8px;
}
.database-link-chooser label {
  display: grid;
  gap: 4px;
  margin-bottom: 8px;
}
.database-template-panel {
  width: min(361px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
}
.database-template-panel ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.database-template-panel li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 4px;
  overflow-wrap: anywhere;
}
.database-graph-dialog form > label {
  display: grid;
  gap: 6px;
  margin-bottom: 8px;
}
.database-page-access form > label {
  display: grid;
  gap: 6px;
  margin-bottom: 8px;
}
.database-row-actions,
.database-row-prerequisites {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.database-row-actions {
  margin-inline-start: auto;
}
.database-row-actions .database-cell-control {
  width: 26px;
  min-height: 25px;
  padding: 1px 5px;
  border-radius: 4px;
  color: var(--muted);
}
.database-row-prerequisites {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
  align-items: baseline;
}
.database-row-prerequisites a {
  color: inherit;
}
.database-dialog form > button + button {
  margin-inline-start: 8px;
}
.access-dialog.database-property-dialog {
  width: min(402px, calc(100% - 24px));
  max-height: calc(100% - 24px);
  background: var(--surface);
}
.database-property-label {
  display: grid;
  gap: 4px;
  margin-bottom: 8px;
}
.database-property-label span,
.database-option-checks legend {
  color: var(--muted);
  font-size: 13px;
}
.database-property-inputs :is(input:not([type=checkbox]), select, textarea) {
  min-width: 0;
  width: 100%;
  padding: 5px 7px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: transparent;
  color: inherit;
  font: inherit;
}
.database-property-types {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px;
  margin: 8px 0;
}
.database-property-type {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 3px 5px;
  border: 0;
  border-radius: 4px;
  color: inherit;
  background: transparent;
  font: inherit;
  font-size: 14px;
  text-align: start;
}
button.database-property-type:is(:hover, [aria-pressed=true]) {
  background: var(--hover);
}
.database-property-symbol {
  display: inline-block;
  width: 16px;
  margin-inline-end: 4px;
  color: var(--muted);
  text-align: center;
}
.database-property-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.database-option {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 4px 0;
}
.database-option input {
  flex: 1;
}
.database-option-checks {
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
}
.database-checkbox-label {
  display: flex;
  flex-direction: row-reverse;
  justify-content: start;
  align-items: center;
  gap: 6px;
  min-height: 28px;
}
.database-relation-options {
  max-height: 240px;
  overflow: auto;
}
.database-property-inputs .database-formula {
  font-family: ui-monospace, monospace;
}
.database-formula-preview {
  display: block;
  min-height: 23px;
  overflow-wrap: anywhere;
}
.database-calculation-error {
  color: #933c30;
}
.ProseMirror {
  position: relative;
  word-wrap: break-word;
  white-space: pre-wrap;
  white-space: break-spaces;
  font-variant-ligatures: none;
  line-height: 1.54;
  min-height: 120px;
  border-radius: 3px;
  padding: 2px 0 12px;
}
.ProseMirror p {
  margin: 2px 0 7px;
}
.editor-columns {
  position: relative;
}
.editor-synced-block {
  position: relative;
  border: 1px solid #e6d5c7;
  border-radius: 5px;
  padding: 5px 7px;
  margin: 6px 0;
}
.editor-synced-block:focus-within {
  border-color: #ba8767;
}
.editor-synced-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  font-size: 12px;
  color: var(--muted);
}
[data-synced-original] > .editor-synced-actions {
  position: absolute;
  z-index: 1;
  bottom: 100%;
  right: 0;
  opacity: 0;
  pointer-events: none;
}
[data-synced-original]:is(:hover, :focus-within) > .editor-synced-actions {
  opacity: 1;
  pointer-events: auto;
}
.editor-synced-actions button {
  font: inherit;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 4px;
  padding: 2px 6px;
}
.editor-synced-actions button:hover {
  background: var(--hover);
}
.editor-synced-block > div > p {
  margin: 0;
}
.editor-synced-block .ProseMirror {
  min-height: 0;
  padding: 0;
}
.editor-synced-status {
  font-size: 13px;
  color: var(--muted);
}
.editor-synced-status:empty {
  display: none;
}
.editor-document-button {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-block: 4px 7px;
}
.editor-document-button button,
.document-button-config button {
  min-height: 29px;
  padding: 3px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--subtle);
  color: inherit;
  font: inherit;
  font-size: 13px;
}
.editor-document-button button:disabled {
  color: var(--muted);
}
.editor-document-button button:not(:disabled):hover,
.document-button-config button:hover {
  background: var(--hover);
}
.editor-document-button .document-button-edit {
  font-size: 0;
  width: 29px;
  padding: 0;
  opacity: 0;
}
.document-button-edit::before {
  content: "\2699";
  font-size: 15px;
}
.editor-document-button:is(:hover, :focus-within) .document-button-edit,
.editor-document-button .document-button-edit[aria-expanded=true] {
  opacity: 1;
}
@media (hover: none) {
  .editor-document-button .document-button-edit {
    opacity: 1;
  }
}
.document-button-config {
  position: fixed;
  z-index: 4;
  display: grid;
  gap: 7px;
  padding: 12px;
  width: min(370px, var(--editor-visible-width, calc(100vw - 16px)));
  max-height: var(--editor-visible-height, calc(100dvh - 16px));
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 8px 24px #24282624;
  font-size: 14px;
}
.document-button-config :is(input, textarea) {
  width: 100%;
  padding: 6px;
  border: 1px solid var(--control-line);
  border-radius: 5px;
  background: var(--surface);
  color: inherit;
  font: inherit;
}
.document-button-config p {
  margin: 0;
}
.document-button-config > p[role=status] {
  color: var(--danger);
}
.document-button-config [type=submit] {
  justify-self: end;
  background: var(--accent);
  color: var(--on-accent);
}
.document-button-config [type=submit]:hover {
  background: var(--accent);
}
.document-button-action {
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.document-button-action textarea {
  margin-block: 6px;
  resize: vertical;
}
.editor-columns-grid {
  display: grid;
  grid-template-columns: var(--column-tracks);
  align-items: start;
  gap: var(--column-gap, 80px);
}
.editor-columns-grid > [data-editor-column] {
  min-width: 0;
  min-height: 30px;
}
.editor-columns-grid > [data-editor-column] > :first-child {
  margin-top: 0;
}
.editor-column-handles {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.editor-column-handle {
  position: absolute;
  inset-block: 0;
  width: 16px;
  transform: translateX(-50%);
  pointer-events: auto;
  cursor: col-resize;
  touch-action: none;
}
.editor-column-handle::before {
  content: "";
  position: absolute;
  inset: 0 7px;
  border-radius: 2px;
}
.editor-column-handle:is(:hover, :focus-visible)::before,
.editor-columns-resizing .editor-column-handle:hover::before {
  background: #a8a6a0;
}
@media (max-width: 600px) {
  .editor-columns-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }
  .editor-column-handles {
    display: none;
  }
}
.ProseMirror h1,
.ProseMirror h2,
.ProseMirror h3 {
  margin: 1.06em 0 0.26em;
  font-weight: 660;
  line-height: 1.24;
  letter-spacing: -0.025em;
}
.ProseMirror h1 {
  font-size: 30px;
}
.ProseMirror h2 {
  font-size: 24px;
}
.ProseMirror h3 {
  font-size: 20px;
}
.ProseMirror h4 {
  font-size: 16px;
  margin: 0.8em 0 0.25em;
  line-height: 1.3;
}
.ProseMirror :is(.ProseMirror-selectednode, .editor-selected-block):not(ul, ol, li),
.ProseMirror :is(ul, ol):is(.ProseMirror-selectednode, .editor-selected-block) > li::before,
.ProseMirror li:is(.ProseMirror-selectednode, .editor-selected-block)::before {
  background: var(--block-selection);
  outline: 1px solid var(--block-selection);
  border-radius: 3px;
}
.ProseMirror [data-editor-column] > p.ProseMirror-selectednode {
  box-shadow: 0 -2px var(--block-selection), 0 2px var(--block-selection);
}
.ProseMirror :is(ul, ol):is(.ProseMirror-selectednode, .editor-selected-block) > li,
.ProseMirror li:is(.ProseMirror-selectednode, .editor-selected-block) {
  position: relative;
  isolation: isolate;
}
.ProseMirror :is(ul, ol):is(.ProseMirror-selectednode, .editor-selected-block) > li::before,
.ProseMirror li:is(.ProseMirror-selectednode, .editor-selected-block)::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 1px 0;
  inset-inline-start: -27px;
  pointer-events: none;
  outline: 0;
}
.ProseMirror :is(ol, ul):has(> li:last-child.editor-selected-block) + :is(h1, h2, h3).editor-selected-block {
  position: relative;
  isolation: isolate;
}
.ProseMirror :is(ol, ul):has(> li:last-child.editor-selected-block) + :is(h1, h2, h3).editor-selected-block::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: calc(3px - 1.06em) 0 0;
  background: inherit;
  border-radius: inherit;
  pointer-events: none;
}
.ProseMirror-hideselection ::selection {
  background: transparent;
}
.ProseMirror-hideselection {
  caret-color: transparent;
}
.ProseMirror-hideselection:focus-visible:has(.ProseMirror-selectednode, .editor-selected-block) {
  outline: none;
}
.ProseMirror-hideselection:focus-visible:has(.editor-simple-table .selectedCell) {
  outline: none;
}
@media (forced-colors: active) {
  .ProseMirror :is(.ProseMirror-selectednode, .editor-selected-block):not(ul, ol, li),
  .ProseMirror :is(ul, ol):is(.ProseMirror-selectednode, .editor-selected-block) > li::before,
  .ProseMirror li:is(.ProseMirror-selectednode, .editor-selected-block)::before {
    outline: 2px solid Highlight;
    outline-offset: -2px;
  }
}
.editor-history-status {
  margin-block: 0 10px;
  color: var(--danger);
  font-size: 13px;
}
.ProseMirror blockquote {
  margin: 4px 0;
  padding-inline-start: 13px;
  border-inline-start: 3px solid currentColor;
}
.ProseMirror .editor-callout {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 9px;
  margin-block: 4px 12px;
  padding: 16px;
  border-radius: 10px;
}
.ProseMirror .editor-callout:where(:not([data-text-highlight], .ProseMirror-selectednode, .editor-selected-block)) {
  background: var(--subtle);
}
.ProseMirror .editor-callout-symbol {
  color: var(--accent);
  font-weight: 700;
  user-select: none;
}
.ProseMirror .editor-callout > div > p {
  margin-block: 4px 12px;
}
.ProseMirror .editor-callout > div > :last-child {
  margin-bottom: 4px;
}
.ProseMirror .editor-toggle {
  position: relative;
  margin-block: 2px;
  padding-inline-start: 30px;
}
.ProseMirror .editor-toggle > div > p {
  min-height: 30px;
  margin: 0 0 4px;
  line-height: 30px;
}
.ProseMirror .editor-toggle[data-open=false] > div > :not(.editor-toggle-title) {
  display: none;
}
.editor-toggle-button {
  position: absolute;
  inset: 3px auto auto 0;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
}
.editor-toggle-button:hover {
  background: var(--hover);
}
.editor-toggle-empty {
  margin: 0 0 5px;
  padding: 2px 0;
  border: 0;
  background: transparent;
  color: var(--muted);
}
.ProseMirror hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 12px 0;
}
.task-block {
  display: flex;
  align-items: flex-start;
  min-height: 30px;
  gap: 10px;
  padding-inline-start: 4px;
}
.task-block > input,
.task-static {
  order: 0;
  flex: none;
  inline-size: 16px;
  block-size: 16px;
  margin: 4px 0 0;
  accent-color: var(--accent);
}
.task-block > div {
  order: 1;
  position: relative;
  flex: 1;
  min-width: 0;
}
.task-block[data-checked=true] > div {
  text-decoration: line-through;
  color: var(--muted);
}
.editor-format {
  position: fixed;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 3px;
  width: 188px;
  max-width: var(--editor-visible-width, 100%);
  max-height: var(--editor-visible-height, 100%);
  overflow: auto;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 6px 24px #24282624;
}
.editor-format > button {
  width: 100%;
  min-width: 0;
  height: 32px;
  color: inherit;
  font: inherit;
  border: 0;
  border-radius: 5px;
  background: transparent;
}
.editor-format > button:hover,
.editor-format > button:focus-visible {
  background: var(--hover);
}
.editor-format > button:is([aria-pressed=true], [aria-expanded=true]) {
  color: var(--accent);
  background: var(--active-surface);
}
.editor-format > .editor-format-type {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 20px 1fr 12px;
  align-items: center;
  gap: 7px;
  width: 100%;
  padding: 0 6px;
  text-align: start;
  font-size: 14px;
}
.editor-format-type:disabled {
  color: var(--muted);
}
.editor-format-type > span:last-child {
  justify-self: end;
}
.editor-format-types {
  position: fixed;
  width: min(220px, var(--editor-visible-width, calc(100vw - 16px)));
  max-height: var(--editor-visible-height, calc(100dvh - 16px));
  overflow: auto;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 8px 24px #24282620;
}
.editor-format-types button {
  display: grid;
  grid-template-columns: 25px 1fr 18px;
  align-items: center;
  gap: 5px;
  width: 100%;
  min-height: 29px;
  padding: 4px 8px;
  border: 0;
  border-radius: 5px;
  text-align: start;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 14px;
}
.editor-format-types button:is(:hover, :focus-visible, [aria-checked=true]) {
  background: var(--hover);
}
.editor-format-types button[aria-disabled=true] {
  color: var(--muted);
}
.editor-format-types button[aria-checked=true]::after {
  content: "\2713";
  justify-self: end;
}
.editor-format button[data-format=formatBold] {
  font-weight: 750;
}
.editor-format button[data-format=formatItalic] {
  font-style: italic;
}
.editor-format button[data-format=formatUnderline] {
  text-decoration: underline;
}
.editor-format button[data-format=formatStrike] {
  text-decoration: line-through;
}
.editor-format button[data-format=formatLink] svg {
  width: 18px;
  height: 18px;
  vertical-align: middle;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.editor-link-selection {
  background-color: var(--link-selection);
}
.editor-link-picker {
  position: fixed;
  width: min(330px, var(--editor-visible-width, calc(100vw - 16px)));
  max-height: var(--editor-visible-height, calc(100dvh - 16px));
  overflow: auto;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
  box-shadow: 0 8px 24px #24282620;
}
.editor-link-picker label {
  display: block;
  padding: 6px 4px 0;
  color: var(--muted);
  font-size: 12px;
}
.editor-link-picker input {
  display: block;
  width: calc(100% - 8px);
  height: 29px;
  margin: 3px 4px;
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
  color: inherit;
  font: inherit;
  font-size: 14px;
}
.editor-link-picker label input {
  width: 100%;
  margin-inline: 0;
}
.editor-link-picker button {
  display: grid;
  width: 100%;
  padding: 6px 8px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 14px;
  text-align: start;
  overflow-wrap: anywhere;
}
.editor-link-picker button:hover,
.editor-link-picker button:focus-visible {
  background: var(--hover);
}
.editor-link-picker small {
  color: var(--muted);
}
.editor-link-picker p {
  margin: 4px;
  color: var(--muted);
  font-size: 13px;
}
.editor-link-picker p:empty {
  margin: 0;
}
.editor-color-palette {
  position: fixed;
  width: min(192px, var(--editor-visible-width, calc(100vw - 16px)));
  max-height: var(--editor-visible-height, calc(100dvh - 16px));
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
  box-shadow: 0 8px 24px #24282620;
}
.editor-color-palette > div + div:not([hidden]) {
  margin-top: 14px;
}
.editor-color-palette > div[hidden] + div {
  margin-top: 0;
}
.editor-palette-label {
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 570;
}
.editor-swatches {
  display: grid;
  grid-template-columns: repeat(5, minmax(20px, 26px));
  justify-content: space-between;
  row-gap: 8px;
}
.editor-swatch {
  height: 26px;
  padding: 0;
  border: 1px solid #77777044;
  border-radius: 6px;
  background-color: var(--surface);
  font-weight: 650;
}
.editor-swatch:hover {
  border-color: var(--muted);
}
.editor-swatch[aria-pressed=true] {
  border: 2px solid currentColor;
}
[data-text-color=gray] {
  color: #595850;
}
[data-text-color=brown] {
  color: #76503e;
}
[data-text-color=orange] {
  color: #854119;
}
[data-text-color=yellow] {
  color: #74540b;
}
[data-text-color=green] {
  color: #2e644b;
}
[data-text-color=blue] {
  color: #255789;
}
[data-text-color=purple] {
  color: #684681;
}
[data-text-color=pink] {
  color: #863761;
}
[data-text-color=red] {
  color: #912f2c;
}
[data-text-highlight=gray] {
  --text-highlight: #f0efed;
}
[data-text-highlight=brown] {
  --text-highlight: #f4ede9;
}
[data-text-highlight=orange] {
  --text-highlight: #f8ecdf;
}
[data-text-highlight=yellow] {
  --text-highlight: #f8f3de;
}
[data-text-highlight=green] {
  --text-highlight: #eaf1ec;
}
[data-text-highlight=blue] {
  --text-highlight: #e7f2fb;
}
[data-text-highlight=purple] {
  --text-highlight: #f2ebf8;
}
[data-text-highlight=pink] {
  --text-highlight: #f7eaf1;
}
[data-text-highlight=red] {
  --text-highlight: #f9eae7;
}
[data-text-highlight]:not([data-text-highlight=default]) {
  background-color: var(--text-highlight);
}
.block-controls {
  position: fixed;
  z-index: 1;
  display: flex;
  align-items: center;
  transform: translateY(-3px);
  pointer-events: none;
}
.block-controls-column {
  justify-content: space-between;
}
.block-controls-column > .block-grip {
  margin-inline-start: auto;
}
.block-controls button {
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  color: var(--muted);
  background: transparent;
  font-size: 20px;
  line-height: 1;
  pointer-events: auto;
  flex: 0 0 auto;
}
.block-controls button:first-child {
  width: 23px;
  min-width: 0;
  height: 28px;
  flex-shrink: 1;
}
.block-controls button:hover,
.block-controls button:focus-visible {
  background: var(--hover);
}
.block-controls .block-grip {
  width: 30px;
  height: 28px;
  cursor: grab;
  touch-action: none;
}
.block-controls-list {
  flex-direction: column;
  align-items: flex-end;
  padding-inline-end: 3px;
}
.block-controls-list button:first-child,
.block-controls-list .block-grip {
  width: min(30px, 100%);
  height: 28px;
}
.block-controls-list .block-grip {
  margin: 0;
}
.block-grip:active {
  cursor: grabbing;
}
.block-grip::before {
  content: "";
  display: block;
  width: 10px;
  height: 15px;
  margin: auto;
  background:
    radial-gradient(
      circle,
      currentColor 1.1px,
      transparent 1.3px) 0 0 / 5px 5px;
}
.block-menu {
  position: fixed;
  z-index: 3;
  width: min(266px, var(--editor-visible-width, calc(100vw - 16px)));
  max-height: var(--editor-visible-height, calc(100dvh - 16px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 8px 25px #24282624, 0 2px 5px #24282612;
}
.block-menu > :not(.block-menu-results) {
  flex-shrink: 0;
}
.block-menu-results {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior-y: none;
  overflow-anchor: none;
}
.block-menu.block-menu-compact {
  padding-block: 4px;
}
.block-menu-compact > .block-menu-heading {
  display: none;
}
.block-menu-compact > .block-menu-search {
  height: min(25px, calc(var(--editor-visible-height) / 2));
  margin-bottom: 2px;
}
.block-menu-search {
  width: 100%;
  height: 29px;
  padding: 4px 6px;
  margin-bottom: 5px;
  border: 1px solid #d6d6d3;
  border-radius: 5px;
  background: var(--subtle);
  font-size: 14px;
}
.block-menu-heading {
  margin: 7px 3px 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 550;
}
.block-menu-results button {
  display: flex;
  gap: 8px;
  align-items: center;
  width: 100%;
  min-height: 29px;
  padding: 3px 4px;
  text-align: left;
  border: 0;
  border-radius: 4px;
  background: transparent;
  font-size: 14px;
}
.block-menu-results button:hover,
.block-menu-results button:focus-visible {
  background: var(--hover);
}
.block-menu-results button[aria-expanded=true] {
  background: var(--hover);
}
.block-menu-palette {
  z-index: 4;
  overscroll-behavior-y: contain;
  overflow-anchor: none;
}
.block-menu-palette .editor-cell-palette-back::before {
  content: none;
}
.block-menu-colors {
  border-top: 1px solid var(--line);
  margin-top: 5px;
}
.block-menu-icon {
  display: inline-grid;
  place-items: center;
  width: 18px;
  font-size: 17px;
}
.block-menu-arrow {
  margin-inline-start: auto;
  color: var(--muted);
}
.block-menu-empty {
  color: var(--muted);
  margin: 5px 0;
}
.block-drop-line {
  position: fixed;
  z-index: 2;
  height: 2px;
  background: #2377cb;
  pointer-events: none;
}
.ProseMirror > :first-child {
  margin-top: 0;
}
.ProseMirror ul,
.ProseMirror ol {
  margin: 4px 0 8px;
  padding-left: 27px;
}
.ProseMirror li {
  padding-block: 3px;
}
.ProseMirror li > p {
  margin: 1px 0;
}
.ProseMirror li > .task-block {
  margin-inline-start: 14px;
}
.ProseMirror [data-block-children] > :not(:first-child) {
  margin-inline-start: 30px;
}
.ProseMirror code {
  padding: 2px 5px;
  border-radius: 4px;
  color: var(--danger);
  background: var(--subtle);
  font-family: ui-monospace, monospace;
  font-size: 0.88em;
}
.editor-code-block {
  position: relative;
  margin: 8px 0;
  border-radius: 10px;
  background: var(--sidebar);
}
.editor-code-block pre {
  box-sizing: border-box;
  margin: 0;
  padding: 35px 23px 36px;
  overflow-x: auto;
  tab-size: 4;
  min-height: 92px;
  border-radius: inherit;
  font:
    14px/21px ui-monospace,
    SFMono-Regular,
    Consolas,
    monospace;
}
.editor-code-block[data-wrap=true] pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.ProseMirror .editor-code-block pre code {
  display: block;
  padding: 0;
  color: inherit;
  background: transparent;
  font: inherit;
}
.editor-code-block[data-placeholder]:has(pre code > br.ProseMirror-trailingBreak:only-child)::before {
  content: attr(data-placeholder);
  position: absolute;
  inset: 35px auto auto 23px;
  pointer-events: none;
  font: 14px/21px ui-monospace, monospace;
  color: var(--muted);
}
.editor-code-tools {
  display: flex;
  align-items: center;
  gap: 4px;
  position: absolute;
  inset: 4px 6px auto;
  opacity: 0;
  pointer-events: none;
  user-select: none;
}
.editor-code-block:is(:hover, :focus-within) .editor-code-tools {
  opacity: 1;
  pointer-events: auto;
}
.editor-code-tools button,
.editor-code-languages button {
  border: 0;
  background: transparent;
  border-radius: 4px;
  color: var(--muted);
  font-size: 12px;
  padding: 4px 6px;
}
.editor-code-tools button:is(:hover, [aria-pressed=true]),
.editor-code-languages button:is(:hover, .is-active) {
  color: inherit;
  background: var(--hover);
}
.editor-code-language {
  margin-inline-end: auto;
}
.editor-code-status {
  font-size: 12px;
  color: var(--muted);
}
.editor-code-picker {
  position: absolute;
  z-index: 6;
  top: 31px;
  left: 6px;
  width: min(224px, calc(100% - 12px));
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 8px 24px #0002;
}
.editor-code-picker input {
  width: 100%;
  padding: 5px 8px;
  margin-bottom: 4px;
}
.editor-code-languages {
  display: grid;
  max-height: 200px;
  overflow: auto;
  font-size: 13px;
  padding: 2px;
}
.editor-code-languages button {
  text-align: start;
}
.editor-code-languages button[aria-selected=true] {
  font-weight: 650;
}
.editor-code-block .hljs-keyword,
.editor-code-block .hljs-built_in {
  color: #166d99;
}
.editor-code-block .hljs-comment {
  color: #646960;
}
.editor-code-block :is(.hljs-number, .hljs-literal) {
  color: #9a2260;
}
.editor-code-block :is(.hljs-string, .hljs-attr) {
  color: #a0424d;
}
.editor-code-block :is(.hljs-title, .hljs-section, .hljs-variable) {
  color: #8e481c;
}
@media (hover: none) {
  .editor-code-tools {
    opacity: 1;
    pointer-events: auto;
  }
}
.editor-contents {
  margin: 4px 0;
  font-size: 14px;
}
.editor-contents:not([data-text-color]) {
  color: var(--muted);
}
:is(.ProseMirror, .history-content) .editor-contents ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
:is(.ProseMirror, .history-content) .editor-contents li {
  margin: 0;
  padding: 0;
  padding-inline-start: calc(22px * var(--contents-depth, 0));
}
.editor-contents a {
  display: inline-block;
  min-height: 28px;
  color: inherit;
  line-height: 28px;
  text-decoration: underline;
  text-decoration-color: currentColor;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
  cursor: pointer;
  caret-color: transparent;
}
.editor-contents:not([data-text-color]) a:is(:hover, :focus-visible) {
  color: var(--text);
}
.ProseMirror .editor-contents[data-text-highlight]:is(.ProseMirror-selectednode, .editor-selected-block) {
  background-color: var(--text-highlight);
  box-shadow: inset 0 0 0 100vmax #367fc61b;
}
.equation-block {
  display: grid;
  place-items: center;
  min-height: 62px;
  margin: 6px 0;
  padding: 12px;
  border-radius: 8px;
  max-width: 100%;
  overflow-x: auto;
}
.equation-block .katex {
  min-width: 0;
  max-width: 100%;
}
.equation-inline {
  display: inline-block;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.ProseMirror[contenteditable=true] :is(.equation-block, .equation-inline) {
  cursor: pointer;
}
.equation-block.equation-empty {
  place-items: center start;
  background: var(--sidebar);
}
.equation-empty {
  color: var(--muted);
}
.equation-invalid {
  color: #9b3027;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.equation-form {
  position: fixed;
  z-index: 8;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 6px;
  width: min(400px, var(--editor-visible-width, calc(100vw - 16px)));
  max-height: var(--editor-visible-height, calc(100dvh - 16px));
  overflow: auto;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: inherit;
  background: light-dark(#f9f8f7, var(--sidebar));
  box-shadow: 0 5px 24px #0002;
}
.equation-form textarea {
  width: 100%;
  min-width: 0;
  height: 58px;
  resize: none;
  border: 0;
  padding: 0;
  color: inherit;
  background: transparent;
  font: 14px/1.5 ui-monospace, monospace;
}
.equation-form.equation-inline-form {
  padding: 8px;
}
.equation-form textarea:focus {
  outline: none;
}
:root[data-contrast=high] .equation-form:has(textarea:focus-visible) {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}
@media (prefers-contrast: more) {
  :root[data-contrast=system] .equation-form:has(textarea:focus-visible) {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
  }
}
@media (forced-colors: active) {
  .equation-form:has(textarea:focus-visible) {
    outline: 3px solid Highlight;
    outline-offset: 2px;
  }
}
.equation-form button {
  border: 0;
  border-radius: 5px;
  background: var(--accent);
  color: var(--on-accent);
  padding: 2px 6px;
  font-size: 14px;
  line-height: 20px;
  white-space: nowrap;
}
.equation-error {
  grid-column: 1 / -1;
  color: #9b3027;
  font-size: 13px;
}
:is(.ProseMirror, .history-content) .editor-contents p {
  margin: 0;
  font: inherit;
  line-height: 28px;
}
.editor-simple-table {
  position: relative;
  margin: 16px 0 23px;
  padding: 0 14px 14px 0;
}
.editor-table-scroll {
  overflow-x: auto;
}
.editor-simple-table table,
.history-content table[data-editor-table] {
  border-collapse: collapse;
  table-layout: fixed;
  max-inline-size: none;
  text-align: start;
}
.editor-simple-table :is(td, th),
table[data-editor-table] :is(td, th) {
  position: relative;
  border: 1px solid #e4e4df;
  min-width: 52px;
  height: 35px;
  padding: 6px 10px;
  text-align: start;
  vertical-align: top;
  font-size: 14px;
  line-height: 22px;
  overflow-wrap: anywhere;
}
.editor-simple-table :is(td, th) p {
  margin: 0;
  font-size: inherit;
  line-height: inherit;
}
.editor-simple-table :is(td, th) :is(p, div)[data-placeholder]::before {
  display: none;
}
table[data-editor-table] th {
  font-weight: 650;
}
table[data-editor-table] th:not([data-text-highlight]) {
  background-color: var(--sidebar);
}
.editor-simple-table td,
.editor-simple-table th {
  cursor: text;
}
.editor-simple-table.editor-table-column-edge :is(td, th) {
  cursor: col-resize;
}
.ProseMirror:not([contenteditable=false]):focus-within .editor-active-cell::after,
.editor-simple-table .selectedCell::after {
  content: "";
  position: absolute;
  inset: -1px;
  border: 0 solid #367fc6;
  pointer-events: none;
  z-index: 1;
}
.editor-simple-table .editor-active-cell::after {
  border-width: 1.5px;
  border-radius: 2px;
}
.editor-simple-table .editor-cell-selection-top::after {
  border-top-width: 1.5px;
}
.editor-simple-table .editor-cell-selection-right::after {
  border-right-width: 1.5px;
}
.editor-simple-table .editor-cell-selection-bottom::after {
  border-bottom-width: 1.5px;
}
.editor-simple-table .editor-cell-selection-left::after {
  border-left-width: 1.5px;
}
.editor-simple-table .editor-cell-selection-top.editor-cell-selection-left::after {
  border-top-left-radius: 2px;
}
.editor-simple-table .editor-cell-selection-top.editor-cell-selection-right::after {
  border-top-right-radius: 2px;
}
.editor-simple-table .editor-cell-selection-bottom.editor-cell-selection-left::after {
  border-bottom-left-radius: 2px;
}
.editor-simple-table .editor-cell-selection-bottom.editor-cell-selection-right::after {
  border-bottom-right-radius: 2px;
}
.editor-simple-table .editor-cell-selection-partial::after {
  border-width: 1.5px;
  border-radius: 2px;
}
@media (forced-colors: active) {
  .editor-simple-table :is(.editor-active-cell, .selectedCell)::after {
    border-color: Highlight;
  }
}
.editor-cell-grip {
  position: fixed;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 20px;
  height: 12px;
  transform: translate(-50%, -50%);
  padding: 0;
  border: 0;
  background: none;
}
.editor-cell-grip::before {
  content: "";
  width: 13px;
  height: 2.5px;
  box-sizing: content-box;
  border: 1.5px solid #fff;
  border-radius: 4px;
  background: #a6a4a1;
}
.editor-cell-grip[data-side=left] {
  width: 12px;
  height: 20px;
}
.editor-cell-grip[data-side=left]::before {
  width: 2.5px;
  height: 13px;
}
.editor-cell-grip:hover::before {
  background: #6d6c68;
}
.editor-cell-grip:focus-visible {
  outline-offset: -1px;
}
.editor-cell-menu,
.editor-cell-palette {
  position: fixed;
  z-index: 10;
  max-height: calc(100dvh - 16px);
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 8px 24px #24282624;
  font-size: 14px;
}
.editor-cell-menu {
  width: min(240px, calc(100vw - 16px));
}
.editor-cell-palette {
  z-index: 11;
  width: min(200px, calc(100vw - 16px));
  max-height: min(530px, calc(100dvh - 16px));
  overscroll-behavior: contain;
}
.block-menu-palette {
  overscroll-behavior-y: none;
  width: min(200px, var(--editor-visible-width, calc(100vw - 16px)));
  max-height: min(530px, var(--editor-visible-height, calc(100dvh - 16px)));
}
.editor-cell-menu-search {
  width: 100%;
  height: 29px;
  margin-bottom: 7px;
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--sidebar);
}
.editor-cell-menu-search:focus {
  outline: var(--focus-width) solid #367fc6;
  outline-offset: -1px;
}
.editor-cell-menu-actions button {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 25px;
  padding: 3px 5px;
  border: 0;
  border-radius: 4px;
  background: none;
  text-align: start;
}
.editor-cell-menu-actions button:is(:hover, :focus-visible, [aria-expanded=true]) {
  background: var(--hover);
}
.editor-cell-menu-actions button::before {
  width: 14px;
  text-align: center;
  color: var(--muted);
}
.editor-cell-menu-actions [data-cell-action=color]::before {
  content: "\25e9";
}
.editor-cell-menu-actions [data-cell-action=color]::after {
  content: "\203a";
  margin-inline-start: auto;
}
.editor-cell-menu-actions [data-cell-action=clear]::before {
  content: "\2297";
}
.editor-cell-menu-empty {
  padding: 4px;
  color: var(--muted);
}
.editor-cell-palette .editor-palette-label {
  margin: 0;
  padding: 1px 3px 7px;
}
.editor-cell-color-list + .editor-palette-label {
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.editor-cell-palette button {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  min-height: 26px;
  padding: 1px 3px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  text-align: start;
  font-size: 13px;
}
.editor-cell-palette button:is(:hover, :focus-visible) {
  background: var(--hover);
}
.editor-cell-palette button:focus-visible {
  outline: var(--focus-width) solid #367fc6;
  outline-offset: -1px;
}
.editor-cell-palette button[aria-pressed=true]::after {
  content: "\2713";
  margin-inline-start: auto;
  color: var(--muted);
}
.editor-cell-color-sample {
  display: grid;
  place-items: center;
  flex: 0 0 23px;
  height: 23px;
  border: 1px solid #77777044;
  border-radius: 6px;
  font-weight: 650;
}
.editor-cell-palette .editor-cell-palette-back {
  display: none;
  margin-bottom: 6px;
  min-height: 32px;
}
.editor-cell-palette-overlay .editor-cell-palette-back {
  position: sticky;
  z-index: 1;
  top: -8px;
  display: flex;
  background: var(--surface);
  box-shadow: 0 1px var(--line);
}
.editor-cell-palette-overlay .editor-cell-palette-back::before {
  content: "\2039";
}
@media (pointer: coarse) {
  .editor-cell-grip,
  .editor-cell-grip[data-side=left] {
    width: 24px;
    height: 24px;
  }
  .editor-cell-menu-actions button,
  .editor-cell-palette button {
    min-height: 36px;
  }
}
.editor-table-controls {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.editor-table-controls button,
.editor-table-options summary {
  border: 0;
  background: var(--sidebar);
  color: var(--muted);
  border-radius: 4px;
  font-size: 13px;
}
.editor-table-add-row,
.editor-table-add-column,
.editor-table-options,
.editor-table-corner {
  position: absolute;
  opacity: 0;
}
.editor-simple-table:is(:hover, :focus-within, :has(details[open], [data-size])) :is(.editor-table-add-row, .editor-table-add-column, .editor-table-options, .editor-table-corner) {
  opacity: 1;
  pointer-events: auto;
}
.editor-table-add-row {
  bottom: 0;
  left: 0;
  width: calc(100% - 14px);
  height: 13px;
  line-height: 10px;
}
.editor-table-add-column {
  top: 0;
  right: 0;
  width: 13px;
  height: calc(100% - 14px);
  padding: 0;
}
.editor-table-corner {
  right: 0;
  bottom: 0;
  width: 13px;
  height: 13px;
  padding: 0;
  cursor: nwse-resize;
  touch-action: none;
}
.editor-table-corner[data-size]::after {
  content: attr(data-size);
  position: absolute;
  right: 14px;
  bottom: 14px;
  white-space: nowrap;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 4px 6px;
}
.editor-table-options {
  top: -16px;
  right: 15px;
  z-index: 4;
}
.editor-table-options summary {
  display: grid;
  place-items: center;
  width: 24px;
  height: 17px;
  cursor: pointer;
}
.editor-table-options summary::-webkit-details-marker {
  display: none;
}
.editor-table-menu {
  display: grid;
  min-width: 192px;
  padding: 5px;
  margin-top: 3px;
  position: absolute;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 24px #0002;
}
.editor-table-menu button {
  text-align: start;
  background: transparent;
  padding: 5px 8px;
}
.editor-table-controls button:hover,
.editor-table-menu button[aria-pressed=true] {
  color: inherit;
  background: var(--hover);
}
@media (hover: none) {
  .editor-simple-table :is(.editor-table-add-row, .editor-table-add-column, .editor-table-options, .editor-table-corner) {
    opacity: 1;
    pointer-events: auto;
  }
}
.ProseMirror [data-placeholder]::before {
  content: attr(data-placeholder);
  float: left;
  height: 0;
  color: var(--muted);
  pointer-events: none;
  font-weight: 400;
}
.ProseMirror:not(:focus-within) :is(h1, h2, h3, h4)[data-placeholder]::before {
  content: none;
}
.ProseMirror :is(h1, h2, h3, h4)[data-placeholder]::before {
  font-weight: inherit;
  opacity: .72;
}
.ProseMirror .task-block[data-placeholder]::before {
  content: none;
}
.ProseMirror .task-block[data-placeholder] > div::before {
  content: attr(data-task-placeholder);
  position: absolute;
  inset: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  pointer-events: none;
}
.slash-menu {
  position: fixed;
  z-index: 2;
  display: flex;
  flex-direction: column;
  width: min(293px, var(--editor-visible-width, calc(100vw - 16px)));
  max-height: min(303px, var(--editor-visible-height, calc(100dvh - 16px)));
  overflow: hidden;
  background: var(--surface);
  border: 1px solid #dddeda;
  border-radius: 10px;
  box-shadow: 0 10px 28px #24282624, 0 2px 5px #24282617;
}
.slash-menu[hidden] {
  display: none;
}
.slash-command-text,
.slash-search-hint {
  background: var(--subtle);
  border-radius: 4px;
}
.slash-search-hint {
  color: var(--muted);
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
}
.slash-search-hint::after {
  content: attr(data-hint);
  padding-inline: 2px 4px;
}
.slash-results {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 4px;
}
.slash-group + .slash-group {
  border-top: 1px solid var(--line);
  margin-top: 5px;
  padding-top: 4px;
}
.slash-heading {
  padding: 5px 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 550;
}
.slash-option {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 30px;
  padding: 3px 8px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 14px;
}
.slash-option[aria-selected=true],
.slash-option:hover {
  background: var(--hover);
}
.slash-icon {
  display: grid;
  place-items: center;
  width: 16px;
  flex: 0 0 16px;
  font-weight: 650;
}
.slash-message {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.slash-close {
  display: flex;
  flex: 0 0 clamp(22px, calc(var(--editor-visible-height, 303px) - 47px), 37px);
  justify-content: space-between;
  align-items: center;
  padding: 0 11px;
  border: 0;
  border-radius: 0;
  border-top: 1px solid var(--line);
  background: var(--surface);
  font-size: 14px;
  text-align: left;
}
.slash-close:hover {
  background: var(--hover);
}
.slash-no-results {
  padding: 3px;
}
.slash-no-results .slash-close {
  flex-basis: clamp(22px, calc(var(--editor-visible-height, 303px) - 8px), 29px);
  padding-inline: 7px;
  border: 0;
  border-radius: 5px;
  background: var(--hover);
}
.slash-menu kbd {
  margin-inline-start: auto;
  color: var(--muted);
  font: inherit;
  font-size: 11px;
}
.overlay {
  display: none;
}
.skip {
  position: fixed;
  z-index: 5;
  top: 8px;
  left: 8px;
  transform: translateY(-200%);
  padding: 8px;
  background: var(--surface);
}
.skip:focus {
  transform: none;
}
@media (max-width: 800px) {
  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 4;
    width: var(--visible-sidebar-width, min(282px, 86vw));
  }
  .sidebar-drawer .overlay {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 3;
    background: #26292640;
  }
  .paper {
    padding-top: 64px;
  }
  .add-child,
  .page-order-handle {
    opacity: 1;
  }
}
@media (max-width: 480px) {
  :root {
    --surface-edge-inset: 10px;
  }
  .toolbar {
    gap: 5px;
  }
  .toolbar:has(.page-locked:not([hidden]), .locked-draft:not([hidden]), .toolbar-critical:not([hidden])) .crumbs {
    flex: 1 1 30%;
  }
  .toolbar:has(.page-locked:not([hidden]), .locked-draft:not([hidden]), .toolbar-critical:not([hidden])) .save-status {
    margin-left: 0;
  }
  .paper {
    padding: 44px 24px 90px;
  }
  .page-title {
    font-size: 34px;
  }
  .editor-mount:has(.block-controls) {
    margin-inline-start: 24px;
  }
  .paper:has(.wiki-viewbar:not([hidden])) .editor-mount:has(.block-controls) {
    margin-inline-start: 0;
  }
  .block-controls button {
    background: var(--surface);
  }
  .crumb {
    max-width: 180px;
  }
  .save-status {
    max-width: 145px;
    line-height: 1.2;
  }
  .save-status[data-state=saved] span {
    position: absolute;
    width: 1px;
    height: 1px;
    clip-path: inset(50%);
    overflow: hidden;
  }
}
.login {
  display: grid;
  gap: 14px;
  width: min(340px, calc(100% - 48px));
  margin: 100px auto 0;
}
.login h1 {
  margin: 0 0 4px;
  font-size: 27px;
}
.login label {
  display: grid;
  gap: 5px;
  font-size: 14px;
}
.login input,
.area-select {
  border: 1px solid var(--control-line);
  padding: 7px 9px;
  border-radius: 5px;
  background: var(--surface);
  font: inherit;
}
.login .nav-error {
  margin: 0;
  padding: 0;
}
.session-button {
  padding: 5px 9px;
  border: 1px solid var(--control-line);
  border-radius: 5px;
  background: var(--surface);
  font-size: 13px;
}
.login .session-button {
  padding: 8px;
  background: var(--accent);
  color: var(--on-accent);
}
.area-select {
  width: 100%;
  margin-bottom: 8px;
  font-size: 13px;
}
.space-share {
  margin: 0 0 8px;
}
.access-dialog {
  width: min(420px, calc(100% - 32px));
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: inherit;
  background: var(--surface);
}
.access-dialog::backdrop {
  background: #26292650;
}
.access-dialog h2 {
  margin: 0 0 10px;
  font-size: 20px;
}
.access-list {
  padding-left: 20px;
  font-size: 14px;
}
.grant-form {
  display: grid;
  gap: 9px;
  margin: 12px 0;
}
.grant-form label {
  display: grid;
  gap: 4px;
  font-size: 13px;
}
.grant-form input,
.grant-form select {
  padding: 6px;
  border: 1px solid var(--control-line);
  border-radius: 5px;
  color: inherit;
  background: var(--surface);
  font: inherit;
}
.remote-selection {
  background: var(--peer-selection);
}
.remote-caret {
  position: relative;
  border-left: 2px solid #6050a6;
  margin-left: -1px;
}
.remote-caret > span::before {
  content: attr(data-name);
  position: absolute;
  left: -2px;
  bottom: 100%;
  padding: 1px 4px;
  background: #6050a6;
  color: white;
  border-radius: 3px 3px 3px 0;
  font: 11px/1.4 system-ui;
  white-space: nowrap;
  pointer-events: none;
}
.save-status[data-state=collabOffline],
.save-status[data-state=collabConflict] {
  color: var(--danger);
}
@media (max-width: 800px) {
  .remote-caret > span::before {
    right: -2px;
    left: auto;
  }
}
.discovery-dialog {
  width: min(640px, calc(100% - 32px));
}
.discovery-dialog.discovery-with-preview {
  width: min(1040px, calc(100% - 32px));
}
.discovery-dialog input,
.discovery-dialog select {
  font: inherit;
  color: inherit;
  border: 1px solid var(--control-line);
  border-radius: 5px;
  padding: 6px 8px;
  max-width: 100%;
}
.discovery-dialog > input {
  width: 100%;
  margin-bottom: 8px;
}
.discovery-filters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.search-title-filter {
  border: 1px solid var(--control-line);
  border-radius: 16px;
  padding: 5px 10px;
  color: var(--muted);
  background: var(--surface);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.search-title-filter:hover,
.search-title-filter[aria-pressed=true] {
  background: var(--active-surface);
  color: var(--active-text);
}
.discovery-status {
  font-size: 14px;
}
.discovery-results,
.file-list,
.backlink-list {
  list-style: none;
  padding: 0;
}
.discovery-results {
  max-height: min(320px, 45vh);
  overflow-y: auto;
}
.discovery-with-preview .discovery-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 354px);
  align-items: start;
  gap: 16px;
  margin: 12px 0;
}
.discovery-with-preview .discovery-results {
  margin: 0;
  max-height: min(432px, 53dvh);
}
.search-preview {
  height: min(432px, 55dvh);
  overflow: auto;
  overflow-wrap: anywhere;
  border: 1px solid var(--control-line);
  border-radius: 10px;
  color: var(--muted);
}
.search-preview-header {
  display: flex;
  justify-content: end;
  align-items: start;
  gap: 8px;
  min-height: 68px;
  padding: 7px;
  background: var(--subtle);
}
.search-preview-actions {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}
.search-preview-actions .icon-button {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
}
.search-preview-actions svg {
  width: 14px;
  height: 14px;
}
.search-preview-action-status {
  align-self: center;
  font-size: 12px;
}
.search-preview-content {
  padding: 24px 22px;
}
.search-preview-content h3 {
  font-size: 18px;
  line-height: 1.3;
  margin: 0 0 16px;
  color: var(--text);
}
.search-preview-block,
.search-preview-message {
  font-size: 13px;
  line-height: 1.45;
  margin: 4px 0;
  white-space: pre-wrap;
}
.search-preview-content h4 {
  margin-top: 12px;
  color: var(--text);
}
.search-preview-content blockquote {
  padding-inline-start: 8px;
  border-inline-start: 2px solid var(--control-line);
}
.search-preview-content pre {
  background: var(--active-surface);
  padding: 6px;
  border-radius: 4px;
}
.search-preview-marker {
  margin-inline-end: 5px;
}
@media (max-width: 620px) {
  .discovery-with-preview .discovery-body {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }
  .discovery-with-preview .discovery-results {
    max-height: min(200px, 26dvh);
  }
  .search-preview {
    height: min(220px, 29dvh);
  }
  .search-preview-header {
    min-height: 44px;
  }
  .search-preview-actions .icon-button {
    width: 34px;
    height: 34px;
  }
  .search-preview-content {
    padding: 12px;
  }
}
.quick-group ul {
  list-style: none;
  padding: 0;
}
.quick-group h3 {
  margin: 7px 8px 2px;
  font-size: 12px;
  color: var(--muted);
}
.discovery-hit {
  display: grid;
  gap: 3px;
  width: 100%;
  text-align: left;
  padding: 8px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: inherit;
  overflow-wrap: anywhere;
}
.discovery-dialog:not(.discovery-with-preview) .discovery-hit:hover,
.discovery-hit.is-current {
  background: var(--active-surface);
}
.discovery-hit span {
  font-size: 13px;
  color: var(--muted);
}
.discovery-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0;
}
.page-find {
  position: absolute;
  z-index: 2;
  inset: 8px 12px auto auto;
  width: min(254px, calc(100% - 24px));
  min-height: 39px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 5px 20px #24282626;
}
.page-find-controls {
  display: flex;
  align-items: center;
  gap: 3px;
  min-height: 37px;
  padding: 4px 6px;
}
.page-find:focus-within {
  border-color: var(--accent);
}
.page-find input {
  flex: 1;
  min-width: 0;
  height: 28px;
  padding: 0 3px;
  border: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  font-size: 13px;
}
.page-find input:focus-visible {
  outline: none;
}
.page-find input::-webkit-search-cancel-button {
  display: none;
}
.page-find-controls [role=status] {
  margin-inline-end: 2px;
  color: var(--muted);
  white-space: nowrap;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.page-find button:disabled {
  opacity: .45;
}
.page-find svg {
  width: 15px;
  height: 15px;
}
.page-find button[aria-expanded=true] {
  color: var(--active-text);
  background: var(--active-surface);
}
.page-replace {
  padding: 3px 8px 8px;
  border-top: 1px solid var(--line);
}
.page-replace input {
  width: 100%;
}
.page-replace-actions {
  display: flex;
  justify-content: flex-end;
  gap: 4px;
}
.page-replace-actions .session-button {
  font-size: 12px;
  min-height: 26px;
  padding: 2px 7px;
}
.page-replace-primary {
  color: var(--on-accent);
  background: var(--accent);
  border-color: var(--accent);
}
.page-replace-primary:hover {
  color: var(--active-text);
  background: var(--active-surface);
}
.page-replace-status {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
}
.page-discovery-tools,
.discovery-panel {
  font-size: 14px;
}
.discovery-panel {
  margin: 16px 0 0;
}
.discovery-panel h2 {
  font-size: 15px;
  margin-bottom: 6px;
}
.discovery-panel label {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.discovery-panel input[type=file] {
  max-width: 100%;
}
.page-files-menu {
  position: fixed;
  z-index: 6;
  width: min(272px, var(--editor-visible-width, calc(100vw - 16px)));
  max-height: min(480px, var(--editor-visible-height, calc(100dvh - 16px)));
  overflow: auto;
  overscroll-behavior: contain;
  margin: 0;
  padding: 10px;
  border: 1px solid var(--control-line);
  border-radius: 10px;
  color: var(--text);
  background: var(--surface);
  box-shadow: 0 5px 22px #2428262b;
}
.page-files-menu h2 {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 500;
}
.page-files-menu label {
  display: grid;
  gap: 6px;
  font-size: 13px;
}
.page-files-menu input[type=file] {
  width: 100%;
  min-width: 0;
  font: inherit;
}
.page-files-menu .file-list {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
}
.page-files-menu [role=status] {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--muted);
}
.page-files-menu [role=status]:empty {
  display: none;
}
.page-files-menu .attachment-block + .attachment-block {
  border-top: 1px solid var(--line);
}
.page-files-menu .attachment-block :is(img, video) {
  max-height: 140px;
}
.page-files-trigger::after {
  content: "\2039";
  float: right;
  font-size: 16px;
}
.page-action-notice {
  position: absolute;
  z-index: 5;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  max-width: calc(100% - 32px);
  margin: 0;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 4px 16px #0002;
  font-size: 13px;
}
.page-action-notice:empty {
  display: none;
}
.attachment-block {
  padding: 8px 0;
  overflow-wrap: anywhere;
}
.attachment-block img,
.attachment-block video,
.attachment-block audio {
  display: block;
  margin-top: 6px;
  max-width: 100%;
}
.attachment-block img,
.attachment-block video {
  max-height: 320px;
  object-fit: contain;
}
.editor-file-block {
  margin: 4px 0;
  width: var(--attachment-width, 480px);
  min-width: 0;
  max-width: 100%;
}
.editor-file-block[data-align=center] {
  margin-inline: auto;
}
.editor-file-block[data-align=right] {
  margin-left: auto;
}
.ProseMirror [data-block-children] > .editor-file-block:not(:first-child) {
  max-width: calc(100% - 30px);
}
.ProseMirror [data-block-children] > .editor-file-block:is([data-align=center], [data-align=right]) {
  margin-inline-start: auto;
}
.editor-file-label {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 44px;
  padding: 8px 14px;
  border: 0;
  border-radius: 8px;
  background: var(--subtle);
  color: var(--muted);
  text-align: start;
  font: inherit;
  font-size: 14px;
  overflow-wrap: anywhere;
}
button.editor-file-label {
  cursor: pointer;
}
a.editor-file-label {
  color: var(--text);
  text-decoration: none;
}
.editor-file-label:is(a, button):hover {
  background: var(--hover);
}
.editor-file-icon {
  flex: none;
  width: 18px;
  font-size: 18px;
  text-align: center;
}
.editor-file-block :is(img, audio, video) {
  display: block;
  margin-top: 6px;
  max-width: 100%;
}
.editor-file-block :is(img, video) {
  max-height: 320px;
  object-fit: contain;
}
.file-preview-open {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 0;
  margin-top: 4px;
  border: 0;
  border-radius: 6px;
  background: var(--subtle);
  color: var(--text);
  font: inherit;
  cursor: zoom-in;
}
.file-preview-open img {
  max-height: none;
  height: auto;
  margin: 0 auto;
}
.file-preview-open:has(img[hidden]) {
  min-height: min(160px, 25vh);
}
.file-preview-caption {
  display: block;
  margin: 0;
  padding: 8px;
  font-size: 13px;
  color: var(--muted);
}
.file-preview-open [hidden] {
  display: none;
}
.file-preview-grid {
  display: block;
  overflow: hidden;
  text-align: start;
  font-size: 12px;
}
.file-preview-grid > span {
  display: flex;
}
.file-preview-cell {
  flex: 1 0 90px;
  min-height: 24px;
  padding: 4px 6px;
  border: 1px solid var(--control-line);
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}
.attachment-viewer {
  box-sizing: border-box;
  width: min(1440px, calc(100vw - 24px));
  height: calc(100dvh - 24px);
  max-width: none;
  max-height: none;
  padding: 0;
  border: 1px solid var(--control-line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  overflow: hidden;
}
.attachment-viewer::backdrop {
  background: rgb(0 0 0 / 68%);
}
.attachment-viewer-surface {
  position: relative;
  height: 100%;
  overflow: hidden;
}
.attachment-viewer-surface:fullscreen {
  width: 100%;
  height: 100%;
  background: #161616;
}
.attachment-viewer-stage {
  display: block;
  height: 100%;
  padding: 56px 12px 12px;
  overflow: auto;
  overscroll-behavior: contain;
}
.attachment-viewer-content {
  display: block;
  width: auto;
  height: auto;
  max-width: none;
  margin: auto;
  object-fit: contain;
}
.attachment-viewer-content[hidden],
.attachment-viewer-toolbar [hidden] {
  display: none;
}
.attachment-sheet {
  border-collapse: collapse;
  margin: 0 auto;
  font-size: calc(13px * var(--attachment-zoom, 1));
}
.attachment-sheet :is(td, th) {
  border: 1px solid var(--control-line);
  padding: .4em .6em;
  min-width: 6.5em;
  text-align: start;
  white-space: pre;
}
.attachment-sheet thead th {
  position: sticky;
  top: 0;
  background: var(--subtle);
}
.attachment-sheet tbody th {
  position: sticky;
  left: 0;
  background: var(--subtle);
}
.attachment-sheet th:first-child {
  min-width: auto;
}
.attachment-viewer-status {
  padding: 8px 12px;
  text-align: center;
}
.attachment-viewer-status:empty {
  display: none;
}
.attachment-viewer-toolbar {
  position: absolute;
  z-index: 1;
  inset: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 4px;
  padding: 4px;
  background: var(--surface);
  border-bottom: 1px solid var(--control-line);
  transition: opacity .16s;
}
.attachment-viewer-toolbar :is(button, a, select) {
  padding: 4px 8px;
  min-height: 36px;
  border: 1px solid var(--control-line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 13px;
}
.attachment-viewer-toolbar a {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.attachment-viewer-idle .attachment-viewer-toolbar:not(:focus-within):not(:hover) {
  opacity: 0;
}
.attachment-viewer-presenting .attachment-viewer-stage {
  padding: 0;
}
@media (max-width: 600px) {
  .attachment-viewer {
    width: 100vw;
    height: 100dvh;
    border-radius: 0;
  }
  .attachment-viewer-stage {
    padding-top: 96px;
  }
  .attachment-viewer-toolbar :is(button, a, select) {
    min-height: 44px;
  }
}
.file-block-popup {
  position: fixed;
  z-index: 110;
  width: min(272px, var(--editor-visible-width, 272px));
  max-height: var(--editor-visible-height, calc(100dvh - 16px));
  overflow: auto;
  overscroll-behavior: contain;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--control-line);
  border-radius: 10px;
  box-shadow: 0 8px 20px rgb(0 0 0 / 10%);
  font-size: 13px;
}
.file-block-tabs {
  display: flex;
  gap: 12px;
  padding-inline: 14px;
  border-bottom: 1px solid var(--control-line);
}
.file-block-tabs [role=tab] {
  min-height: 35px;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 4px 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  cursor: pointer;
}
.file-block-tabs [aria-selected=true] {
  color: var(--text);
  border-bottom-color: currentColor;
}
.file-block-panel {
  padding: 10px 7px;
}
.file-block-panel input[type=url] {
  display: block;
  width: 100%;
  min-width: 0;
  margin-bottom: 8px;
  min-height: 26px;
  border: 1px solid var(--control-line);
  border-radius: 5px;
  padding-inline: 6px;
  color: var(--text);
  background: var(--surface);
  font: inherit;
}
.file-block-action {
  display: block;
  width: 100%;
  min-height: 26px;
  padding: 4px;
  font: inherit;
  font-weight: 600;
  border: 0;
  border-radius: 5px;
  color: var(--on-accent);
  background: var(--accent);
  cursor: pointer;
}
.file-block-action[aria-disabled=true] {
  opacity: .65;
  cursor: default;
}
.file-block-panel button:last-child:not(:first-child) {
  margin-top: 4px;
}
.file-block-popup [role=status] {
  margin: 0;
  padding: 0 8px 8px;
  color: var(--muted);
}
.file-block-link-hint {
  margin: 9px 2px 0;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}
@media (pointer: coarse) {
  .file-block-tabs [role=tab],
  .file-block-action,
  .file-block-panel input[type=url] {
    min-height: 44px;
  }
  .file-block-tabs [role=tab] {
    min-width: 44px;
  }
  .file-block-panel input[type=url] {
    font-size: 16px;
  }
}
.attachment-name,
.page-reference,
.external-link,
.link-card a,
.backlink-list a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.page-reference[data-reference-unavailable] {
  color: var(--muted);
  text-decoration-style: dashed;
}
.link-card {
  padding: 8px;
  border: 1px solid var(--control-line);
  border-radius: 5px;
  overflow-wrap: anywhere;
}
.block-anchor {
  display: inline-block;
  width: 0;
}
.referenced-block,
.find-match {
  background: var(--find-highlight);
}
.find-match.is-current {
  background: var(--find-current);
}
.discussion-dialog {
  width: min(580px, calc(100% - 2 * var(--surface-edge-inset)));
  max-height: 85dvh;
}
.discussion-dialog h2 {
  margin: 0 0 12px;
  font: 600 16px/22px system-ui;
}
.discussion-list {
  display: grid;
  gap: 10px;
  margin: 10px 0;
}
.discussion-thread {
  border: 1px solid var(--line);
  padding: 10px;
  border-radius: 6px;
}
.discussion-thread-header {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.discussion-thread-header span:not(.person-icon),
.discussion-status,
.discussion-empty {
  color: var(--muted);
  font-size: 14px;
}
.discussion-message {
  font-size: 14px;
  padding-top: 8px;
  overflow-wrap: anywhere;
}
.discussion-message p {
  white-space: pre-wrap;
  margin: 4px 0;
}
.discussion-composer {
  display: grid;
  justify-items: start;
  gap: 6px;
  margin: 8px 0;
}
.discussion-composer textarea {
  width: 100%;
  font: inherit;
  color: inherit;
  border: 1px solid var(--control-line);
  border-radius: 5px;
  padding: 7px;
  resize: vertical;
}
.mention-picker {
  width: 100%;
}
.mention-picker summary {
  width: fit-content;
  cursor: pointer;
  font-size: 14px;
}
.mention-picker > :is(input, select, label, button, span) {
  margin: 6px 6px 0 0;
  max-width: 100%;
}
.mention-picker :is(input, select) {
  font: inherit;
}
.mention-reminder {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.mention-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.mention-chip {
  background: var(--hover);
  border-radius: 4px;
  padding: 2px 6px;
  color: inherit;
  overflow-wrap: anywhere;
}
.ProseMirror .mention-chip[data-mention-kind=person] {
  padding: 0;
  background: transparent;
  color: light-dark(#1769aa, #83bfff);
  font-weight: 650;
}
.editor-mention-popup {
  width: min(320px, var(--editor-visible-width, calc(100vw - 16px)));
}
.editor-mention-popup small,
.editor-mention-popup .mention-status {
  color: var(--muted);
}
.editor-mention-popup .mention-status:not(:empty) {
  padding: 5px 8px;
}
[data-text-highlight] .mention-chip {
  background: transparent;
}
.history-dialog {
  width: min(640px, calc(100% - 32px));
  max-height: 85dvh;
}
.history-versions {
  display: grid;
  gap: 6px;
  padding-inline-start: 20px;
}
.history-versions button {
  text-align: start;
  overflow-wrap: anywhere;
}
.history-preview {
  margin-block: 12px;
  overflow-wrap: anywhere;
}
.history-content {
  white-space: pre-wrap;
  margin-block-end: 12px;
}
:is(.paper, .database-peek-content)[data-small-text=true] .ProseMirror {
  font-size: 14px;
}
:is(.paper, .database-peek-content)[data-small-text=true] .page-title {
  font-size: 32px;
}
:is(.paper, .database-peek-content)[data-small-text=true] .ProseMirror h2 {
  font-size: 21px;
}
.page-discussions {
  margin-block-start: 32px;
  padding-block-start: 16px;
  border-block-start: 1px solid var(--line);
  font-size: 14px;
}
.page-discussions > .discussion-list:empty,
.page-discussions > .discussion-status:empty {
  display: none;
}
.page-discussions > .discussion-list {
  margin: 0 0 12px;
}
.page-discussions .discussion-thread {
  padding: 0;
  border: 0;
}
.page-discussions .discussion-thread-header {
  justify-content: flex-end;
}
.page-discussions .discussion-thread-header:empty {
  display: none;
}
.page-discussions .discussion-thread-header button {
  border-color: transparent;
  color: var(--muted);
}
.page-discussions .discussion-thread-header button:hover {
  background: var(--hover);
}
.page-discussions .page-discussion-composer {
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: start;
  gap: 9px;
}
.page-discussions .page-composer-avatar {
  justify-self: center;
}
.page-discussion-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 4px;
  width: 100%;
  min-height: 66px;
  align-content: start;
  padding: 7px 8px;
  border: 1px solid var(--control-line);
  border-radius: 4px;
}
.page-discussion-field:focus-within {
  border-color: var(--strong-line);
}
.page-discussion-field > textarea,
.discussion-dialog > div > .page-discussion-composer > textarea {
  resize: vertical;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: 14px;
}
.page-discussion-field > textarea {
  grid-row: 1;
}
.page-discussion-field > .mention-list {
  grid-row: 2;
}
.page-discussion-field > .mention-list:empty {
  display: none;
}
.discussion-composer,
.page-discussion-field {
  position: relative;
}
.comment-mention-popup {
  position: absolute;
  z-index: 5;
  inset-block-start: 100%;
  inset-inline-start: 0;
  width: min(320px, 100%);
  box-sizing: border-box;
  max-height: 230px;
  overflow-y: auto;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 4px;
  box-shadow: 0 4px 16px #0002;
  font: 14px/20px system-ui;
}
.comment-mention-popup.opens-above {
  inset-block-start: auto;
  inset-block-end: 100%;
}
.comment-mention-popup[hidden] {
  display: none;
}
.comment-mention-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 8px;
  border-radius: 4px;
  cursor: pointer;
  overflow-wrap: anywhere;
}
.comment-mention-option:is([aria-selected=true], :hover) {
  background: var(--hover);
}
.comment-mention-option small {
  flex: none;
  white-space: nowrap;
}
.comment-mention-option small,
.comment-mention-popup .mention-status {
  color: var(--muted);
}
.comment-mention-popup .mention-status:not(:empty) {
  display: block;
  padding: 5px 8px;
}
.ProseMirror .has-inline-comments {
  position: relative;
}
.comment-source {
  background: light-dark(#fff2bf, #51451d);
  text-decoration: underline;
  text-decoration-color: #d7b44d;
  text-underline-offset: 3px;
}
.inline-comment-trigger {
  position: absolute;
  inset-inline-start: calc(100% + 16px);
  top: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  padding: 2px;
  font: 13px/20px system-ui;
  white-space: normal;
  cursor: pointer;
}
.inline-comment-trigger:hover {
  background: var(--hover);
}
.inline-comment-count {
  white-space: nowrap;
}
.inline-comment-card {
  display: none;
}
.has-comment-cards .inline-comment-trigger {
  inset-inline-start: calc(100% + 41px);
  top: -6px;
  width: 308px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  background: var(--surface);
  text-align: start;
}
.has-comment-cards .inline-comment-count {
  display: none;
}
.has-comment-cards .inline-comment-card {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 8px;
  padding: 12px;
  min-height: 72px;
  font-size: 14px;
  line-height: 20px;
}
.discussion-byline {
  display: flex;
  align-items: center;
  gap: 8px;
}
.inline-comment-card strong,
.inline-comment-card > span > span {
  display: block;
  overflow-wrap: anywhere;
}
.inline-comment-card strong {
  font-weight: 600;
}
@media (max-width: 800px) {
  .inline-comment-trigger {
    inset-inline-start: calc(100% + 4px);
    font-size: 12px;
  }
}
.page-inline-trigger {
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: start;
  font: inherit;
  font-size: 14px;
  padding-inline: 0;
}
.page-inline-trigger::after {
  content: "\2039";
  margin-inline-start: auto;
}
.page-inline-menu {
  position: fixed;
  z-index: 90;
  width: min(240px, var(--editor-visible-width, calc(100vw - 16px)));
  max-height: var(--editor-visible-height, calc(100dvh - 16px));
  overflow: auto;
  padding: 3px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 7px;
  box-shadow: 0 4px 18px #0002;
}
.page-inline-option {
  display: flex;
  align-items: center;
  width: 100%;
  height: 29px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: inherit;
  padding: 0 9px;
  font: 14px/1.2 system-ui;
}
.page-inline-option:hover {
  background: var(--hover);
}
.page-inline-option[aria-checked=true]::after {
  content: "\2713";
  margin-inline-start: auto;
}
.inline-comment-count {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.inline-comment-count svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
}
.page-discussion-composer {
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 8px;
}
.page-discussion-composer > :is(textarea, .mention-picker, .mention-list) {
  grid-column: 2;
}
.page-discussion-composer > .mention-list:empty {
  display: none;
}
.page-discussion-composer svg {
  display: block;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.page-composer-avatar {
  grid-column: 1;
  grid-row: 1;
}
:is(.paper, .database-peek-content)[data-small-text=true] .ProseMirror h3 {
  font-size: 18px;
}
@media (forced-colors: active) {
  .comment-source {
    background: Highlight;
    color: HighlightText;
    text-decoration-color: HighlightText;
  }
}
@media (max-width: 800px) {
  .ProseMirror .has-inline-comments {
    padding-inline-end: 44px;
  }
  .inline-comment-trigger {
    inset-inline-start: auto;
    inset-inline-end: 0;
  }
}
.ProseMirror :is(td, th) .has-inline-comments {
  padding-inline-end: 44px;
}
.ProseMirror :is(td, th) .inline-comment-trigger {
  inset-inline-start: auto;
  inset-inline-end: 0;
}
.page-discussion-composer textarea:focus {
  outline: none;
}
:root[data-contrast=high] .page-discussion-composer:has(textarea:focus-visible) {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}
@media (prefers-contrast: more) {
  :root[data-contrast=system] .page-discussion-composer:has(textarea:focus-visible) {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
  }
}
@media (forced-colors: active) {
  .page-discussion-composer:has(textarea:focus-visible) {
    outline: 2px solid Highlight;
    outline-offset: 2px;
  }
}
.has-comment-cards .ProseMirror h3 .inline-comment-trigger {
  top: -18px;
}
.anchored-discussion {
  position: fixed;
  z-index: 90;
  box-sizing: border-box;
  width: 480px;
  min-height: 148px;
  padding: 12px;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 6px 24px #0002;
  font: 14px/20px system-ui;
  text-align: left;
}
.anchored-discussion[hidden] {
  display: none;
}
.anchored-discussion .discussion-list {
  display: grid;
  gap: 16px;
  margin: 0;
}
.anchored-discussion .discussion-thread {
  padding: 0;
  border: 0;
  margin: 0;
}
.anchored-discussion .discussion-thread-header {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  min-height: 24px;
}
.anchored-discussion .discussion-thread-header button {
  font: inherit;
  padding: 1px 5px;
  min-height: 24px;
}
.anchored-discussion .discussion-source-quote {
  margin: 4px 0 6px 36px;
  padding-left: 10px;
  border-left: 2px solid #e6ba57;
  color: var(--muted);
}
.anchored-discussion .discussion-message {
  padding: 0 0 8px 36px;
}
.anchored-discussion .discussion-message strong {
  font-size: 14px;
  font-weight: 600;
}
.anchored-discussion .discussion-message p {
  margin: 2px 0 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.anchored-discussion .discussion-status:empty {
  display: none;
}
.anchored-discussion .page-discussion-composer {
  align-items: start;
  margin: 6px 0 0;
  padding: 0;
  border: 0;
}
.anchored-discussion .page-discussion-composer textarea {
  width: 100%;
  box-sizing: border-box;
  min-height: 24px;
  padding: 2px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: 14px/20px system-ui;
  resize: none;
}
.anchored-discussion .discussion-discard {
  box-sizing: border-box;
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(324px, calc(100vw - 32px));
  padding: 20px;
  background: var(--surface);
  color: var(--text);
  max-height: calc(100dvh - 32px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 8px 32px #0003;
}
.anchored-discussion .discussion-discard::backdrop {
  background: #0006;
}
.anchored-discussion .discussion-discard[hidden] {
  display: none;
}
.anchored-discussion .discussion-discard p {
  margin: 0 0 14px;
  font: 600 16px/22px system-ui;
}
.anchored-discussion .discussion-discard button {
  display: block;
  width: 100%;
  height: 32px;
  margin-top: 10px;
}
.anchored-discussion .discussion-discard button:first-of-type {
  background: #bd3e3a;
  color: white;
  border-color: #bd3e3a;
}
.anchored-discussion .discussion-thread-header {
  align-items: center;
}
.anchored-discussion .discussion-author {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  font-weight: 600;
}
.anchored-discussion .discussion-more {
  position: relative;
}
.anchored-discussion .discussion-more > summary {
  list-style: none;
  cursor: pointer;
  width: 24px;
  height: 24px;
  text-align: center;
}
.anchored-discussion .discussion-more > summary::-webkit-details-marker {
  display: none;
}
.anchored-discussion .discussion-more-menu {
  position: absolute;
  z-index: 2;
  right: 0;
  width: 200px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  box-shadow: 0 4px 16px #0002;
}
.anchored-discussion .discussion-more-menu > button {
  display: block;
  width: 100%;
  min-height: 30px;
  border: 0;
  text-align: left;
}
.anchored-discussion .discussion-time {
  color: var(--muted);
  font-size: 14px;
}
.anchored-discussion .discussion-source-quote {
  overflow-wrap: anywhere;
}
.anchored-discussion .discussion-discard[open] {
  display: grid;
  gap: 10px;
}
.anchored-discussion .discussion-discard p {
  margin: 0;
  line-height: 20px;
}
.anchored-discussion .discussion-discard button {
  margin: 0;
}
.anchored-discussion .discussion-discard p {
  text-align: center;
}
.anchored-discussion .discussion-discard button {
  font: 500 14px/20px system-ui;
}
.anchored-discussion .discussion-author {
  flex: 0 1 auto;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.anchored-discussion .discussion-time {
  margin-right: auto;
  white-space: nowrap;
}
.ProseMirror [data-block-color] {
  border-radius: 3px;
}
.ProseMirror .editor-callout[data-block-color] {
  border-radius: 10px;
}
.ProseMirror .editor-callout[data-text-color] > .editor-callout-symbol {
  color: inherit;
}
.ProseMirror li[data-text-highlight] {
  position: relative;
  isolation: isolate;
  background-color: transparent;
}
.ProseMirror li[data-text-highlight]::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 0 0 -32px;
  border-radius: 3px;
  background-color: var(--text-highlight);
  pointer-events: none;
}
.ProseMirror [data-block-children][data-text-color] > :first-child {
  color: inherit;
}
.ProseMirror :is(ul, ol) {
  padding-left: 32px;
}
.ProseMirror li {
  padding-block: 1px;
}
.ProseMirror li::before {
  inset-inline-start: -32px;
}
.ProseMirror .editor-callout {
  line-height: 1.625;
}
.ProseMirror .editor-callout > div > p {
  margin-block: 4px 14px;
}
.ProseMirror .editor-callout > div > :last-child {
  margin-bottom: 4px;
}
.ProseMirror :is(ul, ol):is(.ProseMirror-selectednode, .editor-selected-block) > li::before,
.ProseMirror li:is(.ProseMirror-selectednode, .editor-selected-block)::before {
  inset-inline-start: -32px;
}
.document-scroll:has(> .page-cover:not([hidden])) > .paper:has(> .page-decoration > .page-symbol:not([hidden])) {
  padding-top: 0;
}
.document-scroll:has(> .page-cover:not([hidden])) > .paper > .page-decoration:has(> .page-symbol:not([hidden])) {
  position: relative;
  top: -39px;
  margin-bottom: -39px;
  padding-bottom: 0;
  min-height: 114px;
}
.document-scroll:has(> .page-cover:not([hidden])) > .paper > .page-decoration > .page-symbol:not([hidden]) {
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  padding: 0;
  font-size: 78px;
  line-height: 1;
}
.document-scroll:has(> .page-cover:not([hidden])) > .paper > .page-decoration:has(> .page-symbol:not([hidden])) > .page-decoration-actions {
  position: static;
  margin-top: 8px;
  min-height: 28px;
}
.page-symbol {
  width: fit-content;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: inherit;
  cursor: pointer;
}
.page-symbol:enabled:hover {
  background: var(--hover);
}
.page-symbol:disabled {
  opacity: 1;
  cursor: default;
}
.page-symbol:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.ProseMirror .block-drag-source {
  opacity: .35;
}
.block-drag-preview.ProseMirror {
  position: fixed;
  z-index: 40;
  margin: 0;
  padding: 0;
  min-height: 0;
  max-height: 70vh;
  overflow: hidden;
  opacity: .5;
  pointer-events: none;
  user-select: none;
  background: transparent;
}
.block-drag-preview.ProseMirror * {
  pointer-events: none !important;
}
.block-drag-preview.ProseMirror > :first-child {
  margin-top: 0;
}
.block-drag-preview.ProseMirror > :last-child {
  margin-bottom: 0;
}
.subscription-eye[aria-pressed=true] {
  color: var(--accent);
  background: var(--active-surface);
}
.subscription-eye svg {
  width: 18px;
  height: 18px;
}
.subscription-status:empty {
  display: none;
}
.subscription-status {
  max-width: 18ch;
  color: var(--muted);
  font-size: 12px;
}
.mention-picker .mention-results {
  display: block;
  width: 100%;
  max-height: 240px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.mention-picker .mention-results[hidden] {
  display: none;
}
.mention-picker .mention-results option {
  padding: 4px 6px;
}
.mention-sharing {
  margin-top: 6px;
  font-size: 14px;
}
.mention-sharing p {
  margin: 0 0 6px;
}
.mention-sharing .session-button,
.history-versions .session-button + .session-button {
  margin-inline-start: 4px;
}
.inbox-details {
  margin: 4px 0;
  color: var(--muted);
  font-size: 13px;
}
.discovery-dialog {
  max-height: calc(100dvh - 32px);
  overflow: auto;
  padding: 18px;
  border-radius: 10px;
}
.discovery-dialog > h2 {
  font-size: 15px;
  font-weight: 500;
  margin: 0 0 14px;
  color: var(--muted);
}
.discovery-dialog > input {
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  font-size: 18px;
  padding: 8px 0 14px;
}
.search-group > ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.search-group > h3 {
  margin: 10px 8px 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}
.search-hit-title {
  font-weight: 400;
  color: var(--text) !important;
  font-size: 14px !important;
}
.discovery-hit strong {
  font-weight: 650;
  color: var(--text);
}
.search-hit-snippet {
  display: block;
  line-height: 1.45;
}
.search-kind,
.search-origin,
.search-similarity,
.search-scope-notice {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}
.search-scope-notice {
  margin: 7px 0;
}
.search-field-label {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin: 8px 0 3px;
}
.search-more {
  background: transparent;
  border: 0;
  border-radius: 4px;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  padding: 7px 9px;
  cursor: pointer;
}
.search-more:hover {
  background: var(--hover);
  color: var(--text);
}
.search-preview {
  border-color: var(--line);
  border-radius: 6px;
}
.search-preview-header {
  min-height: 38px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.search-preview-content {
  padding: 18px;
}
@media (max-width: 899px) {
  .discovery-with-preview .discovery-body {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }
  .discovery-with-preview .discovery-results {
    max-height: min(240px, 30dvh);
  }
  .discovery-with-preview .search-preview {
    height: min(300px, 35dvh);
  }
}
.discovery-dialog.discovery-with-preview .discovery-status {
  min-height: 1.5em;
  margin-block: 8px;
}
.discovery-with-preview .discovery-body {
  height: min(432px, 55dvh);
}
@media (max-width: 899px) {
  .discovery-with-preview .discovery-body {
    height: min(540px, 60dvh);
    grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
  }
  .discovery-with-preview :is(.discovery-results, .search-preview) {
    height: 100%;
    max-height: 100%;
  }
}
.comment-draft-note {
  color: var(--muted);
  overflow-wrap: anywhere;
}
.comment-attachment-link {
  overflow-wrap: anywhere;
}
.comment-attachment-link {
  display: block;
  margin-top: 6px;
}
.editor-panel {
  position: relative;
  border-radius: 4px;
  min-width: 0;
  color: var(--text);
}
.editor-panel > header {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  border-radius: 3px 3px 0 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.editor-panel-title {
  flex: 1;
  min-width: 0;
}
.editor-panel > .editor-panel-body {
  min-width: 0;
}
.editor-panel-body > :first-child {
  margin-top: 0;
}
.editor-panel-body > :last-child {
  margin-bottom: 0;
}
.editor-panel :is(.editor-panel-icon, .editor-panel-trigger),
.editor-callout > .editor-panel-trigger {
  flex: none;
  display: inline-grid;
  place-items: center;
  min-width: 26px;
  min-height: 26px;
  padding: 1px 4px;
  color: inherit;
  background: transparent;
  border: 0;
  border-radius: 5px;
}
.editor-panel-icon {
  max-width: 40%;
  font-size: 18px;
  line-height: 1.2;
}
.editor-callout:has(> .editor-panel-trigger) {
  position: relative;
}
.editor-callout > .editor-panel-trigger {
  position: absolute;
  inset-block-start: 3px;
  inset-inline-end: 4px;
}
.editor-panel-trigger {
  margin-inline-start: auto;
  font: 18px/1 system-ui, sans-serif;
  opacity: 0;
}
.editor-panel:hover > header > .editor-panel-trigger,
.editor-panel:focus-within > header > .editor-panel-trigger,
.editor-callout:is(:hover, :focus-within) > .editor-panel-trigger,
.editor-panel-trigger[aria-expanded=true] {
  opacity: 1;
}
.editor-panel button:is(.editor-panel-icon, .editor-panel-trigger):is(:hover, [aria-expanded=true]) {
  background: color-mix(in srgb, currentColor 10%, transparent);
}
@media (hover: none) {
  .editor-panel-trigger {
    opacity: 1;
  }
}
.editor-panel-menu,
.editor-panel-symbol-picker {
  position: fixed;
  inset: auto;
  margin: 0;
  z-index: 12;
  width: min(300px, var(--editor-visible-width, calc(100vw - 16px)));
  max-height: var(--editor-visible-height, calc(100dvh - 16px));
  overflow: auto;
  overscroll-behavior: contain;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 5px 22px #2428262b;
  font:
    14px/1.4 -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    system-ui,
    sans-serif;
  text-align: start;
  white-space: normal;
}
.editor-panel-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 32px;
  padding: 2px 6px;
}
.editor-panel-field input,
.editor-panel-symbol-picker input[type=search] {
  min-width: 0;
  min-height: 28px;
  padding: 3px 7px;
  border: 1px solid var(--control-line);
  border-radius: 5px;
  background: var(--surface);
  color: var(--text);
}
.editor-panel-field input[type=text] {
  width: 60%;
}
.editor-panel-field input[type=number] {
  width: 64px;
  text-align: end;
  font-variant-numeric: tabular-nums;
}
.editor-panel-field input[type=color] {
  flex: none;
  width: 34px;
  height: 24px;
  min-height: 24px;
  padding: 2px;
  cursor: pointer;
}
.editor-panel-field input[type=color]::-webkit-color-swatch-wrapper {
  padding: 0;
}
.editor-panel-field input[type=color]::-webkit-color-swatch {
  border: 0;
  border-radius: 2px;
}
.editor-panel-symbol-picker input[type=search] {
  width: 100%;
}
.editor-panel-symbol-picker .page-symbol-options {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-block: 8px 0;
}
.editor-panel-symbol-picker .page-symbol-options button {
  min-height: 32px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--text);
}
.editor-panel-symbol-picker .page-symbol-options button:is(:hover, :focus-visible, [aria-pressed=true]) {
  background: var(--hover);
}
.editor-panel-add-icon,
.editor-panel-remove-icon,
.editor-panel-reset {
  display: block;
  width: 100%;
  min-height: 30px;
  padding: 4px 6px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--text);
  text-align: start;
}
.editor-panel-add-icon:hover,
.editor-panel-remove-icon:hover,
.editor-panel-reset:hover {
  background: var(--hover);
}
.editor-panel-reset {
  margin-top: 6px;
  color: var(--muted);
}
.editor-column-spacing {
  position: absolute;
  right: 0;
  top: -22px;
  z-index: 6;
  opacity: 0;
  font: 12px system-ui;
}
.editor-columns:hover > .editor-column-spacing,
.editor-column-spacing:focus {
  opacity: 1;
}
.editor-table-sort {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  font: 12px/1.4 system-ui;
  margin-bottom: 4px;
}
.editor-table-sort button {
  font: inherit;
  color: var(--text-muted, #787774);
  border: 0;
  border-radius: 4px;
  padding: 3px 6px;
  background: transparent;
  cursor: pointer;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.editor-table-sort button:hover {
  background: #8881;
  color: var(--text, #37352f);
}
.editor-table-sort button:disabled {
  cursor: not-allowed;
}
.editor-table-projection {
  overflow-x: auto;
  user-select: text;
}
.editor-table-sort-hint {
  font: 12px/1.4 system-ui;
  color: var(--text-muted, #787774);
}
.jira-reference {
  display: inline;
  position: relative;
  font-size: .9em;
  border-radius: 4px;
  padding: 1px 3px;
  background: #8881;
}
.jira-reference > a {
  color: inherit;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.jira-reference > a:hover {
  text-decoration: underline;
}
.jira-status {
  display: inline;
  padding: 1px 4px;
  margin-left: 4px;
  border-radius: 3px;
  background: #e9e9e7;
  color: #555;
  font-size: .85em;
}
.jira-status[data-category=done] {
  background: #dbeddb;
  color: #315b37;
}
.jira-status[data-category=indeterminate] {
  background: #d3e5ef;
  color: #295770;
}
.jira-reference > details {
  display: inline;
}
.jira-reference summary {
  display: inline;
  cursor: pointer;
  padding: 1px 4px;
  list-style: none;
}
.jira-menu {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 20;
  width: min(280px, 80vw);
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: var(--surface, white);
  box-shadow: 0 4px 20px #0002;
  font: 13px/1.4 system-ui;
}
.jira-menu input,
.jira-menu button {
  font: inherit;
  padding: 5px 7px;
  min-width: 0;
}
.jira-menu [hidden] {
  display: none;
}
.jira-notice {
  color: var(--text-muted, #787774);
}
.editor-table-sort {
  position: absolute;
  inset: 0;
  z-index: 8;
  pointer-events: none;
  margin: 0;
}
.editor-table-sort button[data-sort-column] {
  position: absolute;
  padding: 2px;
  width: 20px;
  height: 22px;
  background: var(--surface, #fff);
  opacity: 0;
  pointer-events: none;
}
.editor-table-sort button[data-sort-column]:is([data-pointed], :focus-visible) {
  opacity: 1;
  pointer-events: auto;
}
.editor-table-sort button.editor-table-sort-clear {
  position: absolute;
  right: 0;
  top: -24px;
  pointer-events: auto;
  background: var(--surface, #fff);
}
.editor-table-projection th {
  padding-right: 25px;
}

/* src/client/coordination.css */
.object-presence {
  position: relative;
  display: flex;
  align-items: center;
  gap: 5px;
  flex: none;
  min-height: 30px;
}
.object-presence[hidden] {
  display: none;
}
.presence-people {
  display: flex;
  align-items: center;
  gap: 3px;
}
.person-icon {
  box-sizing: border-box;
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 1px solid var(--surface);
  border-radius: 50%;
  background: var(--person-color);
  color: white;
  font: 600 10px/1 system-ui;
}
.presence-avatar {
  cursor: pointer;
}
.presence-avatar:hover,
.presence-avatar:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}
.presence-stack {
  border: 0;
  border-radius: 4px;
  background: var(--hover);
  color: inherit;
  padding: 5px;
  white-space: nowrap;
}
.presence-stacked:not(.presence-open) .presence-people {
  max-width: 68px;
  pointer-events: none;
  overflow: hidden;
}
.presence-stacked:not(.presence-open) .presence-avatar {
  margin-left: -18px;
}
.presence-stacked:not(.presence-open) .presence-avatar:first-child {
  margin-left: 0;
}
.presence-stacked.presence-open .presence-people {
  position: absolute;
  right: 0;
  top: 100%;
  z-index: 90;
  padding: 12px;
  width: max-content;
  max-width: min(290px, 90vw);
  flex-wrap: wrap;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 5px 20px #0002;
}
.presence-person-menu {
  position: absolute;
  z-index: 91;
  right: 0;
  top: calc(100% + 52px);
  padding: 5px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 5px 20px #0002;
  min-width: 160px;
}
.presence-person-menu button {
  border: 0;
  padding: 6px 9px;
  width: 100%;
  color: inherit;
  background: transparent;
  text-align: left;
}
.presence-person-menu button:hover {
  background: var(--hover);
}
.presence-connection {
  font-size: 11px;
  max-width: 95px;
  color: var(--muted);
}
.coordination-locked {
  color: light-dark(#62615f, #aaa9a6) !important;
  background: light-dark(#f5f5f4, #2b2b2a);
  user-select: none !important;
  -webkit-user-select: none !important;
  cursor: not-allowed;
}
.coordination-locked * {
  user-select: none !important;
  -webkit-user-select: none !important;
}
.remote-caret {
  border-color: var(--person-color,#6050a6);
  border-color: light-dark(var(--person-color,#6050a6), color-mix(in srgb, var(--person-color,#6050a6), white 55%));
}
.remote-caret > span::before {
  background: var(--person-color,#6050a6);
}
.coordination-draft {
  margin: 12px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  background: var(--surface);
}
.coordination-draft textarea {
  display: block;
  width: 100%;
  min-height: 120px;
  margin: 8px 0;
  padding: 8px;
  resize: vertical;
  color: inherit;
  background: var(--surface);
  border: 1px solid var(--line);
}
.coordination-draft button {
  margin-right: 8px;
}
@media (max-width: 600px) {
  .object-presence {
    gap: 2px;
  }
  .presence-connection {
    max-width: 60px;
  }
}
.presence-stacked {
  width: 158px;
}
.presence-stacked .presence-stack {
  flex: none;
}
.presence-stacked .presence-people {
  flex: none;
}
.toolbar:has(.object-presence) {
  flex-wrap: wrap;
}
.coordination-draft,
.coordination-draft * {
  user-select: text !important;
  -webkit-user-select: text !important;
}
.coordination-discard-dialog {
  width: min(400px, calc(100vw - 32px));
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: var(--surface);
  box-shadow: 0 12px 48px #0003;
}
.coordination-discard-dialog::backdrop {
  background: #0005;
}
.coordination-discard-dialog h2 {
  margin: 0 0 12px;
  font-size: 18px;
}
.coordination-discard-dialog p {
  line-height: 1.5;
  margin-bottom: 22px;
}
.coordination-discard-dialog button {
  padding: 7px 12px;
  margin-right: 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: inherit;
  background: transparent;
}
.coordination-discard-dialog button.danger {
  color: var(--danger);
}
.presence-close {
  border: 0;
  border-radius: 4px;
  padding: 5px 7px;
  background: var(--hover);
  color: inherit;
  font: 12px/1.2 system-ui;
}
.presence-close:hover {
  background: var(--line);
}

/* src/client/pwa.css */
.pwa-status {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}
.pwa-setting {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.pwa-setting > span {
  min-width: 0;
}
.pwa-setting small {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
}
.pwa-setting input[type=checkbox] {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
}
.pwa-settings h3 {
  margin-bottom: 8px;
}
.pwa-settings fieldset {
  border: 0;
  padding: 0;
  margin: 18px 0;
  min-width: 0;
}
.pwa-settings legend {
  font-weight: 600;
  padding: 0;
  margin-bottom: 6px;
}
.pwa-settings input:not([type=checkbox]),
.pwa-settings select {
  max-width: 100%;
  min-height: 36px;
  font: inherit;
  background: var(--surface);
  color: inherit;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 6px 8px;
  box-sizing: border-box;
}
.pwa-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}
.pwa-actions button,
.pwa-devices button,
.pwa-update button,
.pwa-offline button {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
  color: inherit;
  font: inherit;
  padding: 6px 12px;
  cursor: pointer;
}
.pwa-actions button:disabled {
  opacity: .55;
  cursor: default;
}
.pwa-quiet-times {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 12px 0;
}
.pwa-quiet-times label {
  display: grid;
  gap: 4px;
  font-size: 13px;
}
.pwa-devices {
  list-style: none;
  margin: 12px 0;
  padding: 0;
}
.pwa-devices li {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.pwa-update {
  position: fixed;
  z-index: 9000;
  inset-inline: 16px;
  bottom: max(16px, env(safe-area-inset-bottom));
  margin-inline: auto;
  max-width: 440px;
  box-shadow: 0 4px 24px #0002;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface, Canvas);
  color: var(--text, CanvasText);
  padding: 16px;
}
.pwa-update p {
  margin: 0 0 10px;
  line-height: 1.5;
}
.pwa-update[hidden],
.pwa-offline[hidden] {
  display: none;
}
.pwa-offline {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: grid;
  place-items: center;
  background: var(--surface, Canvas);
  color: var(--text, CanvasText);
  padding: max(24px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left));
}
.pwa-offline > section {
  max-width: 400px;
  line-height: 1.6;
}
.pwa-offline h2 {
  font-size: 24px;
}
.session-draft-dialog {
  width: min(440px, calc(100vw - 32px));
  box-sizing: border-box;
  line-height: 1.5;
}
.session-draft-dialog h2 {
  font-size: 20px;
  margin: 0 0 12px;
}
.session-draft-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}
.session-draft-actions .session-button {
  font: inherit;
  font-size: 14px;
  min-height: 36px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
  color: var(--text);
}
.session-draft-actions .session-button:hover {
  background: var(--hover);
}
.session-draft-actions .danger {
  color: var(--danger);
}
@media (pointer: coarse) {
  .session-draft-actions .session-button {
    min-height: 44px;
  }
  .pwa-actions button,
  .pwa-devices button,
  .pwa-update button,
  .pwa-offline button,
  .pwa-setting {
    min-height: 44px;
  }
  .pwa-settings input:not([type=checkbox]),
  .pwa-settings select {
    min-height: 44px;
    font-size: 16px;
  }
}
@media (pointer: coarse) {
  html .shell {
    padding-top: env(safe-area-inset-top);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
    box-sizing: border-box;
  }
  html .document-scroll {
    scroll-padding-bottom: max(24px, env(safe-area-inset-bottom));
  }
  html .paper {
    padding-bottom: max(90px, calc(70px + env(safe-area-inset-bottom)));
  }
  html .toolbar {
    flex-wrap: wrap;
  }
  html .sidebar {
    padding-bottom: env(safe-area-inset-bottom);
  }
  html dialog[open]:not(.page-cover-dialog):not(.attachment-viewer) {
    max-height: calc(100dvh - max(16px, env(safe-area-inset-top)) - max(16px, env(safe-area-inset-bottom)));
    max-width: calc(100vw - max(16px, env(safe-area-inset-left)) - max(16px, env(safe-area-inset-right)));
    overscroll-behavior: contain;
  }
  html dialog.access-dialog {
    overflow: auto;
  }
  html :is(.toolbar, .navigation, .personal-settings-menu, .personal-settings-body, .access-dialog, .project-card-dialog, .hierarchy-tools, .hierarchy-controls, .hierarchy-dialog, .block-menu, .editor-format-types, .editor-cell-menu-actions, .editor-cell-palette, .editor-table-menu) :is(button, summary) {
    min-height: 44px;
  }
  html :is(.toolbar, .navigation) .icon-button,
  html .hierarchy-tool,
  html .hierarchy-card-menu {
    min-width: 44px;
    min-height: 44px;
  }
  html .hierarchy-column-heading {
    padding-inline-end: 48px;
    min-height: 44px;
  }
  html .hierarchy-card .project-card-heading {
    padding-inline-end: 44px;
  }
  html .project-card-dialog input:not([type=checkbox]),
  html :is(.personal-settings, .access-dialog, .hierarchy-dialog, .block-menu, .discovery-dialog) :is(input:not([type=checkbox]):not([type=radio]), select, textarea) {
    font-size: 16px;
  }
  html .personal-settings-tabs button {
    flex-shrink: 0;
  }
  html .hierarchy-lane > .hierarchy-lane-create,
  html .hierarchy-swimlane-cell .hierarchy-lane-create {
    opacity: 1;
    pointer-events: auto;
    min-height: 44px;
  }
  html .project-database .database-row-actions,
  html .project-card-actions > summary,
  html .editor-synced-actions {
    opacity: 1;
    pointer-events: auto;
  }
  html .editor-format > button {
    height: 44px;
  }
  html .block-controls {
    flex-direction: column;
    align-items: flex-end;
  }
  html .block-controls button,
  html .block-controls .block-grip,
  html .block-controls-list button:first-child {
    width: 44px;
    min-width: 44px;
    height: 44px;
    flex-shrink: 0;
  }
  html .editor-cell-grip,
  html .editor-cell-grip[data-side=left] {
    width: 32px;
    height: 32px;
  }
  html .editor-table-options summary {
    min-width: 44px;
    min-height: 44px;
  }
  html .project-peek .database-peek-bar {
    flex-wrap: wrap;
  }
  html .attachment-viewer-toolbar {
    opacity: 1;
  }
  html .hierarchy-menu-items {
    white-space: normal;
  }
  html .hierarchy-board {
    -webkit-overflow-scrolling: touch;
  }
}
@media (pointer: coarse) and (max-width: 600px) {
  html .paper .editor-mount:has(.block-controls) {
    margin-inline-start: 44px;
  }
  html .personal-settings {
    height: min(92dvh, 740px);
  }
  html .personal-settings-menu {
    max-height: 34dvh;
  }
  html .personal-settings-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
  }
  html .pwa-setting {
    flex-wrap: wrap;
  }
  html .pwa-setting > input[type=text] {
    width: 100%;
  }
}

/* src/client/projects.css */
.project-setup {
  box-sizing: border-box;
  width: min(380px, calc(100vw - 32px));
  margin: auto;
  padding: 20px;
  border: 1px solid var(--border, #e9e9e7);
  border-radius: 10px;
  color: var(--text, #37352f);
  background: var(--paper, white);
  box-shadow: 0 16px 48px #0002;
  font:
    14px/1.5 -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}
.project-setup::backdrop {
  background: #0003;
}
.project-setup h2 {
  margin: 0 0 16px;
  font-size: 16px;
  font-weight: 600;
}
.project-setup label {
  display: grid;
  gap: 6px;
}
.project-setup input {
  box-sizing: border-box;
  width: 100%;
  padding: 7px 10px;
  border: 1px solid #d9d9d6;
  border-radius: 4px;
  background: transparent;
  color: inherit;
  font: inherit;
}
.project-setup-description {
  color: var(--muted, #787774);
  margin: 12px 0;
  font-size: 13px;
}
.project-setup-status {
  margin: 8px 0;
  font-size: 13px;
}
.project-setup-status:empty {
  display: none;
}
.project-setup-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 20px;
}
.project-setup button {
  border: 1px solid #dededb;
  border-radius: 5px;
  background: transparent;
  color: inherit;
  padding: 5px 10px;
  font: inherit;
  cursor: pointer;
}
.project-setup button:hover {
  background: #8881;
}
.project-setup .project-setup-create {
  background: var(--accent, #286557);
  border-color: transparent;
  color: white;
}
.project-setup button:disabled {
  opacity: .55;
  cursor: wait;
}
.project-setup :focus-visible {
  outline: 2px solid var(--accent, #286557);
  outline-offset: 2px;
}
.project-database {
  font-size: 14px;
  line-height: 1.5;
}
.project-database .database-heading h2 {
  font-size: 18px;
  font-weight: 600;
}
.project-database .database-heading {
  margin-bottom: 4px;
}
.project-database .database-table th {
  font-size: 14px;
  font-weight: 400;
  color: var(--muted);
}
.project-database .database-table td {
  height: 34px;
}
.project-database .database-cell-control {
  font-size: 14px;
}
.project-database .database-card {
  border-radius: 4px;
}
.project-database .database-view-tab {
  font-size: 14px;
}
.project-property-dialog {
  position: fixed;
  margin: 0;
  padding: 10px;
  max-width: calc(100vw - 24px);
  max-height: min(460px, calc(100dvh - 24px));
  overflow: auto;
  box-sizing: border-box;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 7px;
  box-shadow: 0 4px 18px #0002;
  font-size: 14px;
  line-height: 1.5;
}
.project-property-dialog::backdrop {
  background: transparent;
}
.project-property-dialog h2 {
  margin: 0 4px 8px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}
.project-property-dialog :is(input, select, button) {
  font-size: 14px;
}
.project-property-dialog .database-property-actions {
  margin-top: 8px;
}
.project-option-list {
  display: grid;
  gap: 2px;
}
.project-option-list .project-option {
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: inherit;
  padding: 6px 8px;
  min-height: 32px;
  text-align: left;
  cursor: pointer;
}
.project-option-list .project-option:is(:hover, :focus-visible) {
  background: var(--hover);
}
.project-option[aria-pressed=true]::after {
  content: "\2713";
  float: right;
}
.project-database .database-table th:first-child {
  min-width: 250px;
}
.project-database .database-entry {
  white-space: nowrap;
}
.project-database .database-row-actions {
  position: absolute;
  right: 6px;
  top: 4px;
  opacity: 0;
  background: var(--surface);
}
.project-database tr:is(:hover, :focus-within) .database-row-actions {
  opacity: 1;
}
.project-database.ProseMirror-selectednode:has(:focus) {
  outline: none;
  background: transparent;
}
.project-database .database-heading > a {
  border: 0;
  padding: 2px 4px;
  color: var(--muted);
  font-size: 12px;
}
.project-database .database-view-actions > a {
  border: 0;
  padding: 2px 4px;
  color: var(--muted);
  font-size: 12px;
}
.project-database .database-heading > a:not(:hover, :focus-visible) {
  opacity: .6;
}
.project-database > [role=tabpanel] > .session-button {
  border: 0;
  color: var(--muted);
  background: transparent;
  font-size: 13px;
}
:is(.project-database, .project-peek) .database-cell-option[data-kind=status] {
  border-radius: 12px;
}
:is(.project-database, .project-peek) .database-cell-option[data-kind=status]::before {
  content: "\25cf";
  font-size: 10px;
  margin-right: 5px;
}
:is(.project-database, .project-peek) .database-cell-option[data-kind=status][data-option="1"] {
  background: #f4e9cd;
  color: #705825;
}
:is(.project-database, .project-peek) .database-cell-option[data-kind=status][data-option="2"] {
  background: #e0ece7;
  color: #3b6854;
}
:is(.project-database, .project-peek) .database-cell-option[data-kind=select][data-option="0"] {
  background: #f4e1df;
  color: #88483f;
}
:is(.project-database, .project-peek) .database-cell-option[data-kind=select][data-option="2"] {
  background: #e0ece7;
  color: #3b6854;
}
.project-database .database-entry {
  min-height: 34px;
  padding-block: 0;
}
.project-setup .project-setup-create:hover {
  background: color-mix(in srgb, var(--accent, #286557) 88%, black);
  color: white;
}
.project-setup .project-setup-create:active {
  background: color-mix(in srgb, var(--accent, #286557) 78%, black);
  color: white;
}
.project-property-dialog .database-property-actions:empty,
.project-property-dialog .database-status:empty {
  display: none;
}
.project-property-dialog .project-picker-search {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  font: inherit;
  color: inherit;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 5px 8px;
  outline-offset: 0;
}
.project-picker-hint {
  color: var(--muted);
  font-size: 12px;
  margin: 8px 4px;
}
.project-target-picker > .project-option-list {
  max-height: min(300px, 45dvh);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.project-option-list .project-option {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}
.project-option-list .project-option[aria-pressed=true]::after {
  margin-left: auto;
}
.project-person-avatar {
  display: inline-flex;
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  background: #ebe9e5;
  color: #655f57;
  font-size: 11px;
}
.project-person-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-right: 6px;
  white-space: nowrap;
}
.project-target-picker > .project-option,
.project-date-picker > button {
  width: 100%;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  font: inherit;
  margin-top: 6px;
  padding: 7px 4px;
  cursor: pointer;
}
.project-target-picker > .project-option:hover,
.project-date-picker > button:hover {
  background: var(--hover);
}
.project-date-dialog {
  max-height: calc(100dvh - 24px);
}
.project-calendar-heading {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 12px 0 6px;
}
.project-calendar-heading > span {
  flex: 1;
  font-size: 13px;
  font-weight: 500;
}
.project-calendar-heading button {
  padding: 3px 5px;
  background: none;
  color: inherit;
  border: 0;
  border-radius: 4px;
  font: inherit;
  cursor: pointer;
}
.project-calendar-heading button:hover {
  background: var(--hover);
}
.project-calendar-weekdays,
.project-calendar-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 2px;
  text-align: center;
}
.project-calendar-weekdays {
  font-size: 12px;
  color: var(--muted);
  padding-block: 5px;
}
.project-calendar-days .project-calendar-day {
  color: inherit;
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
  min-width: 0;
  height: 30px;
  padding: 0;
  font: inherit;
  cursor: pointer;
}
.project-calendar-days .project-calendar-day[data-outside=true] {
  color: var(--muted);
  opacity: .55;
}
.project-calendar-days .project-calendar-day:hover {
  background: var(--hover);
}
.project-calendar-days .project-calendar-day[aria-current=date] {
  border-color: var(--accent);
}
.project-calendar-days .project-calendar-day[aria-pressed=true] {
  background: var(--accent);
  color: white;
  opacity: 1;
}
.project-calendar-day:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.project-time-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  border-top: 1px solid var(--line);
  margin-top: 10px;
  padding: 9px 2px;
}
.project-time-toggle input {
  accent-color: var(--accent);
}
.project-date-picker > input[type=time] {
  box-sizing: border-box;
  width: 100%;
  font: inherit;
  padding: 5px;
}
.project-database .database-board {
  gap: 12px;
  align-items: start;
}
.project-database .database-board .database-card-group {
  box-sizing: border-box;
  width: 276px;
  padding: 8px;
  border-radius: 12px;
  background: #f5f4f2;
}
.project-database .database-board .database-card-group[data-option="1"] {
  background: #f8f4e9;
}
.project-database .database-board .database-card-group[data-option="2"] {
  background: #eef5ef;
}
.project-database .database-board .database-card-group h3 {
  padding: 0 4px;
  font-weight: 500;
}
.project-database .database-board .database-card-items {
  min-height: 0;
  gap: 8px;
}
.project-database .database-card {
  position: relative;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 1px 2px #00000008;
}
.project-database .database-card:hover {
  background: color-mix(in srgb, var(--surface) 96%, var(--text));
}
.project-database .database-card-content {
  padding: 7px 10px;
}
.project-database .database-card-content .database-entry {
  min-height: 28px;
  white-space: normal;
  font-weight: 500;
}
.project-database .database-card-content .database-list-properties {
  margin-top: 3px;
}
.project-card-actions {
  position: absolute;
  top: 6px;
  right: 6px;
}
.project-card-actions > summary {
  list-style: none;
  padding: 0 5px;
  border-radius: 4px;
  background: var(--surface);
  cursor: pointer;
  opacity: 0;
}
.project-card-actions > summary::-webkit-details-marker {
  display: none;
}
.database-card:is(:hover, :focus-within) .project-card-actions > summary,
.project-card-actions[open] > summary {
  opacity: 1;
}
.project-card-actions .database-card-move-form {
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  box-shadow: 0 3px 12px #0002;
}
.project-database .project-card-dragging {
  opacity: .45;
}
.project-lane-add {
  width: 100%;
  text-align: left;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 5px;
  padding: 8px;
  margin-top: 4px;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}
.project-lane-add::before {
  content: "+";
  margin-right: 8px;
}
.project-lane-add:hover {
  background: #00000006;
}
.project-database .database-card-group .database-entry-form {
  display: grid;
  gap: 5px;
}
.project-database .database-card-group .database-entry-form[hidden] {
  display: none;
}
.project-database .database-card-group .database-entry-form input {
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}
.project-peek .database-peek-content {
  padding: 44px clamp(24px, 6vw, 76px) 32px;
  position: relative;
}
.project-peek .database-peek-content > .page-title {
  font-size: 32px;
  margin-bottom: 14px;
}
.project-peek .database-peek-properties {
  display: flex;
  gap: 26px;
  overflow-x: auto;
  padding: 12px 0 18px;
  margin: 0 0 16px;
  scroll-behavior: smooth;
}
.project-peek-property {
  min-width: max-content;
}
.project-peek-property dt {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 5px;
}
.project-peek-property dd {
  margin: 0;
}
.project-peek-value {
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 14px;
  padding: 4px 6px;
  margin-left: -6px;
  text-align: left;
  border-radius: 4px;
  min-height: 30px;
  cursor: pointer;
}
.project-peek-value:hover:not(:disabled) {
  background: var(--hover);
}
.project-peek-value:disabled {
  cursor: default;
  opacity: 1;
}
.project-property-empty {
  color: var(--muted);
}
.project-peek-details-toggle {
  font-size: 12px;
  color: var(--muted);
  border: 0;
  background: transparent;
  padding: 4px 0;
}
.project-peek-details {
  padding: 16px 0;
  margin: 0 0 20px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.project-peek-details[hidden] {
  display: none;
}
.project-peek-details .project-peek-property {
  display: grid;
  grid-template-columns: minmax(90px, 1fr) 2fr;
  gap: 12px;
  align-items: center;
  padding-block: 5px;
}
.project-peek-details .project-peek-property dt {
  margin: 0;
}
@media (min-width: 1000px) {
  .project-peek.project-peek-expanded[data-mode=side] {
    width: min(870px, 90vw);
  }
  .project-peek-expanded .database-peek-content {
    padding-right: 356px;
  }
  .project-peek-expanded .project-peek-details {
    position: absolute;
    top: 0;
    right: 0;
    width: 242px;
    min-height: calc(100% - 40px);
    margin: 0;
    padding: 20px 18px;
    border: 0;
    border-left: 1px solid var(--line);
  }
  .project-peek-expanded .project-peek-details .project-peek-property {
    display: block;
    padding-block: 10px;
  }
}
.project-database .database-board .database-card-group > h3 {
  margin: 0 0 8px;
  font-size: 14px;
  line-height: 26px;
  letter-spacing: normal;
  font-weight: 500;
}
.ProseMirror .project-database.ProseMirror-selectednode:has(:focus) {
  background: transparent;
  outline: none;
}
.project-peek .database-peek-content .database-heading h2 {
  font-size: 18px;
  margin: 12px 0;
  letter-spacing: normal;
}
.ProseMirror:not(:focus) .project-database:is(.ProseMirror-selectednode, .editor-selected-block) {
  background: transparent;
  outline: none;
}
.project-source-switch {
  display: flex;
  gap: 4px;
  margin: 0 0 18px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.project-source-switch[hidden],
.database-embed[hidden] {
  display: none !important;
}
.project-source-tab {
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  padding: 5px 10px;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}
.project-source-tab:is(:hover, [aria-pressed=true]) {
  color: var(--text);
  background: var(--hover);
}
.project-source-tab[aria-pressed=true] {
  font-weight: 600;
}
.project-card-edit {
  display: block;
  margin-top: 8px;
  padding: 3px 5px;
  border: 0;
  border-radius: 4px;
  color: var(--muted);
  background: transparent;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.project-card-edit:hover {
  color: var(--text);
  background: var(--hover);
}
.project-card-actions {
  position: static;
  margin-top: 4px;
}
.project-card-actions > summary {
  position: absolute;
  top: 8px;
  right: 8px;
}
.project-card-actions[open] .database-card-move-form {
  position: static;
  display: grid;
  width: auto;
  min-width: 0;
  box-shadow: none;
}
.project-card-actions select {
  width: 100%;
  min-width: 0;
}
.project-property-dialog {
  inset: auto;
  z-index: 40;
}
.project-peek .database-peek-content {
  padding: 36px 32px 32px;
}
.project-peek .database-peek-properties {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 24px;
  overflow: visible;
}
.project-peek-property {
  min-width: 0;
  overflow-wrap: anywhere;
}
.project-peek .project-peek-details {
  display: grid;
  position: static;
  width: auto;
  min-height: 0;
  padding: 12px 0;
  margin-bottom: 16px;
  border: 0;
  border-top: 1px solid var(--line);
}
.project-peek .project-peek-details .project-peek-property {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  align-items: center;
}
.project-peek-value {
  max-width: 100%;
  overflow-wrap: anywhere;
}
.project-peek-resize {
  display: none;
}
.project-peek[data-mode=side] {
  width: min(var(--project-peek-width, 590px), 100vw);
  box-sizing: border-box;
  overflow: visible;
}
.project-peek .database-peek-content {
  min-height: 0;
}
.project-attachments {
  padding: 12px 0 22px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}
.project-attachments h3 {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}
.project-attachments ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.project-attachments li {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 4px 0;
}
.project-attachments a {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
  color: inherit;
  text-decoration-color: var(--line);
}
.project-attachments button {
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  padding: 4px 6px;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.project-attachments button:hover {
  background: var(--hover);
}
.project-attachments button:disabled {
  opacity: .5;
  cursor: default;
}
@media (min-width: 1000px) {
  .project-side-open .document-scroll {
    margin-right: min(var(--project-peek-width, 590px), calc(100vw - 280px));
  }
  .project-peek[data-mode=side] .project-peek-resize {
    display: block;
    position: absolute;
    top: 0;
    bottom: 0;
    left: -4px;
    width: 8px;
    cursor: col-resize;
    touch-action: none;
    z-index: 1;
  }
  .project-peek-resize:focus-visible {
    outline: 2px solid var(--accent);
  }
}
@media (max-width: 999px) {
  .project-peek[data-mode=side] {
    width: min(590px, 100vw);
  }
}
@media (max-width: 480px) {
  .project-peek .database-peek-content {
    padding: 28px 20px;
  }
  .project-peek .database-peek-bar {
    flex-wrap: wrap;
    padding: 8px 12px;
  }
}
@media (min-width: 481px) {
  .project-peek .database-peek-content {
    padding-left: 56px;
  }
}
.project-peek {
  container-type: inline-size;
}
@container (min-width: 800px) {
  .project-peek .database-peek-content {
    position: relative;
    padding-right: 300px;
  }
  .project-peek .database-peek-properties {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
  }
  .project-peek .project-peek-details {
    position: absolute;
    top: 0;
    right: 0;
    width: 224px;
    min-height: calc(100% - 40px);
    padding: 20px;
    margin: 0;
    border: 0;
    border-left: 1px solid var(--line);
  }
  .project-peek .project-peek-details .project-peek-property {
    display: block;
    padding-block: 10px;
  }
}
