:root {
  --bg: #f2f4f3;
  --paper: #fff;
  --ink: #23302a;
  --muted: #59675f;
  --green: #2d5b46;
  --green-dark: #234936;
  --line: #d8dfda;
  --soft: #edf2ef;
  --warn: #765114;
  --warn-bg: #fff5df;
  --red: #9b352f;
  --radius: 9px;
  --sidebar: 224px;
  font-family: 'Segoe UI', Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input, select, textarea { font: inherit; }
button, a, summary { cursor: pointer; }
button { color: inherit; }
a { color: var(--green); }
button:disabled { cursor: not-allowed; color: #748078; background: #edf0ee; border-color: #dde3df; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid #3b6f96; outline-offset: 3px; }
input:focus, textarea:focus, select:focus { outline: 2px solid #3b6f96; outline-offset: 1px; }
input::placeholder, textarea::placeholder { color: #6a776e; opacity: 1; }
.hidden { display: none !important; }
.account-picker { margin: -12px 8px 16px; }
.account-picker label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.account-picker .form-input { width: 100%; min-width: 0; }
.account-context { padding: 12px 0 0; color: var(--green); font-size: 13px; overflow-wrap: anywhere; }
main[aria-busy="true"] { opacity: .6; }
.account-list { display: grid; gap: 12px; margin-bottom: 24px; }
.account-card { padding: 18px; display: flex; justify-content: space-between; gap: 18px; }
.account-card.current { border-color: #799d86; }
.account-card h3 { font-size: 17px; margin: 0 0 7px; }
.account-card h3 .badge { font-size: 12px; margin-left: 8px; }
.account-profile { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; margin: 0; }
.account-card .form-help { margin: 7px 0 0; }
.account-card-actions { display: flex; flex-direction: column; justify-content: center; gap: 8px; }
.account-form { max-width: 640px; padding: 22px; }
.account-form h3 { margin-top: 0; }
.account-form > .button { margin-top: 12px; }
@media (max-width: 600px) { .account-card { flex-direction: column; } .account-card-actions { flex-direction: row; justify-content: flex-start; } .account-picker { margin: 0 0 12px; } }
.icon { display: inline-flex; width: 19px; height: 19px; flex-shrink: 0; align-items: center; justify-content: center; }
.icon svg { width: 100%; height: 100%; stroke: currentColor; stroke-width: 1.7; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.dot { width: 7px; height: 7px; display: inline-block; border-radius: 50%; background: #3b7754; flex-shrink: 0; }
.dot.muted { background: #7f8d84; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar); padding: 28px 16px 20px; background: #fafbf9; border-right: 1px solid var(--line); display: flex; flex-direction: column; z-index: 5; }
.brand { display: flex; align-items: center; gap: 12px; margin: 0 10px 32px; font-size: 25px; font-weight: 650; letter-spacing: -.7px; text-decoration: none; }
.brand-light { font-weight: 400; }
.brand small, .workspace-label { display: none; }
.brand-icon { position: relative; width: 36px; height: 40px; line-height: 35px; text-align: center; font: 36px/35px Georgia, serif; background: var(--green); color: white; border-radius: 9px; }
.brand-icon > span { position: absolute; font: 19px/1 Arial, sans-serif; right: 2px; top: 0; color: #dce9d9; }
nav { display: flex; flex-direction: column; gap: 5px; }
.nav-item { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 46px; border: 0; background: transparent; padding: 12px; border-radius: 7px; font-size: 15px; text-align: left; color: #45574c; }
.nav-item:hover { background: #eef2ee; }
.nst-desktop-link { text-decoration: none; }
.nst-desktop-card { margin-bottom: 18px; padding: 18px; }
.nst-desktop-card h3 { margin: 0 0 8px; }
.nst-desktop-card p { margin: 0 0 12px; color: var(--muted); }
.nst-desktop-card .button { text-decoration: none; }
.nav-item.active { background: #e3ece5; color: #244c35; font-weight: 650; }
.nav-count { margin-left: auto; background: #d8e5dc; color: #32513c; padding: 1px 7px; border-radius: 5px; font-size: 13px; font-variant-numeric: tabular-nums; }
.nav-item > .dot { margin-left: auto; }
.sidebar-bottom { margin-top: auto; padding: 24px 8px 0; color: var(--muted); font-size: 13px; }
.local-badge { display: flex; align-items: center; gap: 8px; border-top: 1px solid var(--line); padding-top: 18px; font-size: 13px; }
.sidebar-bottom p { font-size: 13px; line-height: 1.7; margin: 12px 0 18px; }
.backup-link { display: flex; gap: 7px; align-items: center; text-decoration: none; font-size: 13px; }
.sidebar-footer { display: flex; justify-content: space-between; margin-top: 24px; font-size: 12px; color: #67756c; }
main { margin-left: var(--sidebar); max-width: 1800px; padding: 0 28px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.topbar h1 { font-size: 25px; font-weight: 650; line-height: 1.25; margin: 0; letter-spacing: -.5px; }
.topbar-right { display: flex; align-items: center; gap: 20px; }
.local-indicator { display: flex; gap: 7px; align-items: center; font-size: 13px; color: var(--muted); }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 43px; padding: 10px 15px; border: 1px solid #becbc2; border-radius: 7px; background: white; color: #314d3b; font-size: 14px; font-weight: 600; line-height: 1.35; white-space: normal; text-align: center; }
.button:hover:not(:disabled) { background: #eef3ef; border-color: #8ea797; }
.button.primary { color: white; background: var(--green); border-color: var(--green); }
.button.primary:hover:not(:disabled) { background: var(--green-dark); }
.button.primary:disabled { color: #65786b; background: #dfe7e1; border-color: #d6e0d9; }
.button.small { font-size: 14px; min-height: 40px; padding: 9px 14px; }
.button .icon { width: 17px; height: 17px; }
.button.full { width: 100%; }
.button.danger { color: var(--red); background: #fff5f3; border-color: #e0b5af; }
.button.danger:disabled { color: #748078; background: #edf0ee; border-color: #dde3df; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); margin: 20px 0 12px; border: 1px solid var(--line); border-radius: 8px; background: #fafbf9; }
.stat { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 18px; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat > span { font-size: 14px; color: #4d6053; }
.stat > strong { font-size: 23px; font-weight: 650; color: #304f3b; font-variant-numeric: tabular-nums; }
.stat > small { display: none; }
.import-details { margin: 0 0 20px; color: var(--muted); font-size: 13px; }
.import-details > summary { width: fit-content; padding: 5px 0; }
.notice { margin: 12px 0 18px; padding: 14px 17px; background: #edf3ee; border: 1px solid #ccdcd0; border-radius: 7px; font-size: 14px; line-height: 1.7; color: #36583f; overflow-wrap: anywhere; }
.notice.warning { background: var(--warn-bg); border-color: #e7d4a8; color: var(--warn); }
.import-details .notice { font-size: 14px; margin-bottom: 0; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 0 0 18px; }
.section-heading h2 { font-size: 18px; font-weight: 650; margin: 0; line-height: 1.4; }
.section-heading p { font-size: 14px; color: var(--muted); margin: 6px 0 0; line-height: 1.6; }
body[data-view='archive'] .topbar { display: none; }
.view { margin-top: 24px; }
body:not([data-view='archive']) .view > .section-heading h2 { display: none; }
body:not([data-view='archive']) .view > .section-heading p { margin-top: 0; }
.heading-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.desk { display: grid; grid-template-columns: minmax(280px,.85fr) minmax(340px,1.3fr); gap: 20px; align-items: start; }
.library { display: flex; flex-direction: column; min-width: 0; }
#view-archive > .library { width: 100%; }
#view-archive .library-toolbar { display: grid; grid-template-columns: minmax(220px,1fr) minmax(180px,.55fr) minmax(230px,.7fr); gap: 14px; align-items: center; }
#view-archive .source-filter, #view-archive .filter-row { margin-top: 0; }
#view-archive .entry-list { height: max(440px,calc(100dvh - 230px)); }
.import-card { padding: 24px; max-width: 1000px; }
.import-card h2 { margin: 0; font-size: 20px; }
.import-card h3 { margin: 28px 0 10px; font-size: 16px; }
.import-card > p { color: var(--muted); font-size: 15px; line-height: 1.7; }
.import-card .notice { margin-bottom: 0; }
.summary-title { margin: 28px 0 12px; font-size: 18px; }
#view-imports .stats { max-width: 1000px; margin-top: 0; margin-bottom: 24px; }
.library-toolbar { padding: 18px; }
.search-box { display: flex; align-items: center; gap: 9px; border: 1px solid #c4d0c8; background: #fff; border-radius: 7px; padding: 11px; }
.search-box .icon { width: 18px; height: 18px; color: #556e5e; }
.search-box input { width: 100%; min-width: 0; font-size: 15px; color: var(--ink); border: 0; background: transparent; outline: 0; }
.search-box:focus-within { outline: 2px solid #3b6f96; outline-offset: 1px; }
.search-box input:focus { outline: 0; }
.search-box kbd { font: 12px 'Segoe UI',Arial,sans-serif; color: #63736a; background: #edf1ee; border: 1px solid var(--line); border-radius: 4px; padding: 2px 5px; }
.source-filter { width: 100%; border: 1px solid #cbd6ce; border-radius: 6px; background: #f8faf8; color: #3d5545; font-size: 14px; padding: 10px; margin-top: 12px; }
.filter-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; }
.filter-row select { width: 65%; min-width: 0; border: 0; color: #405f49; background: white; padding: 4px 0; font-size: 14px; }
.filter-row > span { font-size: 13px; white-space: nowrap; color: var(--muted); }
.selection-bar { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 12px 18px; border-block: 1px solid var(--line); background: #fafbf9; font-size: 13px; color: #4d6052; }
.selection-bar label, .plan-toolbar-heading label { display: flex; gap: 8px; align-items: center; }
input[type='checkbox'] { width: 18px; height: 18px; margin: 0; accent-color: var(--green); cursor: pointer; flex-shrink: 0; }
input[type='checkbox']:disabled { cursor: default; }
.text-button { border: 0; background: transparent; color: #376c4c; padding: 5px 0; font-size: 13px; line-height: 1.5; text-decoration: underline; text-underline-offset: 3px; }
.text-button:hover:not(:disabled) { color: #1e492e; }
.entry-list { height: clamp(300px, calc(100vh - 420px), 560px); overflow-y: auto; scrollbar-width: thin; scrollbar-color: #bdcbc1 transparent; }
.entry-row { display: flex; align-items: flex-start; gap: 12px; padding: 17px 18px; border-bottom: 1px solid #e7ece8; cursor: pointer; }
.entry-row:hover { background: #f7faf7; }
.entry-row.active { background: #edf4ee; box-shadow: inset 3px 0 #4f7f5f; }
.entry-row > input { margin-top: 4px; }
.entry-row-content { flex: 1; min-width: 0; }
.entry-open { display: block; width: 100%; padding: 0; border: 0; background: transparent; text-align: left; cursor: pointer; }
.entry-title { display: block; margin: 0 0 7px; color: #284732; font-size: 16px; font-weight: 650; line-height: 1.5; overflow-wrap: anywhere; }
.entry-row-actions { display: flex; gap: 20px; margin-top: 8px; }
.entry-row-actions .text-button { min-height: 36px; font-size: 14px; }
.danger-text { color: #934d3c; }
.text-button.danger-text:hover:not(:disabled) { color: #713226; }
.bulk-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.bulk-bar { flex-wrap: wrap; }
.archive-editor-actions { display: flex; gap: 12px 20px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 14px; margin-top: 18px; }
.archive-editor-actions .text-button { min-height: 36px; font-size: 14px; }
.archive-action-items { padding-left: 22px; color: #45614f; line-height: 1.8; overflow-wrap: anywhere; }
.entry-row h4 { margin: 0 0 7px; color: #284732; font-size: 15px; font-weight: 650; line-height: 1.5; overflow-wrap: anywhere; }
.entry-excerpt { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 14px; line-height: 1.65; color: #58695d; overflow-wrap: anywhere; }
.entry-row-bottom { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-top: 10px; font-size: 13px; color: #627168; }
.badge { display: inline-flex; align-items: center; border-radius: 5px; padding: 4px 7px; background: #eaf1eb; color: #36573f; font-size: 13px; line-height: 1.35; white-space: normal; }
.badge.warning { color: var(--warn); background: var(--warn-bg); }
.badge.sent { color: #295438; background: #e3f0e5; }
.badge.neutral { color: #55665a; background: #eff2ef; }
.pagination { display: flex; justify-content: center; align-items: center; gap: 22px; padding: 10px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.icon-button { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 32px; background: #fff; border: 1px solid #cad6ce; border-radius: 5px; color: #3f654b; font-size: 16px; }
.icon-button:hover:not(:disabled) { background: #edf3ee; }
.bulk-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 18px; border-top: 1px solid var(--line); background: #fafbf9; color: #536b5a; font-size: 13px; }
.editor { padding: 24px; min-width: 0; }
.editor-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 20px; }
.eyebrow { font-size: 14px; font-weight: 600; letter-spacing: 0; color: #566b5b; }
.editor-meta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; font-size: 13px; color: #5d7164; }
.field-label { display: block; margin: 20px 0 8px; color: #435d4c; font-weight: 600; font-size: 14px; }
.title-input { width: 100%; border: 0; border-bottom: 1px solid #d6dfd9; border-radius: 0; padding: 5px 0 15px; color: #243e2e; background: white; font-size: 24px; font-weight: 600; line-height: 1.4; letter-spacing: -.3px; }
.editor-tabs { display: flex; align-items: center; gap: 20px; border-bottom: 1px solid var(--line); margin: 12px 0 16px; flex-wrap: wrap; }
.editor-tabs > button { padding: 12px 0; border: 0; border-bottom: 2px solid transparent; background: transparent; color: #63746a; font-size: 14px; }
.editor-tabs > button.active { border-bottom-color: var(--green); color: #2c573b; font-weight: 600; }
.editor-tabs > span { margin-left: auto; color: #63766a; font-size: 13px; }
.content-input, .original-content { width: 100%; min-height: 260px; height: 330px; margin: 0; padding: 16px; border: 1px solid #d0dbd3; border-radius: 7px; background: #fff; color: #2c4233; font: 17px/1.85 'Segoe UI',Arial,sans-serif; overflow-wrap: anywhere; white-space: pre-wrap; }
.content-input { resize: vertical; }
.original-content { overflow: auto; }
.title-input[readonly], .content-input[readonly], .form-input[readonly] { background: #f8faf8; color: #344b3b; }
.inline-warning { background: var(--warn-bg); color: var(--warn); border: 1px solid #e4d3ac; border-radius: 6px; font-size: 14px; line-height: 1.7; padding: 12px; margin: 14px 0; }
.target-details { border-top: 1px solid var(--line); padding-top: 15px; margin-top: 18px; }
.target-details summary { color: #4d6855; font-size: 14px; }
.target-details summary > span { color: #64756a; margin-left: 12px; font-size: 13px; }
.target-details p { color: var(--muted); font-size: 14px; line-height: 1.65; }
.form-input { width: 100%; min-height: 44px; border: 1px solid #becfc3; border-radius: 6px; padding: 10px 12px; color: #2f4937; background: white; font-size: 15px; }
.editor-actions { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.editor-footnote { color: #607366; font-size: 13px; margin: 15px 0 0; line-height: 1.6; }
.editor-placeholder { min-height: 450px; display: flex; align-items: center; justify-content: center; flex-direction: column; text-align: center; padding: 30px; }
.placeholder-mark, .placeholder-rule, .editor-placeholder small { display: none; }
.editor-placeholder h3 { font-size: 22px; font-weight: 500; color: #48634e; margin: 0 0 12px; }
.editor-placeholder p { font-size: 16px; line-height: 1.8; color: #617566; }
.queue-panel { grid-column: 1 / -1; }
.queue-panel > summary, .bulk-details > summary { padding: 16px 20px; font-size: 15px; font-weight: 600; color: #385c44; }
.queue-panel[open] > summary, .bulk-details[open] > summary { border-bottom: 1px solid var(--line); }
.queue-summary-content { padding: 20px; }
.queue-head { display: flex; align-items: center; justify-content: space-between; }
.queue-head h3 { margin: 6px 0; font-size: 18px; font-weight: 600; }
.queue-head h3 > span { background: #e6efe8; padding: 2px 8px; border-radius: 6px; font-size: 14px; }
.queue-head > .icon { color: #547b5f; }
.queue-hint, .queue-footnote { color: var(--muted); font-size: 14px; line-height: 1.65; margin: 10px 0 16px; }
.queue-hint br { display: none; }
.mini-queue { max-height: 340px; overflow-y: auto; margin: 18px 0; }
.queue-item { display: flex; gap: 14px; align-items: flex-start; padding: 20px; margin-bottom: 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.queue-item[draggable='true'] { cursor: grab; }
.queue-item.dragging { opacity: .5; }
.queue-item.drag-over { outline: 2px solid #6c9679; outline-offset: -2px; }
.queue-number { display: flex; align-items: center; justify-content: center; flex-shrink: 0; width: 32px; height: 34px; border-radius: 5px; background: #edf2ee; color: #45624d; font-size: 15px; }
.queue-item-body { min-width: 0; flex: 1; }
.queue-item-title { font-size: 17px; line-height: 1.5; font-weight: 600; color: #2e4f38; overflow-wrap: anywhere; }
.queue-item-excerpt { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: #586e5f; font-size: 15px; line-height: 1.7; margin-top: 6px; overflow-wrap: anywhere; }
.queue-item-bottom { display: flex; align-items: center; gap: 12px; justify-content: space-between; margin: 13px 0; }
.queue-arrows { display: flex; gap: 5px; }
.queue-arrows button { width: 32px; height: 31px; border: 1px solid #cdd9d1; border-radius: 5px; background: #f8faf8; color: #43674f; font-size: 17px; }
.queue-remove { border: 0; background: transparent; width: 30px; height: 30px; border-radius: 5px; font-size: 23px; line-height: 1; color: #5e7264; }
.queue-remove:hover:not(:disabled) { background: #f6e8e4; color: #983b30; }
.queue-schedule-summary { font-size: 15px; font-weight: 500; color: #3d634a; line-height: 1.7; margin-top: 12px; }
.approval-status { font-size: 14px; color: #5b6d61; margin: 8px 0; line-height: 1.7; }
.approval-status.approved { color: #28633b; font-weight: 600; }
.queue-message { font-size: 14px; line-height: 1.7; color: #536b5b; margin: 10px 0 14px; overflow-wrap: anywhere; }
.queue-bottom { margin-top: 18px; }
.runner-status { display: flex; gap: 9px; align-items: flex-start; font-size: 14px; line-height: 1.7; color: #46684f; padding: 14px 0; border-top: 1px solid var(--line); }
.runner-status > .dot { margin-top: 8px; }
.queue-buttons { display: flex; gap: 10px; flex-wrap: wrap; margin: 8px 0 12px; }
.queue-buttons .full { flex: 1; width: auto; }
#openQueuePlan { font-size: 14px; }
.empty-state, .mini-empty { text-align: center; padding: 30px 20px; font-size: 15px; line-height: 1.8; color: #5a7161; }
.empty-state .icon { display: block; width: 27px; height: 27px; margin: 0 auto 12px; }
.mini-empty { border: 1px dashed #c9d7cd; border-radius: 8px; background: #fafcf9; }
.mini-empty > span { display: none; }
.mini-empty strong { font-size: 16px; font-weight: 600; }
.mini-empty p { font-size: 14px; line-height: 1.8; margin-bottom: 0; }
.main-footer { display: flex; justify-content: space-between; gap: 15px; padding: 24px 0; color: #63766a; font-size: 13px; }
.schedule-help { color: #586e60; font-size: 14px; margin: 0 0 16px; }
.schedule-help > summary { padding: 4px 0; }
.schedule-info { margin: 10px 0; padding: 14px 16px; border-radius: 6px; background: #edf2ee; font-size: 14px; line-height: 1.8; }
.bulk-details { border: 1px solid var(--line); border-radius: 8px; margin: 0 0 20px; background: white; }
.plan-toolbar { margin: 0; padding: 20px; border: 0; border-radius: 0; overflow: visible; }
.plan-toolbar-heading { display: flex; justify-content: space-between; gap: 15px; flex-wrap: wrap; margin-bottom: 18px; font-size: 14px; color: #4d6956; }
.plan-toolbar-fields { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 12px; }
.plan-toolbar-fields > label { font-size: 14px; color: #45654e; }
.plan-toolbar-fields > label:first-child { flex: 1; min-width: 230px; }
.plan-toolbar-fields > label:nth-child(2) { width: 170px; }
.plan-toolbar-fields .form-input { display: block; margin-top: 8px; }
.plan-toolbar .form-help { margin-bottom: 0; }
.full-queue { display: grid; gap: 14px; }
.full-queue .queue-item { margin: 0; padding: 24px; }
.q-select { margin-top: 8px !important; }
.queue-plan-controls { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.queue-plan-controls > label { font-size: 14px; color: #45664f; }
.queue-plan-controls input { display: block; min-width: 230px; margin-top: 8px; }
.mini-actions { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 12px; }
.mini-actions .text-button { min-height: 36px; font-size: 14px; }
.history-row { display: flex; align-items: center; gap: 16px; border-bottom: 1px solid var(--line); padding: 20px 24px; }
.history-row:last-child { border-bottom: 0; }
.history-check { display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; background: #e6f0e7; color: #2f6640; }
.history-row-body { flex: 1; min-width: 0; }
.history-row h4 { margin: 0 0 7px; color: #2d4e37; font-size: 16px; font-weight: 600; }
.history-row p, .history-row a { margin: 0; font-size: 14px; line-height: 1.6; }
.history-row p { color: var(--muted); }
.event-details { margin-top: 20px; padding: 20px; }
.event-details > summary { font-size: 15px; color: #42674c; }
.event-row { display: grid; grid-template-columns: 150px 120px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 14px; line-height: 1.7; color: #4c6855; }
.settings-layout { display: grid; grid-template-columns: minmax(340px,620px) minmax(220px,1fr); gap: 30px; align-items: start; }
.settings-card { padding: 28px; }
.settings-card h3 { font-size: 22px; font-weight: 600; margin: 7px 0 24px; }
.settings-card .field-label > span { display: block; margin-top: 3px; font-size: 13px; color: #5e7966; font-weight: 400; }
.password-field { position: relative; }
.password-field > input { padding-right: 105px; }
.password-field > .text-button { position: absolute; right: 10px; top: 8px; font-size: 13px; }
.form-help { font-size: 14px; line-height: 1.7; color: #5c7464; margin: 10px 0 18px; }
.field-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 22px; }
.field-heading > .field-label { margin-top: 0; }
.field-heading > .text-button { margin-bottom: 8px; font-size: 14px; }
.settings-card #profileSelect { margin-bottom: 10px; }
.settings-card .editor-actions { justify-content: flex-start; margin-top: 26px; }
.connection-result { margin-top: 20px; color: #326346; font-size: 15px; line-height: 1.7; }
.settings-guide { padding: 16px; color: #516d5b; }
.guide-number { display: none; }
.settings-guide h3 { font-size: 20px; font-weight: 600; line-height: 1.4; margin: 0 0 22px; }
.settings-guide ol { padding-left: 20px; }
.settings-guide li { margin-bottom: 22px; padding-left: 6px; font-size: 15px; }
.settings-guide li strong { color: #355e43; font-size: 15px; }
.settings-guide li p { font-size: 14px; line-height: 1.8; margin: 7px 0; }
.guide-note { border-top: 1px solid var(--line); padding-top: 18px; font-size: 14px; line-height: 1.8; }
.toast { position: fixed; bottom: 20px; left: calc(50% + var(--sidebar) / 2); transform: translateX(-50%); max-width: 650px; width: max-content; border-radius: 8px; padding: 15px 20px; background: #264c36; color: white; font-size: 15px; line-height: 1.65; z-index: 50; box-shadow: 0 4px 18px #1b382126; }
.toast.error { background: #7b482d; }
.toast:empty { display: none; }
dialog { width: calc(100% - 36px); max-width: 520px; border: 1px solid #c4d2c7; border-radius: 12px; padding: 28px; background: white; color: var(--ink); }
dialog::backdrop { background: #26332c66; }
#entryEditDialog { width: calc(100% - 32px); max-width: 900px; max-height: calc(100dvh - 32px); padding: 0; overflow-y: auto; }
#entryEditDialog .entry-dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; position: sticky; top: 0; z-index: 3; padding: 14px 20px; border-bottom: 1px solid var(--line); background: white; }
#entryEditDialog h2 { margin: 0; font-size: 20px; }
#entryEditDialog .editor { padding: 18px 20px 0; }
#entryEditDialog .editor-top { margin-bottom: 10px; }
#entryEditDialog .editor-meta { margin-bottom: 10px; }
#entryEditDialog .field-label { margin-top: 12px; }
#entryEditDialog .title-input { font-size: 20px; padding-bottom: 10px; }
#entryEditDialog .content-input, #entryEditDialog .original-content { height: clamp(140px,32dvh,300px); min-height: 140px; font-size: 16px; }
#entryEditDialog .editor-actions { position: sticky; bottom: 0; z-index: 2; justify-content: flex-end; flex-wrap: nowrap; margin-top: 16px; padding: 12px 0; background: white; border-top: 1px solid var(--line); }
#entryEditDialog .editor-actions .button { width: auto; min-width: 0; }
#entryEditDialog .archive-editor-actions { margin-top: 12px; padding-top: 8px; }
#entryEditDialog #entryEditError { margin: 14px 20px 0; }
.publish-now-content { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 230px; overflow-y: auto; font: 15px/1.75 'Segoe UI',Arial,sans-serif; margin: 12px 0; }
#publishNowDialog { max-width: 700px; max-height: calc(100dvh - 32px); overflow-y: auto; }
.connection-needed { margin: 0 0 18px; }
@media (max-width: 600px) { #entryEditDialog .editor-actions { flex-wrap: wrap; } }
dialog h2 { font-size: 25px; font-weight: 600; line-height: 1.35; margin: 12px 0; }
dialog p { font-size: 15px; line-height: 1.8; color: #4d6957; }
.dialog-icon { color: #386348; width: 24px; height: 24px; display: flex; margin-bottom: 18px; }
.dialog-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.dialog-summary { background: #edf3ee; border-radius: 7px; padding: 18px; margin: 20px 0; color: #365e42; font-size: 16px; line-height: 1.7; }
.dialog-summary small { display: block; font-size: 13px; font-weight: 600; margin-bottom: 7px; }
.unsaved { color: #875b16 !important; }
@media (min-width: 1600px) {
  main { padding: 0 40px; }
  .desk { grid-template-columns: minmax(340px,.8fr) minmax(420px,1.4fr); gap: 24px; }
  .editor { padding: 28px; }
  .content-input, .original-content { min-height: 380px; }
}
@media (max-width: 1150px) {
  #view-archive .library-toolbar { grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
  #view-archive .search-box { grid-column: 1 / -1; }
  :root { --sidebar: 200px; }
  main { padding: 0 22px; }
  .sidebar { padding-inline: 12px; }
  .nav-item { font-size: 14px; }
  .desk { grid-template-columns: minmax(260px,.85fr) minmax(310px,1.2fr); gap: 16px; }
  .editor { padding: 20px; }
  .stat { padding: 12px; }
  .stat > span { font-size: 13px; }
  .settings-layout { grid-template-columns: 1fr; gap: 18px; }
  .settings-guide { max-width: 680px; }
  .section-heading { align-items: flex-start; flex-wrap: wrap; }
  .editor-tabs { gap: 14px; }
  .editor-tabs > span { width: 100%; margin: -8px 0 0; padding-bottom: 8px; }
}
@media (max-width: 900px) {
  :root { --sidebar: 0px; }
  .sidebar { position: static; width: auto; padding: 16px 20px 12px; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand { width: fit-content; margin: 0 0 14px; font-size: 23px; gap: 10px; }
  .sidebar > .brand { display: none; }
  .brand-icon { width: 30px; height: 32px; font-size: 29px; line-height: 28px; }
  .brand-icon > span { font-size: 16px; }
  .sidebar nav { flex-direction: row; flex-wrap: wrap; gap: 4px; }
  .nav-item { width: auto; font-size: 14px; gap: 7px; padding: 10px 12px; min-height: 43px; }
  .nav-item .icon { width: 17px; height: 17px; }
  .nav-count { font-size: 13px; margin-left: 3px; }
  .sidebar-bottom { display: none; }
  main { margin-left: 0; padding: 0 20px; }
  .topbar { padding: 18px 0; }
  .topbar h1 { font-size: 23px; }
  .stats { margin-top: 16px; }
  .toast { left: 50%; max-width: calc(100vw - 32px); }
  .local-indicator { display: none; }
}
@media (max-width: 780px) {
  .desk { grid-template-columns: minmax(0,1fr); }
  .entry-list { height: 330px; }
  .editor { padding: 22px; }
  .editor-tabs > span { width: auto; margin: 0 0 0 auto; padding: 0; }
  .content-input, .original-content { min-height: 280px; height: 340px; }
  .editor-placeholder { min-height: 260px; }
  .topbar { flex-wrap: wrap; gap: 12px; }
  .topbar-right { gap: 10px; }
  .section-heading { gap: 12px; }
  .heading-actions { width: 100%; justify-content: flex-start; }
  .stats { border: 0; background: transparent; gap: 8px; }
  .stat { display: block; background: #fafbf9; border: 1px solid var(--line) !important; border-radius: 7px; padding: 12px; }
  .stat > span { display: block; font-size: 13px; margin-bottom: 4px; }
  .stat > strong { font-size: 22px; }
  .full-queue .queue-item { padding: 18px; gap: 12px; }
  .q-select { margin-top: 8px !important; }
  .queue-plan-controls > label { width: 100%; }
  .queue-plan-controls input { min-width: 0; width: 100%; }
  .queue-plan-controls .button { flex: 1; }
  .event-row { grid-template-columns: 1fr; gap: 4px; }
  .history-row { flex-wrap: wrap; padding: 18px; }
  .history-row > a { width: 100%; padding-left: 50px; }
  .main-footer { flex-wrap: wrap; }
}
@media (max-width: 500px) {
  #view-archive .library-toolbar { grid-template-columns: minmax(0,1fr); }
  .sidebar { padding: 14px; }
  .nav-item { font-size: 14px; padding: 10px; gap: 6px; }
  .nav-item .icon { display: none; }
  .nav-count { padding: 1px 5px; }
  main { padding: 0 14px; }
  .topbar h1 { font-size: 22px; }
  .topbar .button { font-size: 13px; padding: 10px; }
  .stat { padding: 10px; }
  .stat > span { font-size: 13px; }
  .editor { padding: 18px; }
  .title-input { font-size: 22px; }
  .editor-tabs { gap: 14px; }
  .editor-tabs > button { font-size: 13px; }
  .editor-tabs > span { width: 100%; margin: -8px 0 0; padding-bottom: 8px; }
  .editor-actions .button { width: 100%; }
  .queue-number { width: 25px; height: 30px; font-size: 14px; }
  .full-queue .queue-item { gap: 8px; padding: 16px; }
  .queue-item-title { font-size: 16px; }
  .queue-item-excerpt { font-size: 14px; }
  .queue-remove { width: 22px; }
  .mini-actions { gap: 12px; }
  .plan-toolbar { padding: 16px; }
  .plan-toolbar-fields > label { width: 100% !important; min-width: 0 !important; }
  .plan-toolbar-fields > .button { width: 100%; }
  .settings-card { padding: 20px; }
  .dialog-actions .button { flex: 1; }
  .main-footer span:last-child { display: none; }
}
#view-archive .library-toolbar { padding: 12px; }
#view-archive .selection-bar { padding: 8px 12px; }
#view-archive .pagination { padding: 6px; }
#view-archive .bulk-bar { padding: 8px 12px; }
#view-archive .entry-row { height: 44px; min-height: 44px; padding: 2px 12px; align-items: center; gap: 10px; cursor: default; }
#view-archive .entry-row > input { margin-top: 0; }
#view-archive .entry-row-content { display: grid; grid-template-columns: minmax(0,1fr) 240px 114px; gap: 12px; align-items: center; }
#view-archive .entry-open { min-width: 0; }
#view-archive .entry-title { margin: 0; font-size: 15px; line-height: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#view-archive .entry-excerpt { display: block; font-size: 13px; line-height: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#view-archive .entry-row-bottom { margin: 0; flex-wrap: nowrap; justify-content: flex-end; gap: 10px; white-space: nowrap; }
#view-archive .entry-row-bottom .badge { padding: 2px 6px; font-size: 12px; white-space: nowrap; }
#view-archive .entry-row-actions { margin: 0; gap: 14px; justify-content: flex-end; }
#view-archive .entry-row-actions .text-button { min-height: 32px; font-size: 13px; padding-block: 5px; }
@media (max-width: 1150px) {
  #view-archive .entry-row-content { grid-template-columns: minmax(0,1fr) 134px 114px; }
  #view-archive .entry-row-bottom time { display: none; }
}
@media (max-width: 700px) {
  #view-archive .entry-row-content { grid-template-columns: minmax(0,1fr) 114px; }
  #view-archive .entry-row-bottom { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
