.legacy-editor-shell {
  min-height: 100vh;
  padding: 32px;
  background:
    radial-gradient(circle at top left, rgba(15, 118, 110, 0.08), transparent 32%),
    linear-gradient(180deg, #f7fafc 0%, #eef4f7 100%);
}

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

.legacy-editor-topbar__copy h1 {
  margin: 8px 0 10px;
  font-size: 28px;
  line-height: 1.25;
  color: #12324a;
}

.legacy-editor-topbar__copy p {
  margin: 0;
  max-width: 760px;
  color: #4b6478;
  line-height: 1.7;
}

.legacy-editor-topbar__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.legacy-editor-eyebrow,
.legacy-editor-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #0f766e;
  font-weight: 700;
}

.legacy-editor-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.legacy-editor-sidebar,
.legacy-editor-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(18, 50, 74, 0.08);
  border-radius: 24px;
  box-shadow: 0 18px 42px rgba(18, 50, 74, 0.08);
}

.legacy-editor-sidebar {
  padding: 18px;
  position: sticky;
  top: 24px;
}

.legacy-editor-sidebar__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  color: #12324a;
}

.legacy-editor-sidebar__head span {
  font-size: 13px;
  color: #5f7486;
}

.legacy-editor-sidebar__list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: calc(100vh - 210px);
  overflow: auto;
  padding-right: 4px;
}

.legacy-editor-list-item {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid rgba(18, 50, 74, 0.08);
  border-radius: 18px;
  background: #fff;
  text-align: left;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.legacy-editor-list-item strong,
.legacy-editor-list-item span,
.legacy-editor-list-item small {
  display: block;
}

.legacy-editor-list-item strong {
  color: #12324a;
  font-size: 15px;
  line-height: 1.5;
}

.legacy-editor-list-item span,
.legacy-editor-list-item small {
  margin-top: 6px;
  color: #5f7486;
  font-size: 13px;
}

.legacy-editor-list-item:hover,
.legacy-editor-list-item.is-active {
  border-color: rgba(15, 118, 110, 0.28);
  box-shadow: 0 12px 24px rgba(15, 118, 110, 0.12);
  transform: translateY(-1px);
}

.legacy-editor-main {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.legacy-editor-card {
  padding: 22px 24px;
}

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

.legacy-editor-card__head h2 {
  margin: 6px 0 0;
  color: #12324a;
  font-size: 26px;
  line-height: 1.3;
}

.legacy-editor-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.legacy-editor-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.legacy-editor-meta-item {
  padding: 14px 16px;
  border-radius: 16px;
  background: #f7fafc;
  border: 1px solid rgba(18, 50, 74, 0.06);
}

.legacy-editor-meta-item span,
.legacy-editor-meta-item strong {
  display: block;
}

.legacy-editor-meta-item span {
  font-size: 12px;
  color: #6f8598;
}

.legacy-editor-meta-item strong {
  margin-top: 6px;
  color: #12324a;
  font-size: 15px;
  line-height: 1.5;
}

.legacy-editor-note {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(15, 118, 110, 0.08);
  color: #24506b;
  line-height: 1.7;
}

.legacy-editor-paper {
  background: #fff;
  border-radius: 16px;
  border: 1px solid rgba(18, 50, 74, 0.06);
  padding: 42px 54px;
  min-height: 420px;
  color: #1f2937;
  line-height: 1.9;
}

.legacy-editor-paper h1,
.legacy-editor-paper h2,
.legacy-editor-paper h3,
.legacy-editor-paper h4 {
  margin: 1.2em 0 0.7em;
  color: #12324a;
  line-height: 1.4;
}

.legacy-editor-paper h1 { font-size: 28px; }
.legacy-editor-paper h2 { font-size: 24px; }
.legacy-editor-paper h3 { font-size: 20px; }
.legacy-editor-paper h4 { font-size: 18px; }

.legacy-editor-paper p {
  margin: 0 0 1em;
  word-break: break-word;
}

.legacy-editor-figure {
  margin: 18px 0;
  text-align: center;
}

.legacy-editor-figure img {
  max-width: 100%;
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(18, 50, 74, 0.08);
}

.legacy-editor-empty {
  padding: 24px;
  border-radius: 16px;
  background: rgba(247, 250, 252, 0.92);
  color: #5f7486;
  line-height: 1.7;
  text-align: center;
}

.legacy-editor-empty--panel {
  min-height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.legacy-editor-paper__empty {
  color: #7b8fa1;
}

@media (max-width: 1080px) {
  .legacy-editor-layout {
    grid-template-columns: 1fr;
  }

  .legacy-editor-sidebar {
    position: static;
  }

  .legacy-editor-meta-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .legacy-editor-shell {
    padding: 18px;
  }

  .legacy-editor-topbar,
  .legacy-editor-card__head {
    flex-direction: column;
  }

  .legacy-editor-topbar__copy h1 {
    font-size: 24px;
  }

  .legacy-editor-actions,
  .legacy-editor-topbar__actions {
    width: 100%;
  }

  .legacy-editor-actions > button,
  .legacy-editor-topbar__actions > button {
    flex: 1 1 auto;
    justify-content: center;
  }

  .legacy-editor-meta-grid {
    grid-template-columns: 1fr;
  }

  .legacy-editor-paper {
    padding: 28px 20px;
  }
}
