.workspace-nav { display: grid; gap: 8px; }
.workspace-nav .sidebar-item { border: 0; background: transparent; color: #62685d; text-align: left; }
.workspace-nav .sidebar-item[aria-current="page"] { background: #e7f1e9; color: #307c56; }
.workspace-nav .sidebar-item:not([aria-current]) .nav-indicator { visibility: hidden; }

.articles-header { align-items: center; }
.articles-header .primary { flex-shrink: 0; }
.article-notice {
  margin-bottom: 18px;
  border: 1px solid #cfe5d7;
  border-radius: 10px;
  background: #e7f1e9;
  color: #28694c;
  padding: 14px 18px;
  font-size: 14px;
}
.article-workspace-error.error { margin: 0 0 18px; }
.article-rows, .article-photos { list-style: none; padding: 0; margin: 0; }
.article-list-row {
  display: flex;
  align-items: center;
  gap: 18px;
  border-top: 1px solid #e6e4dc;
  padding: 18px 28px;
}
.article-list-row > img { width: 95px; height: 67px; object-fit: cover; border-radius: 8px; background: #eee9dd; }
.article-list-copy { flex: 1; min-width: 0; }
.article-list-copy strong { display: block; font-size: 16px; line-height: 1.5; overflow-wrap: anywhere; }
.article-list-meta { display: flex; gap: 8px 12px; flex-wrap: wrap; color: #686961; font-size: 12px; margin-top: 9px; align-items: center; }
.article-tag, .article-live, .article-draft { padding: 4px 9px; border-radius: 40px; font-size: 12px; }
.article-tag { color: #745624; background: #f5ebd1; }
.article-draft { color: #635f54; background: #ebe8de; }
.article-live { color: #28694c; background: #e7f1e9; }

.article-editor { width: min(920px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); }
.article-editor form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(205px, .46fr); gap: 20px 28px; }
.article-dialog-heading { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: start; gap: 16px; padding-bottom: 15px; border-bottom: 1px solid #e6e4dc; }
.article-fields, .article-settings { min-width: 0; }
.article-settings { border-left: 1px solid #e6e4dc; padding-left: 24px; }
.article-settings h3 { font: 600 19px var(--heading); margin: 0 0 14px; }
.article-editor label { display: block; font-size: 13px; font-weight: 600; margin: 0 0 7px; }
.article-editor input:not([type="checkbox"]), .article-editor textarea, .article-editor select { width: 100%; margin-bottom: 14px; font-size: 14px; }
.article-editor textarea {
  min-height: 66px;
  border: 1px solid #d8d8ce;
  border-radius: 7px;
  padding: 10px 14px;
  line-height: 1.65;
  background: transparent;
  color: #303a31;
  font-family: inherit;
  resize: vertical;
}
.article-editor :focus-visible { outline: 2px solid #287e56; outline-offset: 2px; }
.article-editor .article-check { display: flex; align-items: center; gap: 8px; min-height: 30px; font-weight: 400; }
.article-check input { accent-color: #287e56; min-height: unset; width: 16px; height: 16px; }
.article-editor .article-upload-label { margin-top: 15px; }
.article-editor input[type="file"] { min-height: 0; padding: 6px; }
.article-help { color: #686961; font-size: 12px; line-height: 1.6; margin: -6px 0 13px; }
.article-photos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.article-photo img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 7px; background: #eee9dd; }
.article-photo button { display: block; width: 100%; margin-top: 4px; font-size: 11px; padding: 5px 2px; min-height: 28px; }
.article-photo [aria-pressed="true"] { background: #e7f1e9; color: #28694c; }
.article-remove { border: 0; color: #8b4a3a; background: transparent; }
.article-editor form > .error { grid-column: 1 / -1; margin: 0; }
.article-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 9px; border-top: 1px solid #e6e4dc; padding-top: 16px; }
.article-preview-body h3 { font: 700 23px/1.5 var(--heading); margin: 20px 0 12px; overflow-wrap: anywhere; }
.article-preview-body p { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.85; }
.article-preview-summary { background: #fff7e9; color: #615135; padding: 14px; border-radius: 8px; }
.article-preview-body img { width: 100%; margin: 14px 0; border-radius: 9px; }

@media (max-width: 800px) {
  body:not(.auth-screen) .layout { flex-direction: column; }
  body:not(.auth-screen) .sidebar { display: block; width: 100%; padding: 9px 18px; border: 0; border-bottom: 1px solid #e6e4dc; }
  .sidebar .sidebar-label, .sidebar .sidebar-note, .sidebar .sidebar-footer { display: none; }
  .workspace-nav { display: flex; gap: 8px; }
  .workspace-nav .sidebar-item { padding: 10px 12px; }
}
@media (max-width: 600px) {
  .article-list-row { gap: 11px; padding: 16px 13px; }
  .article-list-row > img { width: 63px; height: 52px; }
  .article-list-row > button { padding: 7px 12px; flex-shrink: 0; }
  .article-editor form { grid-template-columns: minmax(0, 1fr); }
  .article-settings { border-left: 0; padding-left: 0; }
}
.article-preview-body h4 { color: #745624; font-size: 13px; margin: 22px 0 10px; }
.article-preview-card { display: flex; gap: 12px; align-items: center; border-bottom: 1px solid #e6e4dc; padding: 0 0 14px; }
.article-preview-card img { width: 44%; aspect-ratio: 16 / 10; object-fit: cover; margin: 0; }
.article-preview-card-copy { flex: 1; min-width: 0; }
.article-preview-card-copy p, .article-preview-card-copy strong { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; }
.article-preview-card-copy p { color: #686961; font-size: 13px; margin: 4px 0 8px; line-height: 1.5; }
.rich-editor { border: 1px solid #d8d8ce; border-radius: 8px; overflow: hidden; }
.article-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 8px; border-bottom: 1px solid #e6e4dc; background: #f5f4ed; }
.article-toolbar button, .article-editor .article-toolbar select { min-height: 34px; margin: 0; padding: 4px 9px; border: 1px solid transparent; background: transparent; color: #3a4339; border-radius: 5px; font-size: 13px; width: auto; }
.article-toolbar button:hover, .article-toolbar select:hover { border-color: #d4dccd; background: #e7f1e9; }
.article-body-editor { min-height: 300px; max-height: 480px; overflow: auto; padding: 12px 14px; font-size: 16px; line-height: 1.75; white-space: pre-wrap; overflow-wrap: anywhere; }
.article-body-editor:empty::before { content: attr(data-placeholder); color: #777870; pointer-events: none; }
.article-body-editor:focus { outline-offset: -2px; }
.article-body-editor p, .article-preview-body .rich-paragraph { margin: 0 0 14px; }
.article-body-editor h3, .article-preview-body .rich-subheading { color: #262b28; margin: 18px 0 10px; font: 700 21px/1.5 var(--heading); }
.article-body-editor font[size="2"], .rich-small { font-size: 13px; }
.article-body-editor font[size="3"] { font-size: 16px; }
.article-body-editor font[size="5"], .rich-large { font-size: 20px; }
.body-image { padding: 8px; margin: 12px 0; background: #f5f4ed; border: 1px solid #e6e4dc; border-radius: 8px; }
.body-image img { width: 100%; max-height: 280px; object-fit: contain; border-radius: 6px; }
.body-image button { display: block; margin: 8px 0 0 auto; padding: 6px 10px; font-size: 12px; color: #8b4a3a; border: 0; background: transparent; }
.article-editor .article-editor-hint { margin: 9px 0 0; }
