:root {
  --bg: #f5f7f8;
  --surface: #ffffff;
  --surface-soft: #eef3f5;
  --ink: #102a43;
  --muted: #607384;
  --line: #d8e0e6;
  --line-strong: #b9c6cf;
  --teal: #1f4e5f;
  --teal-dark: #173c49;
  --green: #246b4b;
  --green-soft: #e6f4ea;
  --amber: #9a6a1f;
  --amber-soft: #fff5dd;
  --red: #a63c3c;
  --red-soft: #fce8e6;
  --blue: #2f5f98;
  --blue-soft: #e7f0fb;
  --shadow: 0 12px 30px rgba(16, 42, 67, 0.08);
  --radius: 8px;
  font-family: "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 20px 16px;
  color: #ffffff;
  background: var(--teal-dark);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 4px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  color: var(--teal-dark);
  background: #ffffff;
  font-weight: 800;
}

.brand strong,
.brand span {
  display: block;
}

.brand span {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
}

.nav {
  display: grid;
  gap: 6px;
}

.nav-item {
  width: 100%;
  min-height: 42px;
  border: 0;
  border-radius: 7px;
  padding: 0 12px;
  color: rgba(255, 255, 255, 0.82);
  background: transparent;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
}

.nav-item span {
  width: 30px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 12px;
}

.nav-item.active,
.nav-item:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}

.sidebar-foot {
  margin-top: auto;
  min-height: 38px;
  padding: 10px 8px;
  display: flex;
  gap: 8px;
  align-items: center;
  color: rgba(255, 255, 255, 0.76);
  font-size: 12px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #7bd88f;
}

.main {
  min-width: 0;
  padding: 22px 24px 32px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 18px;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: 25px;
  line-height: 1.2;
}

h2 {
  font-size: 16px;
}

h3 {
  margin-bottom: 10px;
  font-size: 13px;
  color: var(--muted);
}

.topbar p {
  margin-top: 5px;
  color: var(--muted);
}

.top-actions,
.result-actions,
.report-tools {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.compact-tools {
  padding-left: 0;
  padding-right: 0;
}

.ai-status-badge {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 8px 12px;
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  font-weight: 700;
}

.ai-status-badge.green {
  color: var(--green);
  background: var(--green-soft);
}

.ai-status-badge.amber {
  color: var(--amber);
  background: var(--amber-soft);
}

.ai-status-badge.red {
  color: var(--red);
  background: var(--red-soft);
}

.button {
  min-height: 36px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  padding: 0 13px;
  color: var(--ink);
  background: var(--surface);
}

.button:hover:not(:disabled) {
  border-color: var(--teal);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.button.primary {
  border-color: var(--teal);
  color: #ffffff;
  background: var(--teal);
}

.button.danger {
  color: var(--red);
}

.button.ghost {
  background: transparent;
}

.button.small {
  min-height: 30px;
  padding: 0 9px;
  font-size: 12px;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.hidden {
  display: none !important;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.metric {
  min-height: 96px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.metric span {
  color: var(--muted);
  font-size: 12px;
}

.metric strong {
  display: block;
  margin-top: 8px;
  font-size: 28px;
  line-height: 1;
}

.metric em {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.ai-status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ai-status-grid > div {
  min-height: 116px;
  padding: 16px;
  border-right: 1px solid var(--line);
}

.ai-status-grid > div:last-child {
  border-right: 0;
}

.ai-status-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.ai-status-grid strong {
  display: block;
  margin-top: 8px;
  font-size: 18px;
}

.ai-status-grid p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.usage-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.usage-card {
  min-height: 86px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-soft);
}

.usage-card span,
.usage-row span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.usage-card strong {
  display: block;
  margin-top: 7px;
  font-size: 23px;
  line-height: 1;
}

.usage-card em,
.usage-row em {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.usage-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding: 14px 16px 16px;
}

.usage-list {
  display: grid;
  gap: 8px;
}

.usage-row {
  min-height: 50px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
}

.usage-row strong {
  display: block;
  margin-top: 4px;
  font-size: 16px;
}

.usage-row small {
  color: var(--muted);
  font-size: 11px;
}

.usage-empty {
  padding: 12px;
  color: var(--muted);
  border: 1px dashed var(--line-strong);
  border-radius: 7px;
  background: var(--surface-soft);
  font-size: 13px;
}

.panel-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 0 16px 16px;
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 14px;
}

.span-5 {
  grid-column: span 5;
}

.span-7 {
  grid-column: span 7;
}

.span-12 {
  grid-column: 1 / -1;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.panel-head {
  min-height: 48px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.panel-head span {
  color: var(--muted);
  font-size: 12px;
}

.bar-list {
  padding: 14px 16px 16px;
  display: grid;
  gap: 10px;
}

.bar-row {
  display: grid;
  grid-template-columns: minmax(140px, 220px) 1fr 42px;
  gap: 10px;
  align-items: center;
  font-size: 13px;
}

.compact .bar-row {
  grid-template-columns: minmax(90px, 130px) 1fr 36px;
}

.bar-track {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-soft);
}

.bar-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--teal);
}

.split-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 14px 16px;
}

.action-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 16px;
}

.action-row div {
  min-height: 96px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-soft);
}

.action-row p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.planner-layout,
.inbox-layout {
  display: grid;
  grid-template-columns: minmax(320px, 380px) minmax(0, 1fr);
  gap: 14px;
}

.planner-form,
.inbox-form {
  padding-bottom: 14px;
}

label {
  display: grid;
  gap: 6px;
  margin: 12px 16px 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  padding: 9px 10px;
  color: var(--ink);
  background: #ffffff;
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(31, 78, 95, 0.12);
}

textarea {
  resize: vertical;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.planner-form .button {
  margin: 14px 16px 0;
  width: calc(100% - 32px);
}

.inbox-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 14px 16px 0;
}

.inbox-actions .button {
  flex: 1 1 140px;
}

.inbox-help {
  display: grid;
  gap: 10px;
  margin: 14px 16px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-soft);
}

.inbox-help strong {
  font-size: 13px;
}

.help-example {
  display: grid;
  gap: 5px;
}

.help-example span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.help-example code {
  display: block;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
  line-height: 1.45;
  white-space: normal;
}

.planner-results,
.inbox-results {
  min-width: 0;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.dna-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.summary-item {
  min-height: 76px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-soft);
}

.summary-item span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.summary-item strong {
  display: block;
  margin-top: 7px;
  font-size: 15px;
  line-height: 1.25;
  word-break: break-word;
}

.table-wrap {
  width: 100%;
  overflow: auto;
}

.table-wrap.tall {
  max-height: calc(100vh - 232px);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 10px 10px;
  text-align: left;
  color: #ffffff;
  background: var(--teal);
  white-space: nowrap;
}

td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

tbody tr:nth-child(odd) {
  background: #f7fbfc;
}

tbody tr:hover {
  background: #edf6f8;
}

td strong {
  display: block;
}

.domain-cell span,
.muted {
  color: var(--muted);
  font-size: 12px;
}

.link-stack {
  display: grid;
  gap: 4px;
}

.link-stack a {
  line-height: 1.35;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 8px;
  background: var(--surface-soft);
  color: var(--ink);
  font-size: 12px;
  white-space: nowrap;
}

.pill.green {
  color: var(--green);
  background: var(--green-soft);
}

.pill.amber {
  color: var(--amber);
  background: var(--amber-soft);
}

.pill.red {
  color: var(--red);
  background: var(--red-soft);
}

.pill.blue {
  color: var(--blue);
  background: var(--blue-soft);
}

.filters {
  display: grid;
  grid-template-columns: minmax(240px, 1.4fr) repeat(4, minmax(150px, 1fr));
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.dna-filters {
  grid-template-columns: minmax(260px, 1.5fr) repeat(3, minmax(160px, 1fr));
}

.codex-form {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.generation-history {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
}

.generation-history summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 42px;
  padding: 10px 12px;
  cursor: pointer;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.generation-history summary span:last-child {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.generation-history-list {
  max-height: 360px;
  overflow-y: auto;
  border-top: 1px solid var(--line);
}

.generation-history-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
}

.generation-history-item:last-child {
  border-bottom: 0;
}

.generation-history-copy {
  min-width: 0;
}

.generation-history-title {
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.generation-history-meta {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.generation-history-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.generation-history-actions .button {
  min-height: 30px;
  padding: 5px 8px;
  font-size: 11px;
}

.generation-history-empty {
  margin: 0;
  padding: 16px 12px;
  color: var(--muted);
  font-size: 12px;
}

.dripfeed-settings {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-soft);
}

.checkbox-label {
  display: flex !important;
  align-items: center;
  gap: 9px;
  font-weight: 700;
}

.checkbox-label input {
  width: auto;
  margin: 0;
}

.field-help {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.codex-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.publication-report-summary {
  background: linear-gradient(135deg, rgba(47, 125, 114, 0.08), rgba(23, 50, 77, 0.04));
}

.publication-report-table-wrap {
  overflow-x: auto;
}

.publication-report-table {
  min-width: 1680px;
}

.publication-report-table th:nth-child(1) { min-width: 160px; }
.publication-report-table th:nth-child(2) { min-width: 310px; }
.publication-report-table th:nth-child(3),
.publication-report-table th:nth-child(5) { min-width: 260px; }
.publication-report-table th:nth-child(4),
.publication-report-table th:nth-child(6) { min-width: 190px; }
.publication-report-table th:nth-child(7) { min-width: 180px; }
.publication-report-table th:nth-child(8) { min-width: 64px; text-align: center; }
.publication-report-table th:nth-child(9) { min-width: 340px; }
.publication-report-table th:nth-child(10) { min-width: 135px; }
.publication-report-table th:nth-child(11) { min-width: 105px; }

.publication-report-table td {
  vertical-align: top;
}

.publication-report-table td:nth-child(8) {
  text-align: center;
}

.report-link {
  display: inline-block;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.codex-help {
  min-height: 190px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  background: var(--surface-soft);
  line-height: 1.55;
}

.content-preview {
  display: block;
  max-width: 520px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.site-status,
.placement-status,
.inline-number {
  min-width: 104px;
  padding: 6px 8px;
}

.inline-number {
  max-width: 78px;
}

.row-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  min-width: 190px;
}

.mode-icon {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  height: 19px;
  margin-right: 7px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
  vertical-align: middle;
}

.api-icon {
  color: #ffffff;
  background: var(--blue);
}

.codex-icon {
  color: #ffffff;
  background: var(--green);
}

.mini-image {
  width: 72px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 6px;
  object-fit: cover;
  background: var(--surface-soft);
}

.status-note {
  display: block;
  max-width: 240px;
  margin-top: 6px;
  color: var(--red);
  font-size: 12px;
  line-height: 1.35;
}

.status-note.neutral {
  color: var(--muted);
}

.local-preview-link {
  display: inline-block;
  margin-top: 6px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.local-preview-link:hover {
  text-decoration: underline;
}

.category-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.dna-subline {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.dna-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 220px;
}

.dna-chip-list span {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  border-radius: 999px;
  padding: 0 8px;
  color: var(--teal);
  background: var(--surface-soft);
  font-size: 12px;
}

.dna-chip-list.muted-chips span {
  color: var(--blue);
  background: var(--blue-soft);
}

.result-actions,
.report-tools {
  padding: 14px 16px;
  border-top: 1px solid var(--line);
}

.compact-tools {
  padding-left: 0;
  padding-right: 0;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 16px;
}

.category-item {
  min-height: 160px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
}

.category-item h3 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 15px;
}

.category-item p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.article-preview {
  margin-top: 14px;
}

.article-preview-body {
  display: grid;
  grid-template-columns: minmax(280px, 380px) minmax(0, 1fr);
  gap: 16px;
  padding: 16px;
}

.article-preview-media {
  min-height: 220px;
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
  background: var(--surface-soft);
  display: grid;
  place-items: center;
}

.article-preview-media img {
  width: 100%;
  height: 100%;
  min-height: 220px;
  object-fit: cover;
  display: block;
}

.article-preview-content {
  min-width: 0;
}

.article-meta-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.article-meta-grid div {
  min-height: 86px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-soft);
}

.article-meta-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.article-meta-grid strong {
  display: block;
  margin-top: 7px;
  font-size: 13px;
  line-height: 1.35;
}

.article-html {
  max-height: 520px;
  overflow: auto;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
  line-height: 1.6;
}

.article-html h1,
.article-html h2,
.article-html h3 {
  margin: 0 0 10px;
  color: var(--ink);
}

.article-html p,
.article-html ul,
.article-html ol {
  margin: 0 0 13px;
}

.empty-state {
  padding: 28px;
  color: var(--muted);
  text-align: center;
}

.editorial-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
}

.editorial-metrics > div {
  min-width: 0;
  padding: 16px;
  border-right: 1px solid var(--line);
}

.editorial-metrics > div:last-child {
  border-right: 0;
}

.editorial-metrics span,
.editorial-metrics em {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.editorial-metrics strong {
  display: block;
  margin: 6px 0;
  color: var(--ink);
  font-size: 20px;
}

.editorial-toolbar {
  display: flex;
  align-items: end;
  gap: 10px;
  padding: 14px 16px;
  flex-wrap: wrap;
}

.editorial-toolbar label,
.inline-select {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
}

.editorial-toolbar input,
.inline-select select {
  min-height: 38px;
}

.editorial-status {
  margin: 0;
  padding: 0 16px 14px;
  color: var(--muted);
  font-size: 13px;
}

.editorial-opportunity-form {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.editorial-score-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.editorial-score-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-soft);
}

.editorial-score-preview span {
  color: var(--muted);
  font-size: 13px;
}

.score-pass {
  color: #18734b;
}

.score-review {
  color: #9a5a10;
}

.editorial-table-wrap {
  max-height: 650px;
}

.editorial-slots-table small,
#editorialSlotsTable small,
#editorialOpportunityTable small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.editorial-type,
.editorial-score {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
  font-size: 11px;
  font-weight: 700;
}

.type-evergreen { background: #eaf3ee; color: #205a3d; }
.type-emerging { background: #e8f1f8; color: #215a7a; }
.type-seasonal { background: #fff2d9; color: #80530b; }
.type-experimental { background: #f2ecf6; color: #614276; }
.editorial-score.pass { background: #eaf3ee; color: #18734b; }
.editorial-score.review { background: #fff2d9; color: #9a5a10; }

.editorial-reserved {
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .metric-grid,
  .planner-layout,
  .inbox-layout,
  .article-preview-body,
  .action-row,
  .category-grid,
  .summary-grid,
  .usage-summary,
  .usage-body,
  .dna-summary,
  .article-meta-grid,
  .ai-status-grid,
  .split-stats,
  .filters {
    grid-template-columns: 1fr;
  }

  .editorial-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .editorial-metrics > div:nth-child(2) {
    border-right: 0;
  }

  .ai-status-grid > div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .ai-status-grid > div:last-child {
    border-bottom: 0;
  }

  .span-5,
  .span-7 {
    grid-column: 1 / -1;
  }
}

@media (max-width: 680px) {
  .main {
    padding: 16px;
  }

  .topbar {
    display: grid;
  }

  .nav {
    grid-template-columns: 1fr 1fr;
  }

  .field-row {
    grid-template-columns: 1fr;
  }

  .editorial-metrics,
  .editorial-score-grid {
    grid-template-columns: 1fr;
  }

  .editorial-metrics > div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}
