.content-guidance-panel { grid-column: span 12; padding: 0; overflow: hidden; }
.content-guidance-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.content-guidance-heading h3 { margin: 0; color: var(--teal-heading); font-size: 14px; }
.content-guidance-heading p { margin: 4px 0 0; color: var(--muted); font-size: 10px; line-height: 1.45; }
.content-guidance-actions { display: flex; align-items: center; gap: 9px; }
.content-guidance-add-group { display: flex; align-items: center; gap: 7px; }
.content-guidance-tabs { display: inline-flex; gap: 3px; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: var(--canvas-elevated); }
.content-guidance-tab { min-height: 31px; display: inline-flex; align-items: center; gap: 6px; padding: 0 10px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font: inherit; font-size: 10px; font-weight: 650; cursor: pointer; }
.content-guidance-tab:hover { color: var(--ink); }
.content-guidance-tab.active { background: var(--surface); color: var(--accent-strong); }
.content-guidance-tab i { font-size: 14px; }
.content-guidance-add { min-height: 37px; display: inline-flex; align-items: center; gap: 7px; padding: 0 12px; border: 1px solid var(--accent); border-radius: 9px; background: var(--accent); color: #fff; font: inherit; font-size: 10px; font-weight: 700; cursor: pointer; }
.content-guidance-add:hover { background: var(--accent-strong); }
.content-guidance-add.secondary { border-color: #b9c8e9; background: var(--accent-soft); color: var(--accent-strong); }
.content-guidance-add.secondary:hover { border-color: #91a8dd; background: #e5edff; }
.content-guidance-add:disabled { cursor: not-allowed; opacity: .52; }
.content-guidance-body { padding: 5px 20px 18px; }
.content-guidance-view[hidden] { display: none; }
.content-guidance-list { display: grid; }
.content-guidance-row { min-width: 0; display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: start; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.content-guidance-row:last-child { border-bottom: 0; }
.content-guidance-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; background: var(--accent-soft); color: var(--accent-strong); font-size: 17px; }
.content-guidance-icon.never { background: var(--coral-soft); color: var(--coral-strong); }
.content-guidance-icon.always { background: #edf8f5; color: #1d8269; }
.content-guidance-copy { min-width: 0; }
.content-guidance-copy strong { display: block; color: var(--ink); font-size: 11px; line-height: 1.35; }
.content-guidance-copy p { max-width: 76ch; margin: 4px 0 0; color: #53627a; font-size: 10px; line-height: 1.55; }
.content-guidance-meta { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.content-guidance-meta span { min-height: 21px; display: inline-flex; align-items: center; padding: 0 7px; border-radius: 7px; background: var(--canvas-elevated); color: #53627a; font-size: 8px; font-weight: 650; }
.content-guidance-source { padding-top: 2px; color: var(--muted); font-size: 9px; white-space: nowrap; }
.content-idea-link { width: min(420px, 100%); min-height: 46px; display: grid; grid-template-columns: 31px minmax(0, 1fr) 18px; align-items: center; gap: 9px; margin-top: 9px; padding: 7px 9px; border: 1px solid #cfdaec; border-radius: 10px; background: #f7f9fd; color: var(--accent-strong); font: inherit; text-align: left; cursor: pointer; }
.content-idea-link:hover { border-color: #91a8dd; background: #f0f4ff; }
.content-idea-link > i:first-child { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 8px; background: #e4ecff; font-size: 16px; }
.content-idea-link span { min-width: 0; }
.content-idea-link strong, .content-idea-link small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.content-idea-link strong { font-size: 9px; }
.content-idea-link small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.content-guidance-empty { min-height: 118px; display: grid; place-items: center; padding: 22px; color: var(--muted); font-size: 10px; text-align: center; }

.portal-feed-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 12px; padding: 11px 12px; border: 1px solid #cbd3df; border-radius: 12px; background: var(--surface); }
.portal-feed-platforms, .portal-feed-statuses { display: flex; align-items: center; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.portal-feed-platforms::-webkit-scrollbar, .portal-feed-statuses::-webkit-scrollbar { display: none; }
.portal-feed-filter { min-height: 31px; flex: 0 0 auto; padding: 0 10px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--muted); font: inherit; font-size: 9px; font-weight: 650; cursor: pointer; }
.portal-feed-filter:hover { background: var(--canvas-elevated); color: var(--ink); }
.portal-feed-filter.active { border-color: #a9bce9; background: var(--accent-soft); color: var(--accent-strong); }
.portal-feed-summary { color: var(--muted); font-size: 9px; white-space: nowrap; }
.portal-feed-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.portal-feed-card { position: relative; min-width: 0; aspect-ratio: 4 / 5; padding: 0; overflow: hidden; border: 1px solid #cbd3df; border-radius: 12px; background: #e9edf4; color: #fff; text-align: left; cursor: pointer; }
.portal-feed-card:hover, .portal-feed-card:focus-visible { border-color: #7696e4; outline: 0; }
.portal-feed-card:focus-visible { box-shadow: 0 0 0 3px rgba(49,91,214,.18); }
.portal-feed-media, .portal-feed-media img, .portal-feed-media video { position: absolute; inset: 0; width: 100%; height: 100%; }
.portal-feed-media img, .portal-feed-media video { object-fit: cover; }
.portal-feed-placeholder { position: absolute; inset: 0; display: grid; place-items: center; padding: 22px; background: linear-gradient(145deg, #edf2ff, #dbe5fb); color: #24477c; text-align: center; }
.portal-feed-placeholder i { display: block; margin-bottom: 10px; font-size: 27px; }
.portal-feed-placeholder span { display: block; max-width: 24ch; font-size: 12px; font-weight: 700; line-height: 1.35; }
.portal-feed-overlay { position: absolute; inset: auto 0 0; z-index: 2; padding: 46px 12px 12px; background: linear-gradient(to bottom, transparent, rgba(10,19,38,.86)); }
.portal-feed-title { display: block; overflow: hidden; color: #fff; font-size: 11px; font-weight: 700; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.portal-feed-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 7px; color: rgba(255,255,255,.8); font-size: 8px; }
.portal-feed-status { min-height: 22px; display: inline-flex; align-items: center; gap: 5px; padding: 0 7px; border-radius: 7px; background: rgba(255,255,255,.9); color: #25436d; font-weight: 700; }
.portal-feed-status::before { width: 5px; height: 5px; content: ""; border-radius: 50%; background: var(--accent); }
.portal-feed-status.for-approval::before { background: var(--coral); }
.portal-feed-status.posted::before { background: #26937a; }
.portal-feed-badge { position: absolute; z-index: 3; top: 9px; right: 9px; min-height: 24px; display: inline-flex; align-items: center; gap: 5px; padding: 0 7px; border-radius: 7px; background: rgba(17,29,51,.78); color: #fff; font-size: 8px; font-weight: 700; }
.portal-feed-empty { min-height: 260px; display: grid; place-items: center; padding: 30px; border: 1px solid #cbd3df; border-radius: 12px; background: var(--surface); color: var(--muted); text-align: center; }
.portal-feed-empty i { display: block; margin-bottom: 10px; color: var(--accent); font-size: 28px; }
.portal-feed-empty strong { display: block; color: var(--ink); font-size: 13px; }
.portal-feed-empty span { display: block; margin-top: 5px; font-size: 10px; }

.portal-feed-preview-dialog { width: min(760px, calc(100vw - 28px)); padding: 0; overflow: hidden; border: 0; border-radius: 15px; background: var(--surface); color: var(--ink); }
.portal-feed-preview-dialog::backdrop { background: rgba(14,24,48,.52); }
.portal-feed-preview-shell { position: relative; }
.portal-feed-preview-close { position: absolute; z-index: 2; top: 12px; right: 12px; width: 34px; height: 34px; display: grid; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--muted); cursor: pointer; }
.portal-feed-preview-layout { display: grid; grid-template-columns: minmax(0, .95fr) minmax(280px, 1.05fr); }
.portal-feed-preview-art { min-height: 440px; display: grid; align-content: center; justify-items: center; padding: 40px; background: linear-gradient(145deg, #edf2ff, #dbe5fb); color: #24477c; text-align: center; }
.portal-feed-preview-art i { margin-bottom: 18px; font-size: 52px; }
.portal-feed-preview-art span { max-width: 20ch; font-size: 23px; font-weight: 750; line-height: 1.18; }
.portal-feed-preview-art small { max-width: 32ch; margin-top: 11px; font-size: 11px; line-height: 1.5; }
.portal-feed-preview-copy { align-self: center; padding: 42px 38px; }
.portal-feed-preview-eyebrow { color: var(--accent-strong); font-size: 9px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.portal-feed-preview-copy h2 { margin: 8px 0 0; font-size: 22px; line-height: 1.2; }
.portal-feed-preview-copy > p { margin: 11px 0 0; color: #53627a; font-size: 11px; line-height: 1.55; }
.portal-feed-preview-copy dl { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 22px 0; }
.portal-feed-preview-copy dl div { min-width: 0; }
.portal-feed-preview-copy dt { color: var(--muted); font-size: 8px; }
.portal-feed-preview-copy dd { margin: 4px 0 0; color: var(--ink); font-size: 10px; font-weight: 700; line-height: 1.35; }
.portal-feed-preview-done { justify-content: center; min-width: 92px; }
.content-idea-preview { padding: 24px; }
.content-idea-preview-head { display: flex; align-items: center; gap: 11px; padding-right: 42px; }
.content-idea-preview-head span:not(.content-guidance-icon) { color: var(--muted); font-size: 9px; font-weight: 700; text-transform: uppercase; }
.content-idea-preview-head h2 { margin: 3px 0 0; font-size: 18px; }
.content-idea-preview-stage { min-height: 430px; display: grid; align-content: center; justify-items: center; gap: 10px; margin-top: 18px; overflow: hidden; border: 1px solid #cfdaec; border-radius: 12px; background: linear-gradient(145deg, #f5f8ff, #edf3ff); color: var(--teal-heading); text-align: center; }
.content-idea-preview-stage > i { color: var(--accent); font-size: 36px; }
.content-idea-preview-stage > strong { font-size: 14px; }
.content-idea-preview-stage > p { max-width: 42ch; margin: 0 18px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.content-idea-preview-stage > a { display: inline-flex; align-items: center; gap: 5px; color: var(--accent-strong); font-size: 9px; font-weight: 700; }
.content-idea-iframe { width: 100%; height: 390px; border: 0; background: #fff; }

.content-note-dialog { width: min(520px, calc(100vw - 28px)); padding: 0; overflow: hidden; border: 0; border-radius: 14px; background: var(--surface); color: var(--ink); }
.content-note-dialog::backdrop { background: rgba(14,24,48,.48); }
.content-note-form { padding: 22px; }
.content-note-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.content-note-head h2 { margin: 0; font-size: 18px; }
.content-note-head p { margin: 5px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.content-note-close { width: 32px; height: 32px; display: grid; place-items: center; flex: 0 0 auto; padding: 0; border: 1px solid var(--line); border-radius: 9px; background: var(--canvas-elevated); color: var(--muted); cursor: pointer; }
.content-note-fields { display: grid; gap: 12px; }
.content-note-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.content-note-row[hidden], .content-note-field[hidden] { display: none !important; }
.content-note-field { display: grid; gap: 6px; color: #44536b; font-size: 9px; font-weight: 700; }
.content-note-field input, .content-note-field select, .content-note-field textarea { width: 100%; min-height: 40px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--ink); font: inherit; font-size: 11px; outline: 0; }
.content-note-field small { color: var(--muted); font-size: 8px; font-weight: 500; line-height: 1.45; }
.content-library-file-input { position: absolute; width: 1px !important; height: 1px; min-height: 0 !important; overflow: hidden; padding: 0 !important; border: 0 !important; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.content-library-upload { min-height: 62px; display: flex; align-items: center; gap: 11px; padding: 11px 12px; border: 1px dashed #aebede; border-radius: 10px; background: #f7f9fd; color: var(--accent-strong); cursor: pointer; transition: border-color 160ms ease, background 160ms ease; }
.content-library-upload:hover { border-color: var(--accent); background: #f0f4ff; }
.content-library-file-input:focus-visible + .content-library-upload { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(49,91,214,.11); }
.content-library-upload > i { width: 35px; height: 35px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 9px; background: #e4ecff; font-size: 18px; }
.content-library-upload span, .content-library-upload strong, .content-library-upload small { display: block; }
.content-library-upload strong { color: var(--ink); font-size: 10px; }
.content-library-upload small { margin-top: 3px; }
.content-library-attachment-list { display: grid; gap: 7px; }
.content-library-pending { min-width: 0; min-height: 48px; display: grid; grid-template-columns: 38px minmax(0, 1fr) 28px; align-items: center; gap: 9px; padding: 5px 7px; border: 1px solid var(--line); border-radius: 9px; background: var(--canvas-elevated); }
.content-library-pending img, .content-library-pending video { width: 38px; height: 38px; display: block; border-radius: 7px; object-fit: cover; background: #e9edf4; }
.content-library-pending span { min-width: 0; }
.content-library-pending strong, .content-library-pending small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.content-library-pending strong { color: var(--ink); font-size: 9px; }
.content-library-pending small { margin-top: 2px; }
.content-library-pending button { width: 28px; height: 28px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 7px; background: transparent; color: var(--muted); cursor: pointer; }
.content-library-pending button:hover { background: var(--coral-soft); color: var(--coral-strong); }
.content-library-assets { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 7px; max-width: 560px; margin-top: 9px; }
.content-library-asset { min-width: 0; min-height: 48px; display: grid; grid-template-columns: 38px minmax(0, 1fr) 16px; align-items: center; gap: 8px; padding: 5px 8px; border: 1px solid #cfdaec; border-radius: 9px; background: #f7f9fd; color: var(--accent-strong); text-decoration: none; }
.content-library-asset:hover { border-color: #91a8dd; background: #f0f4ff; }
.content-library-asset img, .content-library-asset video { width: 38px; height: 38px; display: block; border-radius: 7px; object-fit: cover; background: #e9edf4; }
.content-library-asset > i:first-child { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 7px; background: #e4ecff; font-size: 16px; }
.content-library-asset span { min-width: 0; }
.content-library-asset strong, .content-library-asset small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.content-library-asset strong { color: var(--ink); font-size: 9px; }
.content-library-asset small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.content-note-field textarea { min-height: 108px; resize: vertical; line-height: 1.5; }
.content-note-field input:focus, .content-note-field select:focus, .content-note-field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(49,91,214,.11); }
.content-note-message { min-height: 17px; margin: 10px 0 0; color: #1d8269; font-size: 9px; }
.content-note-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }

html[data-theme="dark"] .content-guidance-panel, html[data-theme="dark"] .portal-feed-toolbar, html[data-theme="dark"] .portal-feed-empty, html[data-theme="dark"] .content-note-dialog, html[data-theme="dark"] .portal-feed-preview-dialog { background: #192131; }
html[data-theme="dark"] .content-guidance-head, html[data-theme="dark"] .content-guidance-row { border-color: #343f52; }
html[data-theme="dark"] .content-guidance-tabs, html[data-theme="dark"] .content-guidance-meta span { border-color: #343f52; background: #151c29; }
html[data-theme="dark"] .content-guidance-tab.active { background: #253657; color: #dce6ff; }
html[data-theme="dark"] .content-guidance-copy p, html[data-theme="dark"] .content-guidance-meta span { color: #b7c3d5; }
html[data-theme="dark"] .portal-feed-toolbar, html[data-theme="dark"] .portal-feed-card, html[data-theme="dark"] .portal-feed-empty { border-color: #343f52; }
html[data-theme="dark"] .portal-feed-filter:hover { background: #202c42; color: #fff; }
html[data-theme="dark"] .portal-feed-filter.active { border-color: #5578c5; background: #202f52; color: #dce6ff; }
html[data-theme="dark"] .portal-feed-placeholder { background: linear-gradient(145deg, #202f52, #182440); color: #dce6ff; }
html[data-theme="dark"] .portal-feed-preview-art { background: linear-gradient(145deg, #202f52, #182440); color: #dce6ff; }
html[data-theme="dark"] .portal-feed-preview-copy > p { color: #b7c3d5; }
html[data-theme="dark"] .portal-feed-preview-close { border-color: #3b4659; background: #151c29; color: #b7c3d5; }
html[data-theme="dark"] .content-note-field input, html[data-theme="dark"] .content-note-field select, html[data-theme="dark"] .content-note-field textarea { border-color: #3b4659; background: #151c29; color: #edf2fa; }
html[data-theme="dark"] .content-library-upload, html[data-theme="dark"] .content-library-pending, html[data-theme="dark"] .content-library-asset { border-color: #405173; background: #202d46; }
html[data-theme="dark"] .content-library-upload > i, html[data-theme="dark"] .content-library-asset > i:first-child { background: #293b60; }
html[data-theme="dark"] .content-guidance-add.secondary, html[data-theme="dark"] .content-idea-link { border-color: #405173; background: #202d46; color: #dce6ff; }
html[data-theme="dark"] .content-idea-link > i:first-child { background: #293b60; }
html[data-theme="dark"] .content-idea-preview-stage { border-color: #405173; background: linear-gradient(145deg, #202d46, #18243a); }

@media (max-width: 860px) {
  .portal-feed-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .content-guidance-head { align-items: flex-start; flex-direction: column; }
  .content-guidance-actions { width: 100%; justify-content: space-between; }
  .content-guidance-add-group { margin-left: auto; }
}
@media (max-width: 680px) {
  .portal-feed-toolbar { align-items: stretch; flex-direction: column; }
  .portal-feed-summary { padding-inline: 4px; }
  .content-guidance-head, .content-guidance-body { padding-left: 14px; padding-right: 14px; }
  .content-guidance-actions { align-items: stretch; flex-direction: column; }
  .content-guidance-add-group { width: 100%; margin-left: 0; }
  .content-guidance-add-group .content-guidance-add { flex: 1; justify-content: center; }
  .content-guidance-tabs { width: 100%; }
  .content-guidance-tab { flex: 1; justify-content: center; }
  .content-guidance-add { justify-content: center; }
  .content-guidance-row { grid-template-columns: 34px minmax(0, 1fr); gap: 10px; }
  .content-guidance-icon { width: 34px; height: 34px; }
  .content-guidance-source { grid-column: 2; padding: 0; }
  .content-note-row { grid-template-columns: 1fr; }
  .portal-feed-preview-layout { grid-template-columns: 1fr; }
  .portal-feed-preview-art { min-height: 280px; padding: 38px 26px; }
  .portal-feed-preview-copy { padding: 28px 22px; }
}
@media (max-width: 420px) {
  .portal-feed-grid { gap: 6px; }
  .portal-feed-card { border-radius: 9px; }
  .portal-feed-overlay { padding: 40px 9px 9px; }
  .portal-feed-title { font-size: 10px; }
  .portal-feed-meta { align-items: flex-start; flex-direction: column; gap: 5px; }
}
