#orthant-editor-anchor { scroll-margin-top: 90px; }
.orthant-edit-entry { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin: 0 0 22px; }
.orthant-edit-entry[hidden], #orthant-editor-anchor [hidden] { display: none !important; }
.orthant-edit-entry span, .orthant-entry-status { color: var(--orthant-muted, #69756d); font-size: 12px; }
#orthant-editor-anchor button, .orthant-published-link {
  border: 1px solid var(--orthant-line, #ceddd0); border-radius: 7px; padding: 9px 15px;
  color: var(--orthant-text, #303832); background: var(--orthant-paper, #fefefd); cursor: pointer;
  font: inherit; font-size: 13px; line-height: 1.5; transition: background .15s, border-color .15s;
}
#orthant-editor-anchor button:hover { border-color: #629374; background: var(--orthant-soft, #f0f6ef); }
#orthant-editor-anchor button:disabled { opacity: .5; cursor: not-allowed; }
#orthant-editor-anchor :where(button, input, textarea, select, a):focus-visible {
  outline: 2px solid #4c8560; outline-offset: 3px;
}
#orthant-editor-anchor .orthant-edit-start, #orthant-editor-anchor .orthant-save,
#orthant-editor-anchor .orthant-edit-login {
  color: #fff; background: #2e6746; border-color: #2e6746; font-weight: 600;
}
.orthant-write-login { padding: 36px 28px; border: 1px solid var(--orthant-line, #dce6db); border-radius: 12px; }
.orthant-write-login h2 { font-size: 26px; margin: 0 0 12px; }
.orthant-write-login p { color: var(--orthant-muted, #69756d); margin-bottom: 24px; }
.orthant-is-editing .hextra-toc { visibility: hidden; }
.orthant-is-editing #content { min-width: 0; }
.orthant-is-editing #content > h1 { display: none; }
.orthant-inline-editor { color: var(--orthant-text, #303832); font-size: 15px; width: 100%; min-width: 0; }
.orthant-editor-top { margin-bottom: 26px; padding-bottom: 22px; border-bottom: 1px solid var(--orthant-line, #dce6db); }
.orthant-editor-eyebrow { color: #4f8060; font-size: 11px; font-weight: 600; letter-spacing: .16em; margin: 0 0 10px; }
.orthant-editor-top h2 { margin: 0 0 8px; font-size: 27px; font-weight: 600; letter-spacing: -.025em; }
.orthant-editor-top > p:last-child { margin: 0; font-size: 13px; line-height: 1.7; color: var(--orthant-muted, #69756d); }
.orthant-inline-editor label { display: flex; flex-direction: column; gap: 8px; margin: 0 0 20px; font-weight: 500; font-size: 13px; }
.orthant-inline-editor :where(input, textarea, select) {
  box-sizing: border-box; width: 100%; min-width: 0; padding: 12px 14px; border: 1px solid var(--orthant-line, #dce6db);
  border-radius: 7px; color: var(--orthant-text, #303832); background: var(--orthant-paper, #fefefd);
  font: inherit; font-size: 15px; line-height: 1.6;
}
.orthant-inline-editor textarea { resize: vertical; }
.orthant-inline-editor .orthant-title-input { font-size: 25px; font-weight: 600; letter-spacing: -.02em; }
.orthant-inline-editor .orthant-topic-label { max-width: 260px; }
.orthant-topic-context { display: flex; align-items: center; gap: 10px; margin: 0 0 20px; font-size: 13px; }
.orthant-topic-context span { color: var(--orthant-muted, #69756d); }
.orthant-topic-context strong {
  padding: 6px 10px; border-radius: 5px; color: var(--orthant-accent, #326348);
  background: var(--orthant-soft, #f0f6ef); font-weight: 600;
}
.orthant-body-label { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 24px 0 10px; }
.orthant-body-label strong { font-size: 13px; font-weight: 500; }
.orthant-body-label span, .orthant-editor-hint { font-size: 12px; color: var(--orthant-muted, #69756d); line-height: 1.75; }
.orthant-editor-hint { margin: 10px 0 22px; }
.orthant-inline-editor .vditor {
  min-width: 0; border: 1px solid var(--orthant-line, #d4e0d2); border-radius: 8px;
  background: var(--orthant-paper, #fefefd); overflow: visible;
}
.orthant-inline-editor .vditor-toolbar {
  padding: 6px 8px !important; border-radius: 8px 8px 0 0; border-bottom-color: var(--orthant-line, #d4e0d2);
  background: var(--orthant-soft, #f1f6ee); z-index: 3;
}
.orthant-inline-editor .vditor-toolbar--pin { top: var(--hextra-navbar-height); }
#orthant-editor-anchor .vditor-toolbar button {
  padding: 0; border: 0; border-radius: 3px; background: transparent; color: var(--orthant-text, #395749); font-size: 14px;
}
.orthant-inline-editor .vditor-toolbar > .vditor-toolbar__item { min-width: 26px; }
.orthant-inline-editor .vditor-toolbar button:hover { color: #378654; }
.orthant-inline-editor .vditor-tooltipped::after { white-space: nowrap; z-index: 50; }
.orthant-inline-editor .vditor-content { border-radius: 0 0 8px 8px; }
.orthant-inline-editor .vditor-reset { color: var(--orthant-text, #303832); font-size: 16px; line-height: 1.9; }
.orthant-inline-editor .vditor-ir > .vditor-reset,
.orthant-inline-editor .vditor-wysiwyg > .vditor-reset {
  padding: 28px 24px !important; background: var(--orthant-paper, #fefefd); min-height: 440px;
}
.orthant-inline-editor .vditor-sv { padding: 24px !important; background: var(--orthant-paper, #fefefd); font-size: 14px; }
.orthant-inline-editor .vditor-reset :where(h1, h2, h3) { line-height: 1.5; font-weight: 600; }
.orthant-inline-editor .vditor-reset h1 { font-size: 28px; }
.orthant-inline-editor .vditor-reset h2 { font-size: 23px; }
.orthant-inline-editor .vditor-reset h3 { font-size: 19px; }
.orthant-inline-editor .vditor-ir .vditor-reset > :where(h1, h2, h3, h4, h5, h6)::before,
.orthant-inline-editor .vditor-wysiwyg > .vditor-reset > :where(h1, h2, h3, h4, h5, h6)::before { content: none; }
.orthant-inline-editor .vditor-reset blockquote { border-left-color: #88b498; background: var(--orthant-soft, #eff5ed); }
.orthant-inline-editor .vditor-reset pre { background: var(--orthant-soft, #f1f5ef); border-radius: 6px; }
.orthant-inline-editor .vditor-reset code { font-family: "SFMono-Regular", Consolas, monospace; font-size: .9em; }
.orthant-inline-editor .vditor--fullscreen { z-index: 10000; border-radius: 0; }
.orthant-inline-editor .vditor--fullscreen .vditor-toolbar { border-radius: 0; }
.orthant-inline-editor .vditor--fullscreen .vditor-toolbar--pin { top: 0; }
.orthant-keyword-section { padding: 18px 0; border-top: 1px solid var(--orthant-line, #dce6db); }
.orthant-keyword-section > span { font-size: 13px; font-weight: 500; }
.orthant-keyword-list { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; color: var(--orthant-muted, #69756d); font-size: 12px; }
.orthant-keyword-list span { padding: 4px 10px; border: 1px solid var(--orthant-line, #dce6db); border-radius: 5px; }
.orthant-keyword-section .orthant-editor-hint { margin-bottom: 0; }
.orthant-editor-advanced { border-block: 1px solid var(--orthant-line, #dce6db); padding: 16px 0; }
.orthant-editor-advanced summary { font-size: 13px; font-weight: 500; cursor: pointer; }
.orthant-advanced-fields { padding-top: 22px; }
.orthant-date-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.orthant-date-fields label { margin-bottom: 0; }
.orthant-advanced-fields input[name="weight"] { max-width: 160px; }
.orthant-danger-zone {
  display: flex; align-items: center; gap: 18px; margin: 32px 0 44px; padding: 16px 18px;
  border: 1px solid #dfb9b3; border-radius: 8px; background: #fff8f6;
}
.orthant-danger-zone > div { flex: 1; min-width: 0; }
.orthant-danger-zone strong { color: #943c34; font-size: 13px; font-weight: 600; }
.orthant-danger-zone p { margin: 5px 0 0; color: #7b5a56; font-size: 12px; line-height: 1.7; }
#orthant-editor-anchor .orthant-delete { border-color: #c97469; color: #963b33; background: #fff; white-space: nowrap; }
#orthant-editor-anchor .orthant-delete:hover { border-color: #a84d43; color: #7f2c26; background: #fff0ed; }
.orthant-deleted-link { color: #34754b; font-size: 13px; text-decoration: none; white-space: nowrap; }
.orthant-pending-images { margin: 20px 0; padding: 14px; border: 1px dashed var(--orthant-line, #ceddd0); border-radius: 7px; }
.orthant-pending-images > p { margin-bottom: 12px; font-size: 12px; color: var(--orthant-muted, #69756d); }
.orthant-pending-images > div { display: flex; flex-wrap: wrap; gap: 12px; }
.orthant-pending-images figure { margin: 0; width: 100px; }
.orthant-pending-images img { width: 100px; height: 74px; object-fit: contain; border-radius: 4px; }
.orthant-pending-images figcaption { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; margin-top: 5px; }
.orthant-editor-actions {
  position: sticky; bottom: 0; z-index: 4; display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
  margin-top: 24px; padding: 16px 0; border-top: 1px solid var(--orthant-line, #dce6db);
  background: var(--orthant-paper, #fefefd); box-shadow: 0 -12px 16px -12px #203b2515;
}
.orthant-save-status { flex: 1 1 180px; font-size: 12px; line-height: 1.7; color: var(--orthant-muted, #69756d); }
.orthant-save-status[data-kind="success"] { color: #34754b; }
.orthant-save-status[data-kind="warning"] { color: #956024; }
.orthant-action-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.orthant-published-link { text-decoration: none; color: #34754b; }
.orthant-session-warning {
  margin: 0 0 24px; padding: 14px 16px; border: 1px solid #bda675; background: #fbf8ee;
  color: #775423; border-radius: 7px; font-size: 13px; line-height: 1.8;
}
.orthant-session-warning button { margin-top: 8px; }
.dark .orthant-save-status[data-kind="success"] { color: #91c7a2; }
.dark .orthant-save-status[data-kind="warning"] { color: #d8b880; }
.dark .orthant-session-warning { border-color: #716443; background: #302e21; color: #e1cfa7; }
.dark .orthant-editor-eyebrow { color: #95bda0; }
.dark .orthant-danger-zone { border-color: #714d48; background: #2f2422; }
.dark .orthant-danger-zone strong { color: #e2a59d; }
.dark .orthant-danger-zone p { color: #c49d97; }
.dark #orthant-editor-anchor .orthant-delete { border-color: #9f6259; color: #efb1a8; background: #2a211f; }
.dark #orthant-editor-anchor .orthant-delete:hover { border-color: #c47a70; color: #ffd0ca; background: #3a2926; }
@media (max-width: 760px) {
  .orthant-edit-entry { justify-content: flex-start; }
  .orthant-edit-entry span { font-size: 11px; }
  .orthant-inline-editor .orthant-title-input { font-size: 22px; }
  .orthant-editor-top h2 { font-size: 24px; }
  .orthant-body-label { align-items: flex-start; flex-direction: column; gap: 5px; }
  .orthant-inline-editor .vditor-toolbar { flex-wrap: wrap; padding: 5px !important; }
  .orthant-inline-editor .vditor-toolbar > .vditor-toolbar__item { padding: 0 3px; }
  .orthant-inline-editor .vditor-ir > .vditor-reset,
  .orthant-inline-editor .vditor-wysiwyg > .vditor-reset { padding: 20px 14px !important; min-height: 360px; }
  .orthant-inline-editor .vditor-sv { padding: 16px !important; }
  .orthant-date-fields { grid-template-columns: 1fr; gap: 14px; }
  .orthant-danger-zone { align-items: stretch; flex-direction: column; margin-bottom: 52px; }
  #orthant-editor-anchor .orthant-delete { align-self: flex-start; }
  .orthant-editor-actions { padding: 12px 0; gap: 8px; }
  .orthant-save-status { flex-basis: 100%; }
  .orthant-action-buttons { width: 100%; }
  .orthant-action-buttons .orthant-save { flex: 1; }
  #orthant-editor-anchor .orthant-action-buttons button { padding: 9px 11px; font-size: 12px; }
}
