.grid {
  margin-top: 15px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
}
/* Nested list inside editor panel (sections / topics / home). */
.editor-panel__nest {
  margin-top: 4px;
  padding-top: 4px;
}
.editor-panel__toolbar {
  margin-bottom: 10px;
}
.editor-panel__grid.grid {
  margin-top: 0;
}
.editor-panel__grid > .card,
.editor-panel__body > .card {
  background: #1b2130;
  border-color: #3f485e;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04),
    0 2px 10px rgba(0, 0, 0, 0.4);
}
.editor-panel__grid > .card .section-title,
.editor-panel__body > .card .section-title {
  color: var(--text);
}
/* Reserve one grid row when the list is still empty. */
.editor-panel__grid:empty {
  min-height: var(--editor-panel-row-min-h, 22rem);
}
.grid > * {
  min-width: 0;
}
@media (max-width: 900px) {
  .grid {
    grid-template-columns: 1fr;
  }
}
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 15px;
  min-width: 0;
}
/* Space consecutive top-level editor cards (e.g. Topics screen vs Manage topics). */
#smrEditorRoot > .card + .card {
  margin-top: 16px;
}
/* Segment cards (playback timeline) — rem tracks html UI scale */
.segment-card .section-title {
  font-size: calc(15 / 17 * 1rem);
}
.segment-card .pill {
  font-size: calc(14 / 17 * 1rem);
}
.segment-card label {
  font-size: calc(15 / 17 * 1rem);
}
.section-title {
  font-size: 1rem;
  color: var(--muted);
  margin-bottom: 8px;
  font-weight: 650;
  letter-spacing: 0.02em;
}
.topic-block {
  margin-top: 10px;
  border-top: 1px dashed rgba(255,255,255,0.16);
  padding-top: 10px;
}
.topic-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  flex-wrap: wrap;
}
.pill {
  font-size: calc(13 / 17 * 1rem);
  color: var(--muted);
}
.card-meta__title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  flex-wrap: wrap;
}
.card-meta__status-row {
  flex-shrink: 0;
}
.card-status {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: calc(12 / 17 * 1rem);
  font-weight: 650;
  border: 1px solid transparent;
}
.card-status--ok {
  color: #7ddea0;
  border-color: rgba(90, 210, 130, 0.35);
  background: rgba(90, 210, 130, 0.1);
}
.card-status--error {
  color: #ffb070;
  border-color: rgba(255, 170, 0, 0.4);
  background: rgba(255, 170, 0, 0.1);
}
.card-status--hidden {
  color: var(--muted);
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.04);
}
.card-meta__counts {
  margin-top: 4px;
  margin-bottom: 6px;
}
.card-errors {
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: calc(12 / 17 * 1rem);
  color: #ffb070;
  border: 1px solid rgba(255, 170, 0, 0.3);
  background: rgba(255, 170, 0, 0.08);
}
.card--has-errors {
  border-color: rgba(255, 170, 0, 0.45);
  box-shadow: 0 0 0 1px rgba(255, 170, 0, 0.12);
}
.card-meta__preview {
  position: relative;
}
.card-meta__preview--error {
  outline: 2px solid rgba(255, 120, 80, 0.55);
  outline-offset: 2px;
  border-radius: 8px;
}
.card-meta__preview-flag {
  position: absolute;
  left: 8px;
  bottom: 8px;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: calc(11 / 17 * 1rem);
  background: rgba(0, 0, 0, 0.55);
  color: #ffb070;
}
