/* Scoped to homepage publishing; the surrounding console keeps its theme. */
.cw-root { --cw-line: #e1e6ee; --cw-ink: #202d40; --cw-soft: #5b6b80; color: var(--cw-ink); padding-bottom: 20px; scroll-margin-top: 96px; }
.cw-root [hidden] { display: none !important; }
.cw-root button, .cw-root input, .cw-root select, .cw-root textarea { font: inherit; }
.cw-root button { transition: background 150ms, border-color 150ms; }
.cw-root button:active:not(:disabled) { transform: translateY(1px); }
.cw-root input:not([type="checkbox"]):not([type="file"]), .cw-root select { background: #fff; border: 1px solid var(--cw-line); border-radius: 7px; min-height: 38px; }
.cw-topline, .cw-pane-heading, .cw-editor-heading, .cw-history-heading, .cw-submit-bar, .cw-history-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.cw-topline { margin: 0 0 20px; }
.cw-tabs { display: flex; gap: 4px; background: #dfe5ee; border-radius: 9px; padding: 4px; }
.cw-tabs button { background: transparent; border: 0; padding: 9px 24px; color: #58677c; }
.cw-tabs button[aria-selected="true"] { background: #fff; color: #1c385b; box-shadow: 0 1px 3px #263c5410; font-weight: 600; }
.cw-timezone { color: #56677e; font-size: 12px; font-variant-numeric: tabular-nums; }
.cw-notice { line-height: 1.6; margin: 0 0 14px; padding: 12px 16px; background: #e9f1fa; border-radius: 8px; color: #265583; }
.cw-notice:empty { display: none; }
.cw-notice.is-error, .cw-error { color: #ad382d; }
.cw-notice.is-error { background: #fff0ec; }
.cw-plan-fields { border: 0; padding: 0; margin: 0; min-width: 0; }
.cw-workspace { display: grid; grid-template-columns: minmax(255px, 29%) minmax(0, 1fr); align-items: start; background: #fff; border: 1px solid var(--cw-line); border-radius: 12px; overflow: hidden; }
.cw-accounts { min-width: 0; background: #f9fafc; border-right: 1px solid var(--cw-line); padding: 22px 16px 12px; align-self: stretch; }
.cw-root h3 { margin: 0; font-size: 16px; font-weight: 600; line-height: 1.5; }
.cw-pane-heading { margin-bottom: 16px; }
.cw-pane-heading span { font-size: 12px; color: #596b81; }
.cw-account-tools { display: flex; flex-wrap: wrap; gap: 16px; margin: 14px 0 10px; font-size: 12px; color: #51617a; }
.cw-account-tools label { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.cw-root input[type="checkbox"] { accent-color: var(--primary); width: 16px; height: 16px; flex: 0 0 16px; cursor: pointer; }
.cw-account-list { max-height: 610px; min-height: 300px; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; padding-right: 3px; }
.cw-account { display: flex; align-items: center; gap: 8px; padding: 3px 8px; border-radius: 7px; margin: 2px 0; min-width: 0; }
.cw-account.is-active { background: #e7effb; }
.cw-account > button { border: 0; background: transparent; display: flex; align-items: center; text-align: left; gap: 10px; width: 100%; min-width: 0; padding: 9px 0; }
.cw-account > button:hover { background: transparent; }
.cw-root .cw-account > button { box-shadow: none; }
.cw-avatar { display: grid; place-items: center; width: 34px; height: 34px; flex: 0 0 34px; background: #e3e8ef; color: #607188; font-size: 14px; border-radius: 10px; }
.cw-account.is-active .cw-avatar { background: #d5e5fa; color: #376399; }
.cw-account-name { display: flex; flex-direction: column; min-width: 0; gap: 3px; }
.cw-account-name strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 500; }
.cw-account-name small { color: #5b6b80; font-size: 11px; overflow-wrap: anywhere; }
.cw-account-count { margin-left: auto; font-size: 12px; color: #486b9a; font-variant-numeric: tabular-nums; }
.cw-composer { min-width: 0; padding: 24px 28px 16px; }
.cw-editor-heading { align-items: start; margin-bottom: 22px; }
.cw-editor-heading h3 { font-size: 20px; letter-spacing: -.3px; }
.cw-editor-heading p, .cw-history-heading p { color: #5b6b80; font-size: 12px; margin: 5px 0 0; }
.cw-editor-heading > button { white-space: nowrap; }
.cw-draft-tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 12px; margin-bottom: 12px; }
.cw-draft-card { position: relative; flex: 0 0 auto; }
.cw-draft-tab { min-width: 145px; text-align: left; border: 1px solid #e7ebf1; background: #fafbfd; padding: 9px 36px 9px 12px; }
.cw-root .cw-draft-close { position: absolute; top: 4px; right: 4px; display: grid; place-items: center; width: 24px; height: 24px; min-width: 0; padding: 0; border: 0; border-radius: 5px; background: transparent; box-shadow: none; color: #5b6b80; font-size: 20px; line-height: 1; }
.cw-root .cw-draft-close:hover:not(:disabled) { background: #fff0ec; color: #ad382d; }
.cw-draft-tab strong, .cw-draft-tab small { display: block; white-space: nowrap; }
.cw-draft-tab strong { font-size: 12px; font-weight: 500; }
.cw-draft-tab small { font-size: 11px; color: #5b6b80; margin-top: 5px; font-variant-numeric: tabular-nums; }
.cw-draft-tab.is-active { border-color: #abc9ed; background: #f0f6fd; color: #255b99; }
.cw-draft-tab.has-error { border-color: #da8a7c; }
.cw-field-head, .cw-media-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 9px; font-size: 13px; font-weight: 500; }
.cw-field-head span, .cw-media-head small { color: #5b6b80; font-size: 11px; font-weight: 400; }
.cw-root .cw-text { display: block; min-height: 185px; width: 100%; resize: vertical; background: #fff; border: 1px solid #dce3ed; border-radius: 8px; padding: 15px; line-height: 1.85; font-size: 14px; color: var(--cw-ink); margin-bottom: 24px; }
.cw-text::placeholder { color: #5b6b80; }
.cw-media { display: flex; flex-wrap: wrap; gap: 10px; min-height: 68px; align-items: center; }
.cw-media-item { position: relative; width: 88px; border: 1px solid var(--cw-line); border-radius: 7px; padding: 5px; background: #f6f8fa; }
.cw-media-item img { width: 76px; height: 70px; object-fit: cover; border-radius: 4px; }
.cw-media-item > span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 10px; color: #5b6b80; margin-top: 3px; }
.cw-media-item > button[aria-label] { position: absolute; top: -7px; right: -7px; background: #fff; border-radius: 50%; width: 22px; height: 22px; padding: 0; }
.cw-media-item.is-video { width: 230px; }
.cw-media-item video { width: 218px; max-height: 180px; }
.cw-upload-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin: 10px 0 24px; font-size: 12px; }
.cw-upload-button { position: relative; border: 1px solid var(--cw-line); border-radius: 6px; padding: 7px 12px; background: #fff; cursor: pointer; overflow: hidden; }
.cw-upload-button:hover { background: #f3f6fa; }
.cw-upload-button:focus-within { outline: 2px solid var(--primary); outline-offset: 2px; }
.cw-upload-button input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.cw-schedule { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 16px; padding-top: 20px; border-top: 1px solid #edf0f5; }
.cw-schedule label { display: block; font-size: 12px; font-weight: 500; margin-bottom: 8px; }
.cw-schedule label small { color: #5b6b80; margin-left: 7px; font-weight: 400; }
.cw-schedule input, .cw-schedule select { width: 100%; font-variant-numeric: tabular-nums; }
.cw-editor-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; font-size: 12px; }
.cw-root .cw-remove { color: #af5148; }
.cw-editor-note { color: #5b6b80; font-size: 11px; margin-top: 14px; line-height: 1.7; }
.cw-empty { padding: 70px 24px; text-align: center; }
.cw-empty-mark { display: grid; place-items: center; width: 54px; height: 54px; margin: 0 auto 22px; color: #6b86aa; background: #edf2f9; border-radius: 16px; font-size: 26px; }
.cw-empty h3 { margin-bottom: 12px; font-size: 18px; }
.cw-empty p { font-size: 13px; color: #5b6b80; line-height: 1.9; margin-bottom: 22px; }
.cw-empty-small { color: #5b6b80; font-size: 12px; padding: 12px 0; line-height: 1.8; }
.cw-batch-time { border: 1px solid var(--cw-line); border-radius: 8px; background: #f8fafc; margin-top: 14px; padding: 13px 16px; font-size: 12px; }
.cw-batch-time summary { cursor: pointer; color: #60738e; }
.cw-batch-time > div { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 15px; }
.cw-batch-time input { max-width: 240px; }
.cw-submit-bar { position: sticky; bottom: 8px; z-index: 2; background: #fff; border: 1px solid var(--cw-line); border-radius: 10px; margin-top: 16px; padding: 16px 22px; box-shadow: 0 5px 18px #263c5410; }
.cw-submit-bar strong { font-size: 14px; font-weight: 600; }
.cw-submit-bar small { display: block; margin-top: 5px; font-size: 11px; color: #5b6b80; }
.cw-submit-bar .primary { min-width: 150px; padding: 12px 20px; }
.cw-edit-banner { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; background: #fff6e5; padding: 10px; margin-bottom: 15px; border-radius: 7px; font-size: 12px; color: #91672d; }
.cw-history-layout { display: grid; grid-template-columns: 245px minmax(0, 1fr); gap: 18px; align-items: start; }
.cw-calendar { background: #fff; border: 1px solid var(--cw-line); border-radius: 10px; padding: 18px 14px; }
.cw-calendar-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.cw-calendar-top strong { font-size: 13px; }
.cw-calendar-top button { border: 0; padding: 2px 8px; font-size: 20px; }
.cw-calendar-week, .cw-calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; text-align: center; }
.cw-calendar-week { color: #5b6b80; font-size: 10px; margin-bottom: 8px; }
.cw-calendar-grid button { padding: 6px 0; border: 0; background: transparent; border-radius: 6px; font-size: 12px; min-height: 43px; font-variant-numeric: tabular-nums; }
.cw-calendar-grid button span, .cw-calendar-grid button small { display: block; }
.cw-calendar-grid button small { height: 10px; font-size: 8px; color: #5b6b80; margin-top: 3px; }
.cw-calendar-grid button[aria-current="date"] { box-shadow: inset 0 0 0 1px #c5d8ed; }
.cw-calendar-grid button[aria-pressed="true"] { background: #296caf; color: #fff; }
.cw-calendar-grid button[aria-pressed="true"] small { color: #cfdfef; }
.cw-calendar-grid button:hover:not([aria-pressed="true"]) { background: #eef3f9; }
.cw-today { width: 100%; border: 1px solid #edf0f5; font-size: 12px !important; color: #6d7e93; margin-top: 16px; }
.cw-calendar > p { font-size: 10px; color: #5b6b80; line-height: 1.9; margin: 16px 0 0; }
.cw-history-main { background: #fff; border: 1px solid var(--cw-line); border-radius: 10px; padding: 22px; min-width: 0; }
.cw-history-heading { margin-bottom: 20px; }
.cw-history-heading h3 { font-size: 18px; }
.cw-history-filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.cw-history-filters > label { min-width: 120px; }
.cw-history-search { flex: 1; }
.cw-records { overflow-x: auto; overscroll-behavior-x: contain; overflow-y: auto; max-height: min(62vh, 680px); }
.cw-task-table { min-width: 680px; }
.cw-task-table th { background: #f6f8fb; font-size: 11px; white-space: nowrap; font-weight: 500; position: sticky; top: 0; z-index: 1; }
.cw-task-table td { vertical-align: top; padding: 16px 10px; }
.cw-task-table td:first-child { width: 30px; }
.cw-task-table td:nth-child(2) { min-width: 170px; max-width: 300px; }
.cw-task-table td strong { font-size: 12px; font-weight: 500; }
.cw-uid { display: block; color: #5b6b80; font-size: 10px; margin: 4px 0; }
.cw-post-text { margin: 8px 0 0; font-size: 12px; line-height: 1.65; color: #67778d; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.cw-task-time { font-size: 11px !important; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cw-task-time small, .cw-task-table td > small { display: block; font-size: 10px; margin-top: 6px; color: #5b6b80; }
.cw-status { display: inline-block; border-radius: 4px; padding: 4px 7px; font-size: 11px; white-space: nowrap; background: #f0f2f5; color: #5b6b80; }
.cw-status.is-pending { color: #916827; background: #fff5df; }
.cw-status.is-published { color: #226548; background: #e9f5ee; }
.cw-status.is-failed, .cw-status.is-need_review { color: #9d4636; background: #fff0e9; }
.cw-status.is-publishing { color: #2e69a7; background: #eaf2ff; }
.cw-task-error { color: #ac6c52; font-size: 10px; max-width: 180px; overflow-wrap: anywhere; }
.cw-row-actions { display: flex; flex-wrap: wrap; gap: 5px; min-width: 90px; max-width: 175px; align-items: center; }
.cw-row-actions button, .cw-row-actions a { font-size: 11px !important; padding: 4px 6px; white-space: nowrap; }
.cw-row-actions a { text-decoration: none; color: #377aba; }
.cw-history-footer { margin-top: 18px; flex-wrap: wrap; font-size: 11px; color: #5b6b80; }
.cw-pager { display: flex; align-items: center; gap: 10px; }
.cw-pager button { padding: 4px 9px; }
.cw-review { width: min(960px, 92vw); max-height: 85vh; border: 1px solid var(--cw-line); border-radius: 12px; padding: 26px; color: var(--cw-ink); }
.cw-review::backdrop { background: #162a4366; backdrop-filter: blur(3px); }
.cw-review > p { font-size: 13px; color: #6e7e92; }
.cw-review-table { overflow: auto; max-height: 52vh; margin: 24px 0; }
.cw-review-table table { min-width: 550px; }
.cw-review-table td { max-width: 430px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; }
.cw-review-actions { display: flex; justify-content: flex-end; gap: 10px; }
@media (max-width: 1100px) {
  .cw-history-layout { grid-template-columns: 225px minmax(0, 1fr); gap: 12px; }
  .cw-history-main { padding: 16px; }
  .cw-composer { padding: 22px 18px 14px; }
}
@media (max-width: 760px) {
  .cw-workspace, .cw-history-layout { grid-template-columns: minmax(0, 1fr); }
  .cw-accounts { border-right: 0; border-bottom: 1px solid var(--cw-line); padding: 16px; }
  .cw-account-list { max-height: 240px; min-height: 90px; }
  .cw-account-name strong { max-width: none; }
  .cw-composer { padding: 20px 16px; }
  .cw-history-layout { gap: 14px; }
  .cw-calendar { max-width: 360px; width: 100%; justify-self: center; }
  .cw-topline { align-items: flex-start; gap: 8px; }
  .cw-tabs button { padding: 8px 15px; }
  .cw-timezone { font-size: 10px; padding-top: 12px; white-space: nowrap; }
  .cw-schedule { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .cw-field-head, .cw-media-head { flex-wrap: wrap; gap: 5px; }
  .cw-editor-heading { gap: 10px; }
  .cw-editor-heading h3 { font-size: 17px; }
  .cw-editor-heading > button { font-size: 12px; }
  .cw-submit-bar { position: static; padding: 13px; gap: 10px; }
  .cw-submit-bar .primary { min-width: 125px; padding: 10px 12px; font-size: 12px; }
  .cw-submit-bar strong { font-size: 12px; }
  .cw-history-main { padding: 14px; }
  .cw-history-footer > span { flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) { .cw-root button { transition: none; } }

.cw-root button.primary { background: #246db4; border-color: #246db4; box-shadow: none; }
.cw-root button.primary:hover:not(:disabled) { background: #1d5f9f; }
